Re: [Spice-devel] Try to port spicec into Android

2011-03-20 Thread Christophe Fergeau
Hi, On Fri, Mar 18, 2011 at 12:52:22PM +0200, Alon Levy wrote: On Fri, Mar 18, 2011 at 06:26:09PM +0800, Shuxiang Lim wrote: Hi, I have to say I cannot solve the glib bugs on Android 'cause it's too arcane and too huge for me now. e.g such a statement will cause a segfault:

Re: [Spice-devel] Try to port spicec into Android

2011-03-21 Thread Christophe Fergeau
On Sun, Mar 20, 2011 at 03:18:31PM +0100, Christophe Fergeau wrote: However as you pointed out, maemo uses glib on ARM (and I think other devices are doing that too) so I don't think glib/gtk+ is fundamentally broken on ARM Actually, I was pointed at http://android.git.kernel.org/?p=platform

Re: [Spice-devel] [PATCH] tests: fix compilation with -Wall -Werror

2011-03-21 Thread Christophe Fergeau
On Mon, Mar 21, 2011 at 05:24:54PM +0200, Alon Levy wrote: Well, this is test code, I would want to get back to this eventually, so could you turn this into a non static (and then the compiler won't complain) instead? if that doesn't work even #if 0 is better. (again, test code). Adding

[Spice-devel] [PATCHv2] tests: fix compilation with -Wall -Werror

2011-03-21 Thread Christophe Fergeau
When compiling spice with make CFLAGS=-g3 -ggdb3 -O0 -Wall -Werror, the build broken because of a few unused variables/missing returns. This patch fixes these warnings. --- server/tests/basic_event_loop.c |2 +- server/tests/test_display_base.c |5 +++--

Re: [Spice-devel] [PATCH] tests: fix compilation with -Wall -Werror

2011-03-21 Thread Christophe Fergeau
On Mon, Mar 21, 2011 at 05:32:20PM +0200, Alon Levy wrote: On Mon, Mar 21, 2011 at 05:24:54PM +0200, Alon Levy wrote: On Mon, Mar 21, 2011 at 04:20:29PM +0100, Christophe Fergeau wrote: When compiling spice with make CFLAGS=-g3 -ggdb3 -O0 -Wall -Werror, the build broken because of a few

Re: [Spice-devel] [PATCH] tests: fix compilation with -Wall -Werror

2011-03-22 Thread Christophe Fergeau
On Mon, Mar 21, 2011 at 06:47:19PM +0100, Christophe Fergeau wrote: On Mon, Mar 21, 2011 at 05:24:54PM +0200, Alon Levy wrote: btw, while you're at it, mind trying to compile with clang? I ran some tests, spice compiled fine with clang using make CC=clang CXX=clang++ CFLAGS=-Wall

[Spice-devel] [PATCH 0/2] Fix some clang static analyzer warnings

2011-03-22 Thread Christophe Fergeau
Hi, I ran spice through clang static analyzer (by doing scan-build ./autogen.sh scan-build make -e) and here are 2 patches fixing some minor issues it reported. Christophe Fergeau (2): common/pixman: remove dead assignments server/tests remove useless assignment common/pixman_utils.c

[Spice-devel] [PATCH 1/2] common/pixman: remove dead assignments

2011-03-22 Thread Christophe Fergeau
They were detected using clang-static-analyzer. Don't initialize the variable to a value to override it with a different value a few lines after. --- common/pixman_utils.c | 10 +++--- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/common/pixman_utils.c

[Spice-devel] [PATCH 2/2] server/tests remove useless assignment

2011-03-22 Thread Christophe Fergeau
This was detected by clang-static-analyzer. --- server/tests/basic_event_loop.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/server/tests/basic_event_loop.c b/server/tests/basic_event_loop.c index 2fe1b69..8db4426 100644 --- a/server/tests/basic_event_loop.c +++

[Spice-devel] [spice-gtk 0/3] fix various warnings reported by clang static analyzer

2011-03-22 Thread Christophe Fergeau
I ran clang static analyzer on gtk-spice using scan-build ./autogen.sh scan-build make -e and it reported some errors (unused variables and potential NULL dereferences). This patch series fixes these warnings. Christophe Fergeau (3): gtk: remove unused variables gtk: don't attempt

[Spice-devel] [spice-gtk 1/3] gtk: remove unused variables

2011-03-22 Thread Christophe Fergeau
They were spotted by the clang static analyzer. --- gtk/channel-record.c | 10 -- gtk/spice-channel.c |3 +-- 2 files changed, 1 insertions(+), 12 deletions(-) diff --git a/gtk/channel-record.c b/gtk/channel-record.c index c7f7054..69c9ea0 100644 --- a/gtk/channel-record.c +++

[Spice-devel] [spice-gtk 2/3] gtk: don't attempt to dereference NULL pointer

2011-03-22 Thread Christophe Fergeau
In spice_channel_handle_migrate there's an explicit check for data being NULL. However, we subsequently dereference it twice even when it can be NULL. Add explicit checks to avoid that. --- gtk/channel-base.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git

[Spice-devel] [spice-gtk 3/3] gtk/display: be more paranoid about potentially NULL pointer

2011-03-22 Thread Christophe Fergeau
If things don't go as expected in gnome_rr_config_ensure_primary (for example we don't find any usable output), we may end up trying to dereference a NULL pointer. It's better to check top_left is not NULL before using it. --- gtk/display/gnome-rr-config.c |2 +- 1 files changed, 1

[Spice-devel] [PATCH] opengl: fix compilation

2011-03-22 Thread Christophe Fergeau
When OpenGL is enabled, build fails in DisplayChannel::create_surface because Canvas *canvas is declared twice. Remove the first declaration to fix compilation. --- client/display_channel.cpp |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/client/display_channel.cpp

[Spice-devel] [PATCH] common/gl: remove unused variable

2011-03-22 Thread Christophe Fergeau
clang static analyzer warned that 'len' was computed but never used in glc_vertex2d. glc_stroke_line_dash has side effects so we have to call it, but we don't need to save its return value since it's not used. --- common/glc.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff

Re: [Spice-devel] [PATCH] common/gl: remove unused variable

2011-03-22 Thread Christophe Fergeau
hrm, forget about that patch, I forgot to remove the len declaration, this breaks compilation. Christophe 2011/3/22 Christophe Fergeau cferg...@gmail.com: clang static analyzer warned that 'len' was computed but never used in glc_vertex2d. glc_stroke_line_dash has side effects so we have

[Spice-devel] [PATCH] common/gl: remove unused variable

2011-03-22 Thread Christophe Fergeau
clang static analyzer warned that 'len' was computed but never used in glc_vertex2d. glc_stroke_line_dash has side effects so we have to call it, but we don't need to save its return value since it's not used. --- common/glc.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff

Re: [Spice-devel] Success in porting snappy of spicec-gtk onto Android

2011-03-23 Thread Christophe Fergeau
Hi Shuxiang, On Wed, Mar 23, 2011 at 06:03:50PM +0800, Shuxiang Lim wrote: And also after some hacking on spice-gtk(mostly on the SIGBUS/SEGFAULT issues,such as replace write_uint16() with memcpy(),..etc), Are you planning to share these patches? I'm sure spice-gtk maintainers would be

Re: [Spice-devel] Success in porting snappy of spicec-gtk onto Android

2011-03-23 Thread Christophe Fergeau
On Wed, Mar 23, 2011 at 01:25:48PM +0200, Alon Levy wrote: Way cool. I can't really read the patch there very well. Is this something you plan to try pushing into glib? Here is a more readable version of the same email: http://mail.gnome.org/archives/gtk-devel-list/2011-March/msg00096.html

Re: [Spice-devel] Porting snappy/libspicec-glib.so onto Android-ARM

2011-03-31 Thread Christophe Fergeau
Hi Shuxiang, On Thu, Mar 31, 2011 at 03:15:48PM +0800, Shuxiang Lim wrote: I wonder if there anybody has tried my solution,for I've got no feedback till now? I don't have any android devices so I unfortunately couldn't try this. But it seems you've done some great work, thanks! Christophe

Re: [Spice-devel] Segmentation fault in alloc_drawable at red_worker.c:1437

2011-03-31 Thread Christophe Fergeau
Hi Chen, On Thu, Mar 31, 2011 at 04:22:00PM +0800, Chen Coolper wrote: I got a segmentation fault of spice, spice version is 0.8, qemu version is spice.v32.kvm. The following is the detail information: If you can reproduce the bug, it might be useful to see what valgrind has to say about it.

[Spice-devel] [PATCH] README: Add qemu commandline options for vdagent

2011-04-01 Thread Christophe Fergeau
It's not obvious how qemu should be started so that vdagentd can find its com.redhat.spice.0 virtio device. It's explained at http://spice-space.org/page/Whiteboard/AgentProtocol but is easier to find if it's explained in README too. --- README | 17 + 1 files changed, 17

[Spice-devel] 2 more cleanup patches

2011-04-01 Thread Christophe Fergeau
Hi, Here are two more patches which remove unused code from spice. I requested a merge request for spice-gtk since the 2nd patch applies to it too. Christophe ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org

[Spice-devel] [PATCH 1/2] remove duplicated macro

2011-04-01 Thread Christophe Fergeau
MIN() is already defined in spice-protocol/spice/macros.h --- server/tests/test_util.h |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/server/tests/test_util.h b/server/tests/test_util.h index 5344a4f..c63f051 100644 --- a/server/tests/test_util.h +++

[Spice-devel] [PATCH 2/2] configure.ac: remove detection of WARN_UNUSED_RESULT

2011-04-01 Thread Christophe Fergeau
spice configure.ac has some code to detect if the compiler has a special attribute to tag some functions so that they generate a warning when their return value isn't checked. However, this test is broken (the gcc attribute name is warn_unused_result, not __warn_unused_result__ and

Re: [Spice-devel] [PATCH] README: Add qemu commandline options for vdagent

2011-04-05 Thread Christophe Fergeau
On Mon, Apr 04, 2011 at 01:43:23PM +0200, Hans de Goede wrote: Thanks I've applied this to my vdagent git tree (and will push it to the official tree together with some other stuff soon). I did make a small change, since the cmdline syntax was different for older qemu versions. So I've added

Re: [Spice-devel] [PATCH 0/2] Fix some clang static analyzer warnings

2011-04-05 Thread Christophe Fergeau
Hi, On Tue, Mar 22, 2011 at 01:41:10PM +0100, Christophe Fergeau wrote: I ran spice through clang static analyzer (by doing scan-build ./autogen.sh scan-build make -e) and here are 2 patches fixing some minor issues it reported. I didn't get any feedback on this patch series, this is just

[Spice-devel] More build cleanups

2011-04-07 Thread Christophe Fergeau
Hi, After installing fedora 15, I rebuilt spice with gcc 4.6 (and still with opengl enabled ;), and found a few more issues which I fixed with these 3 patches. Christophe NB: still no commit access to spice git, I'll have to ask on freedesktop IRC

[Spice-devel] [PATCH 1/3] client: use silent generation rules in Makefile.am

2011-04-07 Thread Christophe Fergeau
The server Makefile.am rules for marshallers generation are prefixed with AM_V_SILENT to integrate nicely with automake silent rules. The same AM_V_SILENT prefix isn't used in client/Makefile.am resulting in verbose output even when automake silent mode is enabled. This commit removes this

[Spice-devel] [PATCH 2/3] gl: use correct pixman accessor for image data

2011-04-07 Thread Christophe Fergeau
Commit 774e5bd36f4 changed - dest-source.pixmap.x_image-data + + (uint8_t *)pixman_image_get_stride(dest-source.pixmap.pixman_image) + The correct accessor to use is pixman_image_get_data. Thanks to gcc 4.6 for warning about a different size int to pointer conversion. ---

[Spice-devel] [PATCH 3/3] gl: remove unused variables

2011-04-07 Thread Christophe Fergeau
gcc 4.6 warned about these. --- client/x11/red_pixmap_gl.cpp |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/client/x11/red_pixmap_gl.cpp b/client/x11/red_pixmap_gl.cpp index 7c85966..0e7b8c1 100644 --- a/client/x11/red_pixmap_gl.cpp +++

Re: [Spice-devel] [PATHCH win-qxl 4/8] display/qxldd.h: add DEBUG_PRINT_ONCE

2011-04-08 Thread Christophe Fergeau
Hi, On Fri, Apr 08, 2011 at 11:48:12AM +0200, Hans de Goede wrote: nit pick, the usual way to do preprocessor macros with { } is: I was about to nit pick about the same thing ;) On a side note, I'm curious about the #define DEBUG_PRINT(arg) DebugPrint arg which require using double (( as in

Re: [Spice-devel] More build cleanups

2011-04-08 Thread Christophe Fergeau
On Fri, Apr 08, 2011 at 11:09:59AM +0200, Hans de Goede wrote: Ack (and I pushed them for you) Thanks! This should be the last time, https://bugs.freedesktop.org/show_bug.cgi?id=35511#c3 Christophe pgpfnh6m6SaGz.pgp Description: PGP signature ___

Re: [Spice-devel] Building celt-0.5.1.3 on OSX - Undefined symbols for architecture x86_64

2011-04-11 Thread Christophe Fergeau
Hi Cliff, On Sat, Apr 09, 2011 at 06:04:38PM -0500, Cliff Sharp wrote: Undefined symbols for architecture x86_64: _ec_ilog, referenced from: _ec_enc_uint in ectest.o _ec_dec_uint in ectest.o _ec_enc_tell in ectest.o _ec_dec_tell in ectest.o _log2_frac in

Re: [Spice-devel] Building celt-0.5.1.3 on OSX - Undefined symbols for architecture x86_64

2011-04-11 Thread Christophe Fergeau
On Mon, Apr 11, 2011 at 09:57:24AM +0200, Attila Sukosd wrote: I've also got similar errors during the test, but seemed to work fine regardless... (Of course its not very optimal) I indeed forgot to mention that since the error happens in the tests/ directory, one can just ignore it (for

[Spice-devel] [PATCH] protocol: use packed-start/end to pack structures

2011-04-11 Thread Christophe Fergeau
spice-protocol comes with 2 headers to handle structure packing, but controller_prot.h and foreign_menu_prot were both using their own preprocessor definitions to handle packing. It's better to have structure packing macros centralized since how it's done varies between compilers, so it may need

Re: [Spice-devel] [PATCH] protocol: use packed-start/end to pack structures

2011-04-11 Thread Christophe Fergeau
On Mon, Apr 11, 2011 at 01:18:27PM +0200, Christophe Fergeau wrote: spice-protocol comes with 2 headers to handle structure packing, but controller_prot.h and foreign_menu_prot were both using their own preprocessor definitions to handle packing. It's better to have structure packing macros

Re: [Spice-devel] Building celt-0.5.1.3 on OSX - Undefined symbols for architecture x86_64

2011-04-13 Thread Christophe Fergeau
laplace_test_SOURCES = laplace-test.c mdct_test_SOURCES = mdct-test.c #rotation_test_SOURCES = rotation-test.c mathops_test_SOURCES = mathops-test.c ___ And BTW - this has been very helpful. On Apr 11, 2011, at 3:15 AM, Christophe Fergeau wrote: On Mon, Apr 11

[Spice-devel] [PATCH 0/5] Miscellaneous patches

2011-04-18 Thread Christophe Fergeau
Christophe Fergeau (5): client: s/AVAILIBLE/AVAILABLE in CmdLineParser client: s/reqired/required in CmdLineParser client: add --version cmdline option to spicec draw: remove SPICE_ADDRESS client: skip spaces in --host-subject client/application.cpp | 19 +-- client

[Spice-devel] [PATCH 2/5] client: s/reqired/required in CmdLineParser

2011-04-18 Thread Christophe Fergeau
--- client/cmd_line_parser.cpp |6 +++--- client/cmd_line_parser.h |4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/cmd_line_parser.cpp b/client/cmd_line_parser.cpp index 1aa5c96..ec00c3e 100644 --- a/client/cmd_line_parser.cpp +++

[Spice-devel] [PATCH 3/5] client: add --version cmdline option to spicec

2011-04-18 Thread Christophe Fergeau
This fixes freedesktop bug #33907 --- client/application.cpp | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/client/application.cpp b/client/application.cpp index e74a871..ef08087 100644 --- a/client/application.cpp +++ b/client/application.cpp @@ -2183,7 +2183,8

[Spice-devel] [PATCH 4/5] draw: remove SPICE_ADDRESS

2011-04-18 Thread Christophe Fergeau
This commit removes the typedef for SPICE_ADDRESS which was no longer used. This is the last thing that was missing to close fdo bug #28984 --- common/draw.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/common/draw.h b/common/draw.h index 95f07b8..cb15672 100644 ---

[Spice-devel] [PATCH 01/15] server: use is_primary_surface

2011-04-21 Thread Christophe Fergeau
red_worker.c has an is_primary_surface helper function, but there were some places in the file not using it. This patch fixes that --- server/red_worker.c | 11 --- 1 files changed, 4 insertions(+), 7 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index

[Spice-devel] [PATCH 03/15] configure.ac: fix use of AC_ARG_ENABLE

2011-04-21 Thread Christophe Fergeau
Most uses of AC_ARG_ENABLE were buggy: - when passing --disable-xxx, configure.ac would behave as if it was passed --enable-xxx - passing --enable-xxx=foo would leak into the summary, ie the summary (at the end of configure) would say xxx: foo instead of xxx: yes This patch fixes these 2

[Spice-devel] [PATCH 04/15] configure.ac: remove unused dynamic linkage flag

2011-04-21 Thread Christophe Fergeau
configure.ac defines a SPICEC_STATIC_LINKAGE_BDYNAMIC variable when --enable-static-linkage is not set, but it's never used. SPICEC_STATIC_LINKAGE_BSTATIC is used in client/, but since we are using libtool, it might be more appropriate to use 'make LDFLAGS=-all-static' to achieve static link. ---

[Spice-devel] [PATCH 06/15] client: make building client optional

2011-04-21 Thread Christophe Fergeau
--- Makefile.am |6 +- configure.ac |8 2 files changed, 13 insertions(+), 1 deletions(-) diff --git a/Makefile.am b/Makefile.am index d90357f..853ffea 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,8 @@ -SUBDIRS = common server client python_modules +SUBDIRS =

[Spice-devel] [PATCH 07/15] common: add extern C guards to headers

2011-04-21 Thread Christophe Fergeau
Since some spice C++ code is using code from common/, the C functions need to be marked as such for the C++ compiler, otherwise we'll get linkage issues. --- common/canvas_base.h |8 common/canvas_utils.h |8 common/draw.h |8 common/gdi_canvas.h

[Spice-devel] [PATCH 08/15] common: add missing header guards to gl_canvas.h

2011-04-21 Thread Christophe Fergeau
--- common/gl_canvas.h |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/common/gl_canvas.h b/common/gl_canvas.h index ff3fba0..4a15668 100644 --- a/common/gl_canvas.h +++ b/common/gl_canvas.h @@ -20,6 +20,9 @@ #include canvas_base.h #include region.h +#ifndef

[Spice-devel] [PATCH 09/15] client: remove c++ wrappers

2011-04-21 Thread Christophe Fergeau
client/ contains several .cpp file which only #include a .c file of the same name. This is unusual and seems to only be done to get C++ name mangling on the symbols defined in the C file. Now that all headers files in common/ use extern C, these wrappers are no longer useful. ---

[Spice-devel] [PATCH 10/15] server: remove extra arg in reds_on_main_agent_start call

2011-04-21 Thread Christophe Fergeau
--- server/main_channel.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/server/main_channel.c b/server/main_channel.c index 1f407e2..4ddd38b 100644 --- a/server/main_channel.c +++ b/server/main_channel.c @@ -677,7 +677,7 @@ static int

[Spice-devel] [PATCH 12/15] server: s/desable/disable

2011-04-21 Thread Christophe Fergeau
This fixes a typo in some function names, there should be no functional change. --- server/reds.c |2 +- server/reds.h |2 +- server/snd_worker.c |4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/reds.c b/server/reds.c index f417738..fe4c603

[Spice-devel] [PATCH 11/15] use foo(void) instead of foo() in prototypes

2011-04-21 Thread Christophe Fergeau
In C, the latter isn't a prototype for a function with no arg, but declares a function with an undefined number of args. --- common/gdi_canvas.c |2 +- common/gdi_canvas.h |2 +- common/gl_canvas.c |2 +- common/gl_canvas.h |2 +- common/quic.c |2

[Spice-devel] [PATCH 14/15] server: add missing GPL header to source files

2011-04-21 Thread Christophe Fergeau
--- server/smartcard.c| 17 + server/smartcard.h| 17 + server/zlib_encoder.c | 17 + 3 files changed, 51 insertions(+), 0 deletions(-) diff --git a/server/smartcard.c b/server/smartcard.c index 892500b..d201f5f 100644 ---

[Spice-devel] [PATCH 0/8] Rework autotools build system

2011-04-21 Thread Christophe Fergeau
distcheck still passes, but I couldn't test what happens on windows, let me know if you can test it and want help fixing it ;) This patch series applies on top of the cleanup series I just sent. Christophe Christophe Fergeau (8): autotools: refactor the whole build machinery configure.ac: remove

[Spice-devel] [PATCH 1/8] autotools: refactor the whole build machinery

2011-04-21 Thread Christophe Fergeau
spice Makefile.am setup is a bit confusing, with source file names being listed several times in different Makefile.am (generally, once in EXTRA_DIST and another time in another Makefile.am in _SOURCES). The client binaries are built by client/x11/Makefile.am, which means recursing into client,

[Spice-devel] [PATCH 2/8] configure.ac: remove unused AC_SUBST

2011-04-21 Thread Christophe Fergeau
--- configure.ac |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 92957fa..7e77672 100644 --- a/configure.ac +++ b/configure.ac @@ -13,9 +13,6 @@ AC_CONFIG_AUX_DIR(.) AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip subdir-objects])

[Spice-devel] [PATCH 4/8] add #include config.h to all source files

2011-04-21 Thread Christophe Fergeau
When using config.h, it must be the very first include in all source files since it contains #define that may change the compilation process (eg libc structure layout changes when it's used to enable large file support on 32 bit x86 archs). This commit adds it at the beginning of all .c and .cpp

[Spice-devel] [PATCH 5/8] add config.h to autogenerated files too

2011-04-21 Thread Christophe Fergeau
Modify the python (de)marshaller generator to add #include config.h at the beginning of the C files it generates --- spice_codegen.py |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/spice_codegen.py b/spice_codegen.py index 3a9989d..4dad06c 100755 ---

[Spice-devel] [PATCH 6/8] use AC_DEFINE instead of hardcoding preprocessor flags

2011-04-21 Thread Christophe Fergeau
Now that all source files include config.h, we can use AC_DEFINE to enable/disable optional features (opengl, cegui). This is cleaner than directly appending -Dxxx directives to the preprocessor flags. This also guarantees that everything will be appropriately rebuilt when using the same source

[Spice-devel] [PATCH 7/8] s/USE_OGL/USE_OPENGL

2011-04-21 Thread Christophe Fergeau
This is more explicit about what it does, and not much longer --- client/application.cpp |6 ++-- client/application.h |2 +- client/common.h |2 +- client/display_channel.cpp | 40 +++---

[Spice-devel] [PATCH 8/8] add comment to beginning of autogenerated files

2011-04-21 Thread Christophe Fergeau
--- spice_codegen.py |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/spice_codegen.py b/spice_codegen.py index 4dad06c..05b47f6 100755 --- a/spice_codegen.py +++ b/spice_codegen.py @@ -142,6 +142,8 @@ writer.set_option(source, os.path.basename(proto_file))

Re: [Spice-devel] [PATCH 14/15] server: add missing GPL header to source files

2011-04-21 Thread Christophe Fergeau
On Thu, Apr 21, 2011 at 02:03:10PM +0200, Hans de Goede wrote: Nitpick: you're adding a LGPL header, might be good to reflect that in the commit message. Indeed, will fix before pushing. For the record, I used the same licence as most of spice (a few files are under more permissive licences).

Re: [Spice-devel] [PATCH 09/15] client: remove c++ wrappers

2011-04-22 Thread Christophe Fergeau
On Thu, Apr 21, 2011 at 08:06:45PM +0300, Uri Lublin wrote: This breaks windows build with VS. You need to also modify client/windows/redc.vcproj Something like this? diff --git a/client/windows/redc.vcproj b/client/windows/redc.vcproj index b1b7341..0b1ecbf 100644 ---

Re: [Spice-devel] [PATCH 3/8] autotools: correctly build canvas-related code

2011-04-22 Thread Christophe Fergeau
On Thu, Apr 21, 2011 at 02:00:17PM +0200, Christophe Fergeau wrote: diff --git a/common/Makefile.am b/common/Makefile.am index 0a2f9c1..501a6e1 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -6,7 +6,6 @@ NULL = noinst_LTLIBRARIES = libspice-common.la

[Spice-devel] [PATCH 00/12] More cleanups

2011-04-22 Thread Christophe Fergeau
some detailed logging of the context in which the panic was risen. There are also a few more cleanups Christophe Christophe Fergeau (12): win32: remove obsolete preprocessor #defines configure.ac: remove setting default C(XX)FLAGS add missing static remove void * arithmetic common

[Spice-devel] [PATCH 01/12] win32: remove obsolete preprocessor #defines

2011-04-22 Thread Christophe Fergeau
SW_CANVAS_NO_CHUNKS isn't used anywhere but in this file. SW_CANVAS_CACHE is now defined directly in the files where it's needed so we no longer need it in the .vcproj file. --- client/windows/redc.vcproj |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git

[Spice-devel] [PATCH 02/12] configure.ac: remove setting default C(XX)FLAGS

2011-04-22 Thread Christophe Fergeau
automake/autoconf already set them for us to -g -O2 if there are no flags defined. --- configure.ac | 12 1 files changed, 0 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index ac1d5e7..430bf83 100644 --- a/configure.ac +++ b/configure.ac @@ -13,9 +13,7

[Spice-devel] [PATCH 03/12] add missing static

2011-04-22 Thread Christophe Fergeau
--- client/jpeg_decoder.cpp |2 +- client/red_channel.cpp|2 +- common/quic_family_tmpl.c |4 ++-- server/mjpeg_encoder.c|6 +++--- server/red_channel.c | 10 +- server/red_dispatcher.c |5 +++-- server/red_worker.c | 12 ++--

[Spice-devel] [PATCH 04/12] remove void * arithmetic

2011-04-22 Thread Christophe Fergeau
With -Wpointer-arith, gcc complains about void pointer arithmetic. This is not a big deal with gcc, but could be with other compilers, so it's better to cast to char */uint8_t * before doing the arithmetic on such pointers. --- server/red_worker.c |2 +- server/reds.c |2 +- 2 files

[Spice-devel] [PATCH 05/12] common: don't duplicate find_msb implementation

2011-04-22 Thread Christophe Fergeau
--- common/bitops.h | 89 + common/gl_utils.h | 58 ++ common/quic.c | 14 +--- 3 files changed, 94 insertions(+), 67 deletions(-) create mode 100644 common/bitops.h diff --git a/common/bitops.h

[Spice-devel] [PATCH 06/12] client: remove unused mb() macro

2011-04-22 Thread Christophe Fergeau
--- client/x11/platform_utils.h |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/client/x11/platform_utils.h b/client/x11/platform_utils.h index 3423b2a..d574e21 100644 --- a/client/x11/platform_utils.h +++ b/client/x11/platform_utils.h @@ -24,12 +24,6 @@ #include

[Spice-devel] [PATCH 07/12] server: use gcc builtin for atomic get/set bit

2011-04-22 Thread Christophe Fergeau
--- server/red_worker.h |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/server/red_worker.h b/server/red_worker.h index ae2eaee..b4e2ed2 100644 --- a/server/red_worker.h +++ b/server/red_worker.h @@ -23,12 +23,14 @@ static inline void set_bit(int index, uint32_t

[Spice-devel] [PATCH 08/12] common, server: use ASSERT from spice_common.h

2011-04-22 Thread Christophe Fergeau
spice_common.h provides an ASSERT macro, no need to duplicate it in many places. For now client/debug.h keeps its own copy since debug.h and spice_common.h have clashes on other macros which are trickier to unify. --- common/canvas_base.c|7 --- common/canvas_utils.c |8

[Spice-devel] [PATCH 09/12] common: use PANIC from spice_common.h

2011-04-22 Thread Christophe Fergeau
--- common/canvas_base.c |7 --- common/ogl_ctx.c |6 -- common/pixman_utils.c |7 --- 3 files changed, 0 insertions(+), 20 deletions(-) diff --git a/common/canvas_base.c b/common/canvas_base.c index a8db367..d11c8ec 100644 --- a/common/canvas_base.c +++

[Spice-devel] [PATCH 10/12] move WARN and WARN_ONCE to spice_common.h

2011-04-22 Thread Christophe Fergeau
--- common/glc.c |8 common/rop3.c |8 ++-- common/spice_common.h |2 ++ 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/common/glc.c b/common/glc.c index 0396fc9..f85d9f6 100644 --- a/common/glc.c +++ b/common/glc.c @@ -40,14 +40,6 @@

[Spice-devel] [PATCH 11/12] use standard do { } while (0) for spice_common.h macros

2011-04-22 Thread Christophe Fergeau
--- common/spice_common.h | 22 +++--- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/common/spice_common.h b/common/spice_common.h index ed28689..d324ca1 100644 --- a/common/spice_common.h +++ b/common/spice_common.h @@ -28,40 +28,40 @@ abort();

[Spice-devel] [PATCH 12/12] move get_time_stamp to main_channel.c

2011-04-22 Thread Christophe Fergeau
There is only one user of get_time_stamp from spice_common.h so it's not really useful to keep it there. --- common/spice_common.h |7 --- server/main_channel.c |7 +++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/common/spice_common.h b/common/spice_common.h

Re: [Spice-devel] spice-gtk 0.6 build problem

2011-04-25 Thread Christophe Fergeau
Hi, I am confused, because the git master branch had the version 0.8 bumped only last week. A 0.8 branch was created from master in late February/early March, and the version number was changed in that branch shortly *after* the branch was created. So the version number between the branch

Re: [Spice-devel] [PATCH 10/12] move WARN and WARN_ONCE to spice_common.h

2011-04-27 Thread Christophe Fergeau
This breaks opengl compilation, I'll send a fixed patch On Fri, Apr 22, 2011 at 06:43:08PM +0200, Christophe Fergeau wrote: --- common/glc.c |8 common/rop3.c |8 ++-- common/spice_common.h |2 ++ 3 files changed, 4 insertions(+), 14 deletions

Re: [Spice-devel] Spice on OS/X

2011-04-27 Thread Christophe Fergeau
On Tue, Apr 26, 2011 at 08:39:13PM +0200, Attila Sukosd wrote: Also I've attached the patch which fixes a few things here and there... With this it builds fine. Ah, so you've already built spice-gtk on macosx? How well did it work? I had some questions about your patch, it would be really

Re: [Spice-devel] Spice on OS/X

2011-04-27 Thread Christophe Fergeau
On Tue, Apr 26, 2011 at 05:10:43PM +0200, Kai Mosebach wrote: I just triesbuild the OSX gtk client, my findings : 1.) Installed gtk2 and gstreamer via ports Do you get a gtk2 version using x11 or the native osx port when you get it from (mac?)ports ? Christophe pgp3ZllVEhXHR.pgp

Re: [Spice-devel] Spice on OS/X

2011-04-27 Thread Christophe Fergeau
On Wed, Apr 27, 2011 at 11:27:53AM +0200, Kai Mosebach wrote: Regarding the native gtk2 build I think its not possible with macports. You would need to use this I guess : http://gtk-osx.sourceforge.net/ yes, trying out http://sourceforge.net/apps/trac/gtk-osx/wiki/Build is part of my medium

Re: [Spice-devel] [PATCH 1/9] build: make it silent

2011-04-27 Thread Christophe Fergeau
On Tue, Jan 25, 2011 at 07:17:20PM +0100, Marc-André Lureau wrote: This patch make it easier to spot warnings in compilation. It should work with older versions of automake that don't support silent rules. This one was already applied in 0e64e2d0 in November Christophe pgpJjjGKTG7sS.pgp

Re: [Spice-devel] [PATCH 2/9] build: require c99

2011-04-27 Thread Christophe Fergeau
Why do you want to require c99? Do the compilers we use on windows have good enough c99 support? Christophe On Tue, Jan 25, 2011 at 07:17:21PM +0100, Marc-André Lureau wrote: --- configure.ac |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/configure.ac

Re: [Spice-devel] [PATCH 3/9] common: RFC: add windows.h where required, make gdi_handlers static

2011-04-27 Thread Christophe Fergeau
On Tue, Jan 25, 2011 at 07:17:22PM +0100, Marc-André Lureau wrote: This patch has not been verified. Somebody with VS should check if it still compiles and run fine before applying it. Making gdi_handlers makes a lot of sense to me. I couldn't find on google or with git grep anything that would

Re: [Spice-devel] [PATCH 6/9] common: spice_memdup could accept NULL

2011-04-27 Thread Christophe Fergeau
On Tue, Jan 25, 2011 at 07:17:25PM +0100, Marc-André Lureau wrote: diff --git a/common/mem.c b/common/mem.c index b0a7eb1..4db8a2c 100644 --- a/common/mem.c +++ b/common/mem.c @@ -71,6 +71,10 @@ void *spice_memdup(const void *mem, size_t n_bytes) { void *copy; +if (mem ==

Re: [Spice-devel] [PATCH 2/9] build: require c99

2011-04-27 Thread Christophe Fergeau
On Wed, Apr 27, 2011 at 07:22:34AM -0400, Marc-André Lureau wrote: - Original Message - Why do you want to require c99? Do the compilers we use on windows have good enough c99 support? Because we use c99: stdbool.h, inttypes.h, bool, variadic macros, // comments, ...

Re: [Spice-devel] [PATCH 6/9] common: spice_memdup could accept NULL

2011-04-27 Thread Christophe Fergeau
On Wed, Apr 27, 2011 at 02:06:48PM +0200, Christophe Fergeau wrote: On Wed, Apr 27, 2011 at 07:27:18AM -0400, Marc-André Lureau wrote: Sigh.. i would prefer to avoid ASSERT, and instead use return_val_if_fail() or so. That's probably why I didn't add it in the first place. The old

Re: [Spice-devel] [PATCH 7/9] common: add ring_get_length() for debugging purposes

2011-04-27 Thread Christophe Fergeau
On Tue, Jan 25, 2011 at 02:33:34PM -0500, Marc-André Lureau wrote: Hi +static inline unsigned int ring_get_length(Ring *ring) This won't compile if no one uses it - so you probably want to make it non static (or do a hack by doing (void)ring_get_length somewhere). Correct, if you

Re: [Spice-devel] [PATCH 7/9] common: add ring_get_length() for debugging purposes

2011-04-27 Thread Christophe Fergeau
On Wed, Apr 27, 2011 at 10:24:01AM -0400, Marc-André Lureau wrote: Do you mean it should be #ifdef'ed? or that it's better to add the equivalent of G_GNUC_UNUSED to the function definition to avoid the compiler warning? Is there such warning? I was expecting unused inline functions not

Re: [Spice-devel] Spice on OS/X

2011-04-27 Thread Christophe Fergeau
On Wed, Apr 27, 2011 at 07:27:58PM +0200, Kai Mosebach wrote: Yeah, I also gave it a shot and that x11 parts stopped my quite quickly :-/ Another note, on building the OSX client the symbol _g_get_monotonic_clock is missing. I think this comes from gtk/spice-session.c but does not seem to

Re: [Spice-devel] Spice on OS/X

2011-04-27 Thread Christophe Fergeau
On Wed, Apr 27, 2011 at 10:47:10AM +0200, Christophe Fergeau wrote: diff --git a/gtk/continuation.h b/gtk/continuation.h index 585788e..6822757 100644 --- a/gtk/continuation.h +++ b/gtk/continuation.h @@ -21,7 +21,8 @@ #ifndef _CONTINUATION_H_ #define _CONTINUATION_H_ -#include

Re: [Spice-devel] Spice on OS/X

2011-04-28 Thread Christophe Fergeau
On Wed, Apr 27, 2011 at 07:36:45PM +0200, Kai Mosebach wrote: If I run configure --with-coroutine=gthread I don¹t need those patches below. Are there any disadvantages out of the gthreads? No idea, I'm trying to stay as close as possible to upstream defaults :) Christophe pgpxSxdBRmQ0r.pgp

Re: [Spice-devel] Spice on OS/X

2011-04-28 Thread Christophe Fergeau
On Wed, Apr 27, 2011 at 07:27:58PM +0200, Kai Mosebach wrote: Yeah, I also gave it a shot and that x11 parts stopped my quite quickly :-/ Another note, on building the OSX client the symbol _g_get_monotonic_clock is missing. I think this comes from gtk/spice-session.c but does not seem to

Re: [Spice-devel] [RFC 06/33] partially replace outb with ioport_write

2011-04-28 Thread Christophe Fergeau
On Wed, Apr 27, 2011 at 06:55:55PM +0300, Alon Levy wrote: replace everywhere it is needed for xspice - places left out are ifdefed out later based on the same define mentioned in qxl.h, XSPICE. note: leave spaces between function name and open paren? note2: ioport_write is added at the

Re: [Spice-devel] [RFC 09/33] qxl_driver: fix initialization from wrong pointer warning

2011-04-28 Thread Christophe Fergeau
Ack too On Wed, Apr 27, 2011 at 06:55:58PM +0300, Alon Levy wrote: --- src/qxl_driver.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/qxl_driver.c b/src/qxl_driver.c index 3514360..dced9fb 100644 --- a/src/qxl_driver.c +++ b/src/qxl_driver.c @@ -60,7

Re: [Spice-devel] [RFC 11/33] qxl_driver: fix three incompatible pointer passed warnings

2011-04-28 Thread Christophe Fergeau
Seems ok, ack On Wed, Apr 27, 2011 at 06:56:00PM +0300, Alon Levy wrote: --- src/qxl_driver.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qxl_driver.c b/src/qxl_driver.c index ff6fe97..18050fb 100644 --- a/src/qxl_driver.c +++ b/src/qxl_driver.c @@

Re: [Spice-devel] [RFC 13/33] qxl_driver: whitespace fixes

2011-04-28 Thread Christophe Fergeau
On Wed, Apr 27, 2011 at 06:56:02PM +0300, Alon Levy wrote: removing whitespace in lines consisting only of it. most of those areas are touched later, but not all. --- src/qxl_driver.c | 50 +- 1 files changed, 25 insertions(+), 25

Re: [Spice-devel] [RFC 18/33] xspice: use SPICE_CFLAGS

2011-04-28 Thread Christophe Fergeau
Should be merged in patch #15 On Wed, Apr 27, 2011 at 06:56:07PM +0300, Alon Levy wrote: --- src/Makefile.am |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 8f048c8..6f2cb56 100644 --- a/src/Makefile.am +++

Re: [Spice-devel] [RFC 19/33] cleanup (add eol between system and non system includes)

2011-04-28 Thread Christophe Fergeau
Ack On Wed, Apr 27, 2011 at 06:56:08PM +0300, Alon Levy wrote: --- src/qxl.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/qxl.h b/src/qxl.h index e45066c..3fddef3 100644 --- a/src/qxl.h +++ b/src/qxl.h @@ -28,6 +28,7 @@ #include stdint.h #include

  1   2   3   4   5   6   7   8   9   10   >