[glib/gdbus-merge] Clean up platform-specific includes



commit 8f89b63930181696a3f4a9c441ffd97230577d64
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu May 13 20:29:04 2010 -0400

    Clean up platform-specific includes
    
    The problem was pointed out in bug 618029. To solve it, we moved
    the GUnixFDList typedef to giotypes.h.

 gio/gdbusmessage.c                       |    2 ++
 gio/gdbusmessage.h                       |    6 ------
 gio/giotypes.h                           |    1 +
 gio/gunixfdlist.h                        |    3 +--
 gio/gunixfdmessage.c                     |    1 +
 gio/gunixfdmessage.h                     |    2 +-
 gio/tests/gdbus-example-unix-fd-client.c |    1 +
 gio/tests/gdbus-peer.c                   |    1 +
 8 files changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c
index 1fc3c09..bfc46f0 100644
--- a/gio/gdbusmessage.c
+++ b/gio/gdbusmessage.c
@@ -38,6 +38,8 @@
 #include "gioerror.h"
 
 #ifdef G_OS_UNIX
+#include "gunixfdlist.h"
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
diff --git a/gio/gdbusmessage.h b/gio/gdbusmessage.h
index a01fb8b..b774409 100644
--- a/gio/gdbusmessage.h
+++ b/gio/gdbusmessage.h
@@ -25,10 +25,6 @@
 
 #include <gio/giotypes.h>
 
-#ifdef G_OS_UNIX
-#include <gio/gunixfdlist.h>
-#endif
-
 G_BEGIN_DECLS
 
 #define G_TYPE_DBUS_MESSAGE         (g_dbus_message_get_type ())
@@ -111,11 +107,9 @@ guchar                   *g_dbus_message_get_header_fields  (GDBusMessage
 GVariant                 *g_dbus_message_get_body           (GDBusMessage             *message);
 void                      g_dbus_message_set_body           (GDBusMessage             *message,
                                                              GVariant                 *body);
-#ifdef G_OS_UNIX
 GUnixFDList              *g_dbus_message_get_unix_fd_list   (GDBusMessage             *message);
 void                      g_dbus_message_set_unix_fd_list   (GDBusMessage             *message,
                                                              GUnixFDList              *fd_list);
-#endif
 
 guint32                   g_dbus_message_get_reply_serial   (GDBusMessage             *message);
 void                      g_dbus_message_set_reply_serial   (GDBusMessage             *message,
diff --git a/gio/giotypes.h b/gio/giotypes.h
index 22a0026..1c635d5 100644
--- a/gio/giotypes.h
+++ b/gio/giotypes.h
@@ -335,6 +335,7 @@ struct _GOutputVector {
 
 typedef struct _GCredentials                  GCredentials;
 typedef struct _GUnixCredentialsMessage       GUnixCredentialsMessage;
+typedef struct _GUnixFDList                   GUnixFDList;
 typedef struct _GDBusMessage                  GDBusMessage;
 typedef struct _GDBusConnection               GDBusConnection;
 typedef struct _GMessageBusConnection         GMessageBusConnection;
diff --git a/gio/gunixfdlist.h b/gio/gunixfdlist.h
index 638b685..12b6ee8 100644
--- a/gio/gunixfdlist.h
+++ b/gio/gunixfdlist.h
@@ -23,7 +23,7 @@
 #ifndef __G_UNIX_FD_LIST_H__
 #define __G_UNIX_FD_LIST_H__
 
-#include <glib-object.h>
+#include <gio/gio.h>
 
 G_BEGIN_DECLS
 
@@ -41,7 +41,6 @@ G_BEGIN_DECLS
 
 typedef struct _GUnixFDListPrivate                       GUnixFDListPrivate;
 typedef struct _GUnixFDListClass                         GUnixFDListClass;
-typedef struct _GUnixFDList                              GUnixFDList;
 
 struct _GUnixFDListClass
 {
diff --git a/gio/gunixfdmessage.c b/gio/gunixfdmessage.c
index bb37d5f..5413be3 100644
--- a/gio/gunixfdmessage.c
+++ b/gio/gunixfdmessage.c
@@ -39,6 +39,7 @@
 #include <errno.h>
 
 #include "gunixfdmessage.h"
+#include "gunixfdlist.h"
 #include "gioerror.h"
 
 #include "gioalias.h"
diff --git a/gio/gunixfdmessage.h b/gio/gunixfdmessage.h
index 44b47c1..3bfa058 100644
--- a/gio/gunixfdmessage.h
+++ b/gio/gunixfdmessage.h
@@ -23,8 +23,8 @@
 #ifndef __G_UNIX_FD_MESSAGE_H__
 #define __G_UNIX_FD_MESSAGE_H__
 
-#include <gio/gunixfdlist.h>
 #include <gio/gio.h>
+#include <gio/gunixfdlist.h>
 
 G_BEGIN_DECLS
 
diff --git a/gio/tests/gdbus-example-unix-fd-client.c b/gio/tests/gdbus-example-unix-fd-client.c
index 21e199e..500058b 100644
--- a/gio/tests/gdbus-example-unix-fd-client.c
+++ b/gio/tests/gdbus-example-unix-fd-client.c
@@ -7,6 +7,7 @@
 #include <time.h>
 
 #include <gio/gio.h>
+#include <gio/gunixfdlist.h>
 
 /* see gdbus-example-server.c for the server implementation */
 static gint
diff --git a/gio/tests/gdbus-peer.c b/gio/tests/gdbus-peer.c
index 63ddc6d..929d5c2 100644
--- a/gio/tests/gdbus-peer.c
+++ b/gio/tests/gdbus-peer.c
@@ -30,6 +30,7 @@
 #include <fcntl.h>
 
 #include <gio/gunixsocketaddress.h>
+#include <gio/gunixfdlist.h>
 
 #include "gdbus-tests.h"
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]