Can you explain the end goal here? On Fri, 2018-12-21 at 12:02 +0000, Frediano Ziglio wrote: > 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. > > Frediano Ziglio (33): > 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 > replay: Force binary mode on input 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 > test-display-base: Port to 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 | 18 +- > server/Makefile.am | 3 + > server/dispatcher.c | 48 +++-- > server/dispatcher.h | 2 +- > server/event-loop.c | 11 +- > server/gstreamer-encoder.c | 2 +- > server/net-utils.c | 35 ++-- > server/net-utils.h | 10 +- > server/red-channel-client.c | 12 +- > server/red-channel.c | 5 +- > server/red-client.c | 4 +- > server/red-common.h | 4 +- > server/red-qxl.c | 2 +- > server/red-record-qxl.c | 8 +- > server/red-replay-qxl.c | 4 +- > server/red-stream.c | 78 +++++--- > server/red-stream.h | 6 +- > server/red-worker.c | 6 + > server/reds-private.h | 4 +- > server/reds.c | 124 +++++++------ > 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 | 195 ++++++++++++++++++++ > server/tests/Makefile.am | 11 +- > server/tests/basic-event-loop.c | 5 +- > server/tests/regression-test.py | 4 +- > server/tests/replay.c | 18 +- > server/tests/stat-test.c | 12 +- > server/tests/test-channel.c | 23 +-- > server/tests/test-display-base.c | 39 ++-- > 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 +++ > tools/Makefile.am | 2 + > 44 files changed, 964 insertions(+), 185 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 > _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel