-1 is not much portable and standard.
Signed-off-by: Frediano Ziglio
---
tools/reds_stat.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/reds_stat.c b/tools/reds_stat.c
index 3110afb4..1e83bf10 100644
--- a/tools/reds_stat.c
+++ b/tools/reds_stat.c
@@ -88,7 +8
Signed-off-by: Frediano Ziglio
---
tools/reds_stat.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/reds_stat.c b/tools/reds_stat.c
index 10016fdb..3110afb4 100644
--- a/tools/reds_stat.c
+++ b/tools/reds_stat.c
@@ -101,7 +101,7 @@ int main(int argc, char **argv)
>
> Hi
>
> On Sat, Dec 22, 2018 at 5:49 PM Frediano Ziglio wrote:
> >
> > >
> > > On Fri, Dec 21, 2018 at 4:03 PM Frediano Ziglio
> > > wrote:
> > > >
> > > > Not supported.
> > > >
> > > > Signed-off-by: Frediano Ziglio
> > > > --
> > > > TODO find a better solution
> > >
> > > May be unneces
>
> Hi
>
> On Fri, Dec 21, 2018 at 4:03 PM Frediano Ziglio wrote:
> >
> > Allows to easier port socketpair.
> > Windows does not have this function, we need to create a pair
> > using 2 internet sockets and connecting one to the other.
>
> Have you considered namedpipes instead?
>
Yes, is tru
>
> From: Marc-André Lureau
>
> Fixes
> WARNING: Use the 'pie' kwarg instead of passing '-fpie' manually to
> 'spice-client-glib-usb-acl-helper'
>
> Signed-off-by: Marc-André Lureau
Patch looks good.
Technically you can't fix a warning, you remove it.
You can "fix" a warning only if this is a
>
> On Fri, Dec 21, 2018 at 4:03 PM Frediano Ziglio wrote:
> >
> > These constants are meant to be used in format string for size_t
> > types. Use them for portability.
>
> PRI*PTR is for [u]intptr_t.
>
> There are some claims that z is supported since VC2015 on stackoverflow.
>
They are righ
> Hi
>
> On Fri, Dec 21, 2018 at 4:03 PM Frediano Ziglio wrote:
> >
> > Windows needs some specific setting to use network.
> >
> > Signed-off-by: Frediano Ziglio
>
> with neat below
> Reviewed-by: Marc-André Lureau
>
> > ---
> > configure.ac | 18 +-
> > server/Makefi
From: Marc-André Lureau
Use widget properties instead, as recommended in the documentation.
The UI doesn't seem to have changed after these modifications.
Signed-off-by: Marc-André Lureau
---
src/usb-device-widget.c | 23 +--
1 file changed, 9 insertions(+), 14 deletions(-)
From: Marc-André Lureau
Split lib dependencies in 3 groups: glib, gtk, and acl.
Fixes:
https://gitlab.freedesktop.org/spice/spice-gtk/issues/77
Signed-off-by: Marc-André Lureau
---
meson.build | 46 ++
src/meson.build | 10 +-
2 files ch
From: Marc-André Lureau
Fixes
WARNING: Use the 'pie' kwarg instead of passing '-fpie' manually to
'spice-client-glib-usb-acl-helper'
Signed-off-by: Marc-André Lureau
---
meson.build | 2 +-
src/meson.build | 13 +++--
2 files changed, 4 insertions(+), 11 deletions(-)
diff --git
>
> Hi
>
> On Fri, Dec 21, 2018 at 4:04 PM Frediano Ziglio wrote:
> >
> > Allows the compiler to catch errors mixing int and sockets.
> > Make easier to keep Windows port working.
> >
> > Signed-off-by: Frediano Ziglio
>
> Ah, I understand the debug code now.
>
> Still, I think you are being
>
> On Fri, Dec 21, 2018 at 4:04 PM Frediano Ziglio wrote:
> >
> > Although this feature can be ported to Windows doing so would
> > require the usage of g_spawn_async_with_fds, which is only available
> > in GLib 2.58 or some specific Win32 code.
> >
>
> Easy to wrap though:
>
> https://github
>
> On Fri, Dec 21, 2018 at 4:04 PM Frediano Ziglio wrote:
> >
> > usleep under Windows does not seem to have the required precision.
> > Use milliseconds and adjust check times according.
> >
>
> Have you given g_usleep() a try? It has some specific windows handling.
>
Implementation is
Sl
>
> Hi
>
> On Fri, Dec 21, 2018 at 4:04 PM Frediano Ziglio wrote:
> >
> > Replace poll call with select.
> > As socket is set to non-blocking we must support it so if
> > we detect an EAGAIN error wait for data.
>
> I am not fond of the two code paths, why not switch the code to select()?
>
N
>
> On Fri, Dec 21, 2018 at 4:04 PM Frediano Ziglio wrote:
> >
> > If input contains the binary record we can't have it modified
> > during read.
> >
> > Signed-off-by: Frediano Ziglio
>
> Or the more portable
> freopen(NULL, "rb", stdin);?
>
> anyway
> Reviewed-by: Marc-André Lureau
>
Unfo
> On Fri, Dec 21, 2018 at 4:04 PM Frediano Ziglio wrote:
> >
> > Signed-off-by: Frediano Ziglio
>
> I would suggest to wrap with #if _WIN32, otherwise it's really weird
> to see those undef without context.
>
Done, also added a comment like
@@ -39,7 +39,10 @@
#include "red-qxl.h"
+#ifd
Hi
On Sat, Dec 22, 2018 at 5:49 PM Frediano Ziglio wrote:
>
> >
> > On Fri, Dec 21, 2018 at 4:03 PM Frediano Ziglio wrote:
> > >
> > > Not supported.
> > >
> > > Signed-off-by: Frediano Ziglio
> > > --
> > > TODO find a better solution
> >
> > May be unnecessary with __USE_MINGW_ANSI_STDIO (to
>
> On Fri, Dec 21, 2018 at 4:03 PM Frediano Ziglio wrote:
> >
> > Not supported.
> >
> > Signed-off-by: Frediano Ziglio
> > --
> > TODO find a better solution
>
> May be unnecessary with __USE_MINGW_ANSI_STDIO (to check)
>
Not sure but this surely would limit the compiler(s?) to MingW only.
On Fri, Dec 21, 2018 at 4:04 PM Frediano Ziglio wrote:
>
> test-stream test is passing file descriptor using Unix socket.
> test-stat-file needs some porting work of mmap feature.
>
> Signed-off-by: Frediano Ziglio
Reviewed-by: Marc-André Lureau
> ---
> server/tests/Makefile.am | 9 +++--
Hi
On Fri, Dec 21, 2018 at 4:04 PM Frediano Ziglio wrote:
>
> Allows the compiler to catch errors mixing int and sockets.
> Make easier to keep Windows port working.
>
> Signed-off-by: Frediano Ziglio
Ah, I understand the debug code now.
Still, I think you are being overzealous. Please just us
On Fri, Dec 21, 2018 at 4:04 PM Frediano Ziglio wrote:
>
> Client process termination did not work for Windows, used Win32
> APIs.
ok..
>
> Signed-off-by: Frediano Ziglio
Reviewed-by: Marc-André Lureau
> ---
> server/tests/replay.c | 11 +--
> 1 file changed, 9 insertions(+), 2 del
On Fri, Dec 21, 2018 at 4:04 PM Frediano Ziglio wrote:
>
> Signed-off-by: Frediano Ziglio
Reviewed-by: Marc-André Lureau
> ---
> server/tests/Makefile.am | 2 +
> server/tests/test-channel.c | 1 +
> server/tests/test-loop.c | 1 +
> server/tests/test-stream-device
On Fri, Dec 21, 2018 at 4:04 PM Frediano Ziglio wrote:
>
> Although this feature can be ported to Windows doing so would
> require the usage of g_spawn_async_with_fds, which is only available
> in GLib 2.58 or some specific Win32 code.
>
Easy to wrap though:
https://github.com/elmarco/qemu/commi
On Fri, Dec 21, 2018 at 4:04 PM Frediano Ziglio wrote:
>
> MingW does not include this header while including stdint.h so
> on Windows you need to include it.
>
> Signed-off-by: Frediano Ziglio
Reviewed-by: Marc-André Lureau
> ---
> server/reds.h | 1 +
> 1 file changed, 1 insertion(+)
>
> d
On Fri, Dec 21, 2018 at 4:04 PM Frediano Ziglio wrote:
>
> Use GLib function to launch and wait process exit.
>
> Signed-off-by: Frediano Ziglio
Reviewed-by: Marc-André Lureau
> ---
> server/tests/regression-test.py | 4 ++--
> server/tests/test-display-base.c | 37 +++-
On Fri, Dec 21, 2018 at 4:04 PM Frediano Ziglio wrote:
>
> Use g_io_channel_win32_new_socket instead of g_io_channel_unix_new
>
> Signed-off-by: Frediano Ziglio
Reviewed-by: Marc-André Lureau
> ---
> server/event-loop.c | 5 +
> 1 file changed, 5 insertions(+)
>
> diff --git a/server/eve
On Fri, Dec 21, 2018 at 4:04 PM Frediano Ziglio wrote:
>
> usleep under Windows does not seem to have the required precision.
> Use milliseconds and adjust check times according.
>
Have you given g_usleep() a try? It has some specific windows handling.
> Signed-off-by: Frediano Ziglio
> ---
>
Hi
On Fri, Dec 21, 2018 at 4:04 PM Frediano Ziglio wrote:
>
> Replace poll call with select.
> As socket is set to non-blocking we must support it so if
> we detect an EAGAIN error wait for data.
I am not fond of the two code paths, why not switch the code to select()?
I wonder if existing poll
On Fri, Dec 21, 2018 at 4:04 PM Frediano Ziglio wrote:
>
> Windows does not support Unix sockets.
>
> Signed-off-by: Frediano Ziglio
Reviewed-by: Marc-André Lureau
> ---
> server/tests/test-listen.c | 10 ++
> 1 file changed, 10 insertions(+)
>
> diff --git a/server/tests/test-listen
On Fri, Dec 21, 2018 at 4:04 PM Frediano Ziglio wrote:
>
> - global signals;
> - CLOEXEC flag;
> - mmap and statistics;
> - IPTOS_LOWDELAY flag;
> - Unix sockets;
> - sharing file descriptors through Unix sockets;
> - TCP_CORK flag.
>
> Signed-off-by: Frediano Ziglio
Looks good,
Reviewed-by: Mar
On Fri, Dec 21, 2018 at 4:04 PM Frediano Ziglio wrote:
>
> If input contains the binary record we can't have it modified
> during read.
>
> Signed-off-by: Frediano Ziglio
Or the more portable
freopen(NULL, "rb", stdin);?
anyway
Reviewed-by: Marc-André Lureau
> ---
> server/tests/replay.c |
On Fri, Dec 21, 2018 at 4:04 PM Frediano Ziglio wrote:
>
> Signed-off-by: Frediano Ziglio
I would suggest to wrap with #if _WIN32, otherwise it's really weird
to see those undef without context.
> ---
> server/red-qxl.c | 1 +
> server/reds.c| 3 +++
> 2 files changed, 4 insertions(+)
>
>
Hi
On Fri, Dec 21, 2018 at 4:03 PM Frediano Ziglio wrote:
>
> Between Unix and Windows socket are quite different:
> - on Windows sockets have a different namespace from C file
> descriptors so you can't use read/write/close or similar functions;
> - errors are not stored in errno but you must
Hi
On Fri, Dec 21, 2018 at 4:03 PM Frediano Ziglio wrote:
>
> Allows to easier port socketpair.
> Windows does not have this function, we need to create a pair
> using 2 internet sockets and connecting one to the other.
Have you considered namedpipes instead?
>
> Signed-off-by: Frediano Ziglio
On Fri, Dec 21, 2018 at 4:03 PM Frediano Ziglio wrote:
>
> Not supported.
>
> Signed-off-by: Frediano Ziglio
> --
> TODO find a better solution
May be unnecessary with __USE_MINGW_ANSI_STDIO (to check)
> ---
> server/reds.c | 7 +++
> 1 file changed, 7 insertions(+)
>
> diff --git a/serve
Hi
On Fri, Dec 21, 2018 at 4:03 PM Frediano Ziglio wrote:
>
> Windows needs some specific setting to use network.
>
> Signed-off-by: Frediano Ziglio
with neat below
Reviewed-by: Marc-André Lureau
> ---
> configure.ac | 18 +-
> server/Makefile.am | 1 +
> 2 files chang
On Fri, Dec 21, 2018 at 4:03 PM Frediano Ziglio wrote:
>
> These constants are meant to be used in format string for size_t
> types. Use them for portability.
PRI*PTR is for [u]intptr_t.
There are some claims that z is supported since VC2015 on stackoverflow.
I assume we are mainly interested i
On Fri, Dec 21, 2018 at 4:03 PM Frediano Ziglio wrote:
>
> This is a preparatory patch for next portability patches
>
> Signed-off-by: Frediano Ziglio
Reviewed-by: Marc-André Lureau
> ---
> server/dispatcher.c | 2 ++
> server/net-utils.c | 2 ++
> server/red-cha
38 matches
Mail list logo