[Spice-devel] [PATCH spice-server v3 00/32] Port SPICE server to Windows

Frediano Ziglio fziglio at redhat.com
Thu Jan 31 08:50:07 UTC 2019


> 
> On Wed, Jan 30, 2019 at 04:23:56AM -0500, Frediano Ziglio wrote:
> > ping
> 
> I'd drop the 'socket compatibility layer' stuff from that series to make
> it shorter, a 32 patch series with no real world use case is very low
> priority to me. A shorter portability patch series is more likely to get
> a review from me.
> 
> Christophe
> 

Which part exactly of the "socket compatibility layer" ? If I drop everything
code will end up with a lot of conditional code spread all over the code,
I don't think we want to have that result.

> > 
> > > 
> > > 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) 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 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 (32):
> > >   Use proper format strings for spice_log
> > >   red-replay-qxl: Use PRIxPTR constant for string formatting
> > >   windows: Do not include headers not available on Windows
> > >   build: Detect Windows build and change some definitions
> > >   Avoids %m in formatting for Windows
> > >   sys-socket: Introduce some utility to make sockets more portable
> > >   sys-socket: Add socket_newpair utility
> > >   net-utils: Use socket compatibility layer
> > >   reds: Use socket compatibility layer
> > >   red-stream: Use socket compatibility layer
> > >   red-channel-client: Use socket compatibility layer
> > >   dispatcher: Use socket compatibility layer
> > >   event-loop: Use socket compatibility layer
> > >   sound: Use socket compatibility layer
> > >   basic-event-loop: Use socket compatibility layer
> > >   test-leaks: Use socket compatibility layer
> > >   test-channel: Use socket compatibility layer
> > >   test-stream: Use socket compatibility layer
> > >   windows: Undefine some conflicting preprocessor macros
> > >   windows: Disable code not working on Windows
> > >   dispatcher: Port to Windows
> > >   event-loop: Port to Windows
> > >   tests: Provide alarm replacement for Windows
> > >   test-listen: Exclude Unix sockets part under Windows
> > >   tests: Exclude tests that cannot work on Windows
> > >   test-stat: Adjust delay checks
> > >   red-stream: Fix SSL connection for Windows
> > >   reds: Explicitly include inttypes.h
> > >   Disable recording filtering for Windows
> > >   replay: Port to Windows
> > >   Use structure for socket_t type instead of just a typedef
> > >   Add some notes for the Windows port
> > > 
> > >  README.Windows                    |  18 ++
> > >  configure.ac                      |  20 ++-
> > >  server/Makefile.am                |   2 +
> > >  server/char-device.c              |   3 +-
> > >  server/dispatcher.c               |  48 +++--
> > >  server/dispatcher.h               |   2 +-
> > >  server/event-loop.c               |  11 +-
> > >  server/gstreamer-encoder.c        |   4 +-
> > >  server/main-channel-client.c      |   6 +-
> > >  server/memslot.c                  |   2 +-
> > >  server/mjpeg-encoder.c            |   6 +-
> > >  server/net-utils.c                |  35 ++--
> > >  server/net-utils.h                |  10 +-
> > >  server/red-channel-client.c       |  12 +-
> > >  server/red-channel.c              |   6 +-
> > >  server/red-client.c               |   6 +-
> > >  server/red-common.h               |   4 +-
> > >  server/red-qxl.c                  |   5 +-
> > >  server/red-record-qxl.c           |   7 +
> > >  server/red-replay-qxl.c           |  11 +-
> > >  server/red-stream.c               |  78 +++++---
> > >  server/red-stream.h               |   6 +-
> > >  server/red-worker.c               |   6 +
> > >  server/reds-private.h             |   4 +-
> > >  server/reds.c                     | 145 ++++++++-------
> > >  server/reds.h                     |   4 +-
> > >  server/sound.c                    |  11 +-
> > >  server/spice-core.h               |   6 +
> > >  server/stat-file.c                |   2 +
> > >  server/sys-socket.c               | 287 ++++++++++++++++++++++++++++++
> > >  server/sys-socket.h               | 172 ++++++++++++++++++
> > >  server/tests/Makefile.am          |  11 +-
> > >  server/tests/basic-event-loop.c   |   5 +-
> > >  server/tests/replay.c             |  15 +-
> > >  server/tests/stat-test.c          |  12 +-
> > >  server/tests/test-channel.c       |  23 +--
> > >  server/tests/test-display-base.c  |   2 +
> > >  server/tests/test-leaks.c         |  11 +-
> > >  server/tests/test-listen.c        |  10 ++
> > >  server/tests/test-loop.c          |   1 +
> > >  server/tests/test-playback.c      |   1 -
> > >  server/tests/test-record.c        |   7 +-
> > >  server/tests/test-stream-device.c |   1 +
> > >  server/tests/test-stream.c        |   4 +-
> > >  server/tests/win-alarm.c          |  65 +++++++
> > >  server/tests/win-alarm.h          |  26 +++
> > >  subprojects/spice-common          |   2 +-
> > >  tools/Makefile.am                 |   2 +
> > >  48 files changed, 951 insertions(+), 186 deletions(-)
> > >  create mode 100644 README.Windows
> > >  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 at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/spice-devel
> 


More information about the Spice-devel mailing list