After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 664455 - Build fixes for GLib GIT master (2.31.x)
Build fixes for GLib GIT master (2.31.x)
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other Windows
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-11-21 08:34 UTC by Fan, Chun-wei
Modified: 2011-11-23 00:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixes for #ifdefs in #define lines of gosccket i/o stream.c (2.95 KB, patch)
2011-11-21 08:34 UTC, Fan, Chun-wei
needs-work Details | Review
Move function definitions in gobject.c (2.35 KB, patch)
2011-11-21 08:36 UTC, Fan, Chun-wei
none Details | Review
Fixes for #ifdefs in #define lines of gosccket i/o stream.c (updated) (2.67 KB, patch)
2011-11-21 15:36 UTC, Fan, Chun-wei
none Details | Review

Description Fan, Chun-wei 2011-11-21 08:34:37 UTC
Created attachment 201790 [details] [review]
Fixes for #ifdefs in #define lines of gosccket i/o stream.c

Hi, it seems that some recent changes caused build to break on Visual C++,
so these are my proposed fixes for them, namely to cope with how preprocessors work
with a #ifdef check within a #define line and where functions were placed in a
source file as we are moving away from the use of gobjectnotifyqueue.c
Comment 1 Fan, Chun-wei 2011-11-21 08:36:00 UTC
Created attachment 201791 [details] [review]
Move function definitions in gobject.c

This is to move function declarations where they can be visible when
G_ENABLE_DEBUG is not set.

Thanks, and God bless!
Comment 2 Dan Winship 2011-11-21 12:37:01 UTC
Comment on attachment 201790 [details] [review]
Fixes for #ifdefs in #define lines of gosccket i/o stream.c


>-			 G_IMPLEMENT_INTERFACE (G_TYPE_POLLABLE_INPUT_STREAM, g_socket_input_stream_pollable_iface_init)
>-#ifdef G_OS_UNIX
>-
>-			 G_IMPLEMENT_INTERFACE (G_TYPE_FILE_DESCRIPTOR_BASED, g_socket_input_stream_file_descriptor_based_iface_init)
>-#endif
>-			 )
>+        G_IMPLEMENT_INTERFACE (G_TYPE_POLLABLE_INPUT_STREAM, g_socket_input_stream_pollable_iface_init)
>+        G_SOCKET_INPUT_STREAM_POLLABLE_IFACE_INIT


you're implementing the pollable interface twice rather than implementing pollable once and GFileDescriptorBased once.
Comment 3 Fan, Chun-wei 2011-11-21 15:36:20 UTC
Created attachment 201824 [details] [review]
Fixes for #ifdefs in #define lines of gosccket i/o stream.c (updated)

Hi Dan,

Sorry, must have copied/pasted stuff wrongly up there.  Patch is updated here.

Thanks, and God bless!
Comment 4 Dan Winship 2011-11-22 13:58:56 UTC
Comment on attachment 201824 [details] [review]
Fixes for #ifdefs in #define lines of gosccket i/o stream.c (updated)

I ended up fixing it slightly differently.

leaving this bug open since I'm not sure about the gobject debug patch
Comment 5 Matthias Clasen 2011-11-23 00:27:07 UTC
I've fixed the gobject.c debug issue. Thanks for pointing that out !