From: Dan Winship Date: Tue, 22 Nov 2011 13:56:54 +0000 (-0500) Subject: GSocketInputStream/GSocketOutputStream: fix win32 build X-Git-Tag: 2.31.4~156 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=95faa44f2d04593f201a2d98210575e894d4cf01;p=platform%2Fupstream%2Fglib.git GSocketInputStream/GSocketOutputStream: fix win32 build based on a patch from Chun-wei Fan https://bugzilla.gnome.org/show_bug.cgi?id=664455 --- diff --git a/gio/gsocketinputstream.c b/gio/gsocketinputstream.c index e8d89fe..3736616 100644 --- a/gio/gsocketinputstream.c +++ b/gio/gsocketinputstream.c @@ -39,13 +39,17 @@ static void g_socket_input_stream_file_descriptor_based_iface_init (GFileDescrip #endif #define g_socket_input_stream_get_type _g_socket_input_stream_get_type + +#ifdef G_OS_UNIX G_DEFINE_TYPE_WITH_CODE (GSocketInputStream, g_socket_input_stream, G_TYPE_INPUT_STREAM, 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 ) +#else +G_DEFINE_TYPE_WITH_CODE (GSocketInputStream, g_socket_input_stream, G_TYPE_INPUT_STREAM, + G_IMPLEMENT_INTERFACE (G_TYPE_POLLABLE_INPUT_STREAM, g_socket_input_stream_pollable_iface_init) + ) +#endif enum { diff --git a/gio/gsocketoutputstream.c b/gio/gsocketoutputstream.c index 1335c4d..2320b17 100644 --- a/gio/gsocketoutputstream.c +++ b/gio/gsocketoutputstream.c @@ -43,12 +43,17 @@ static void g_socket_output_stream_file_descriptor_based_iface_init (GFileDescri #endif #define g_socket_output_stream_get_type _g_socket_output_stream_get_type + +#ifdef G_OS_UNIX G_DEFINE_TYPE_WITH_CODE (GSocketOutputStream, g_socket_output_stream, G_TYPE_OUTPUT_STREAM, G_IMPLEMENT_INTERFACE (G_TYPE_POLLABLE_OUTPUT_STREAM, g_socket_output_stream_pollable_iface_init) -#ifdef G_OS_UNIX G_IMPLEMENT_INTERFACE (G_TYPE_FILE_DESCRIPTOR_BASED, g_socket_output_stream_file_descriptor_based_iface_init) + ) +#else +G_DEFINE_TYPE_WITH_CODE (GSocketOutputStream, g_socket_output_stream, G_TYPE_OUTPUT_STREAM, + G_IMPLEMENT_INTERFACE (G_TYPE_POLLABLE_OUTPUT_STREAM, g_socket_output_stream_pollable_iface_init) + ) #endif -); enum {