]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
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 94c64c7ebd53882fc584b8ead4825de34563d3c9..aade920cb65a2636305b88954d254963ba680cf6 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 497dd45098b0822a82daef54f877baafbeb80d11..379c4e241773a012cad51318c4c185a85e532c7d 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 f3f5e5eb44b42de1dd0f228e0ad2c2e631f8640a..79a826f554ae715660ca5271ebb6235c56aecafe 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 b1850274d15581a1f54dcae7e126254d85c2f1bc..7c3011191d914e9a5a9586982a3465711397281d 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 9ed6bae3abcceae30572fd0b8d10dd45183301fd..c8daa25ae74bbdd98727989058536e6348f45723 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;