[glib] GSocketInputStream/GSocketOutputStream: fix win32 build
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] GSocketInputStream/GSocketOutputStream: fix win32 build
- Date: Tue, 22 Nov 2011 13:58:21 +0000 (UTC)
commit 95faa44f2d04593f201a2d98210575e894d4cf01
Author: Dan Winship <danw gnome org>
Date: Tue Nov 22 08:56:54 2011 -0500
GSocketInputStream/GSocketOutputStream: fix win32 build
based on a patch from Chun-wei Fan
https://bugzilla.gnome.org/show_bug.cgi?id=664455
gio/gsocketinputstream.c | 10 +++++++---
gio/gsocketoutputstream.c | 9 +++++++--
2 files changed, 14 insertions(+), 5 deletions(-)
---
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
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]