[PATCH spice-server v6 00/19] Port SPICE server to Windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Windows support is useful to use with Qemu under Windows as host or
to implement servers like Xspice.
Mainly SPICE server uses lot of libraries to expose a TCP protocol.
As TCP is implemented with socket library which is quite portable was
not that hard to port.
Beside some minor feature (see REAME.Windows.md) all was ported.
During porting was choosen to keep Unix as the main platform, if a
change would require too much changes some Windows wrapper is
preferred instead. Not too complicated stuff, the main "wrapper" is
that Windows errors from socket are written back into errno to avoid
to change lot of code handling errors.

Changes since v5:
- fix small typo
- convert notes for markdown and add some information
  (see https://gitlab.freedesktop.org/fziglio/spice/blob/windows_ci/README.Windows.md)
- added CI support
- rebase on master and fix new syntax-check requirements

Changes since v4:
- fix use after free in reds_set_video_codecs_from_string;
- rename conflicting identifiers instead of undefining them;
- remove some preprocessor indentation;
- improve Meson support;
- improve some comments.

Changes since v3:
- reduce compatibility layer size:
  - do not change function name if not required;
  - use int instead of a new socket_t.

Changes since v2:
- better %m replacement;
- many comments updates;
- typo and grammar fixes;
- use int to store socket descriptors/handles;
- merge all v2 updates into a single series;
- split formatting string patch.

Frediano Ziglio (19):
  build: Detect Windows build and change some definitions
  Avoids %m in formatting for Windows
  windows: Do not use conflicting preprocessor macros
  tests: Provide alarm replacement for Windows
  sys-socket: Introduce some utility to make sockets more portable
  sys-socket: Add socket_newpair utility
  net-utils: Port to Windows
  reds: Use socket compatibility layer (close -> socket_close)
  red-stream: Use socket compatibility layer
  dispatcher: Use socket compatibility layer
  test-leaks: Use socket compatibility layer
  test-channel: Use socket compatibility layer
  windows: Disable code not working on Windows
  dispatcher: Port to Windows
  tests: Exclude tests that cannot work on Windows
  red-stream: Fix SSL connection for Windows
  Disable recording filtering for Windows
  Add some notes for the Windows port
  ci: Add test for Windows using MingW

 .gitlab-ci.yml                    |  18 ++
 README.Windows.md                 |  31 ++++
 configure.ac                      |  20 ++-
 meson.build                       |  15 +-
 server/Makefile.am                |   2 +
 server/dispatcher.c               |  28 ++-
 server/meson.build                |   2 +
 server/net-utils.c                |  11 ++
 server/red-channel-client.c       |   2 +
 server/red-common.h               |   1 +
 server/red-qxl.c                  |  52 +++---
 server/red-record-qxl.c           |   7 +
 server/red-stream.c               |  48 ++++-
 server/red-stream.h               |   2 +
 server/red-worker.c               |   6 +
 server/reds.c                     | 115 ++++++------
 server/sound.c                    |   5 +-
 server/stat-file.c                |   2 +
 server/sys-socket.c               | 285 ++++++++++++++++++++++++++++++
 server/sys-socket.h               | 142 +++++++++++++++
 server/tests/Makefile.am          |  11 +-
 server/tests/basic-event-loop.c   |   2 +
 server/tests/meson.build          |  16 +-
 server/tests/replay.c             |   2 +
 server/tests/test-channel.c       |   9 +-
 server/tests/test-leaks.c         |   5 +-
 server/tests/test-loop.c          |   1 +
 server/tests/test-record.c        |   7 +-
 server/tests/test-stream-device.c |   1 +
 server/tests/win-alarm.c          |  65 +++++++
 server/tests/win-alarm.h          |  26 +++
 tools/Makefile.am                 |   2 +
 tools/meson.build                 |  10 +-
 33 files changed, 834 insertions(+), 117 deletions(-)
 create mode 100644 README.Windows.md
 create mode 100644 server/sys-socket.c
 create mode 100644 server/sys-socket.h
 create mode 100644 server/tests/win-alarm.c
 create mode 100644 server/tests/win-alarm.h

-- 
2.20.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]