DBusPipe related unix compile fix
authorRalf Habacker <ralf.habacker@freenet.de>
Fri, 18 Dec 2009 16:35:43 +0000 (17:35 +0100)
committerRalf Habacker <ralf.habacker@freenet.de>
Fri, 18 Dec 2009 16:35:43 +0000 (17:35 +0100)
bus/bus.h
dbus/dbus-macros.h
dbus/dbus-pipe-unix.c
dbus/dbus-string.h
dbus/dbus-sysdeps.h

index 94c64c7..aade920 100644 (file)
--- a/bus/bus.h
+++ b/bus/bus.h
@@ -29,6 +29,7 @@
 #include <dbus/dbus.h>
 #include <dbus/dbus-string.h>
 #include <dbus/dbus-mainloop.h>
+#include <dbus/dbus-pipe.h>
 
 typedef struct BusActivation    BusActivation;
 typedef struct BusConnections   BusConnections;
index 497dd45..379c4e2 100644 (file)
 #  define _DBUS_GNUC_EXTENSION
 #endif
 
+#if     __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
+#define _DBUS_GNUC_PRINTF( format_idx, arg_idx )    \
+  __attribute__((__format__ (__printf__, format_idx, arg_idx)))
+#define _DBUS_GNUC_NORETURN                         \
+  __attribute__((__noreturn__))
+#else   /* !__GNUC__ */
+#define _DBUS_GNUC_PRINTF( format_idx, arg_idx )
+#define _DBUS_GNUC_NORETURN
+#endif  /* !__GNUC__ */
+
+/** @def _DBUS_GNUC_PRINTF
+ * used to tell gcc about printf format strings
+ */
+/** @def _DBUS_GNUC_NORETURN
+ * used to tell gcc about functions that never return, such as _dbus_abort()
+ */
+
+
 /* Normally docs are in .c files, but there isn't a .c file for this. */
 /**
  * @defgroup DBusMacros Utility macros
index f3f5e5e..79a826f 100644 (file)
@@ -26,8 +26,9 @@
 #include "dbus-string.h"
 #include "dbus-internals.h"
 #include "dbus-pipe.h"
+#include "dbus-sysdeps-unix.h"
 
-#include <io.h>
+#include <errno.h>
 
 /**
  * write data to a pipe.
index b185027..7c30111 100644 (file)
@@ -27,9 +27,9 @@
 
 #include <config.h>
 
-#include <dbus/dbus-memory.h>
+#include <dbus/dbus-macros.h>
 #include <dbus/dbus-types.h>
-#include <dbus/dbus-sysdeps.h>
+#include <dbus/dbus-memory.h>
 
 #include <stdarg.h>
 
@@ -38,6 +38,9 @@ DBUS_BEGIN_DECLS
 /**
  * DBusString object
  */
+
+typedef struct DBusString DBusString;
+
 struct DBusString
 {
   const void *dummy1; /**< placeholder */
index 9ed6bae..c8daa25 100644 (file)
@@ -62,6 +62,7 @@
 /** @} */
 
 #include <dbus/dbus-errors.h>
+#include <dbus/dbus-string.h>
 #include <dbus/dbus-pipe.h>
 
 /* this is perhaps bogus, but strcmp() etc. are faster if we use the
@@ -89,8 +90,6 @@ DBUS_BEGIN_DECLS
 
 /* Forward declarations */
 
-/** An opaque string type */
-typedef struct DBusString DBusString;
 
 /** An opaque list type */
 typedef struct DBusList DBusList;