summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2007-06-17 16:43:39 +0000
committerRalf Habacker <ralf.habacker@freenet.de>2007-06-17 16:43:39 +0000
commitfb93e1faa875d6b1ca48b0e792a9b79aa7cbc517 (patch)
treea75f3e860b4739907b85c8972abb1feffd05fdcf
parent938cc4c7b3a06ded1d76142000ee55356f4f7776 (diff)
* dbus/dbus-macros.h, dbus/dbus-message.c, dbus/dbus-message.h: renamed DBUS_GNUC_DEPRECATED to DBUS_DEPRECATED and extended to msvc compiler
-rw-r--r--ChangeLog6
-rw-r--r--dbus/dbus-macros.h10
-rw-r--r--dbus/dbus-message.c2
-rw-r--r--dbus/dbus-message.h2
4 files changed, 14 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 0450aaaa..93982b72 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-06-16 Ralf Habacker <ralf.habacker@freenet.de>
+
+ * dbus/dbus-macros.h, dbus/dbus-message.c,
+ dbus/dbus-message.h: renamed DBUS_GNUC_DEPRECATED
+ to DBUS_DEPRECATED and extended to msvc compiler
+
2007-06-15 Ralf Habacker <ralf.habacker@freenet.de>
* cmake/CMakeLists.txt: use local include header first
diff --git a/dbus/dbus-macros.h b/dbus/dbus-macros.h
index 5d9524e1..724cc18c 100644
--- a/dbus/dbus-macros.h
+++ b/dbus/dbus-macros.h
@@ -51,9 +51,11 @@
#endif
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
-#define DBUS_GNUC_DEPRECATED __attribute__((__deprecated__))
+# define DBUS_DEPRECATED __attribute__ ((__deprecated__))
+#elif defined(_MSC_VER) && (_MSC_VER >= 1300)
+# define DBUS_DEPRECATED __declspec(deprecated)
#else
-#define DBUS_GNUC_DEPRECATED
+# define DBUS_DEPRECATED
#endif
/* Normally docs are in .c files, but there isn't a .c file for this. */
@@ -103,9 +105,9 @@
* A null pointer, defined appropriately for C or C++.
*/
/**
- * @def DBUS_GNUC_DEPRECATED
+ * @def DBUS_DEPRECATED
*
- * Tells gcc to warn about a function or type if it's used.
+ * Tells the compiler to warn about a function or type if it's used.
* Code marked in this way should also be enclosed in
* @code
* #ifndef DBUS_DISABLE_DEPRECATED
diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c
index c728d6d3..394645ca 100644
--- a/dbus/dbus-message.c
+++ b/dbus/dbus-message.c
@@ -1256,7 +1256,7 @@ dbus_message_new_error (DBusMessage *reply_to,
* aside from the printf formatting.
*
* @todo add _DBUS_GNUC_PRINTF to this (requires moving _DBUS_GNUC_PRINTF to
- * public header, see DBUS_GNUC_DEPRECATED for an example)
+ * public header, see DBUS_DEPRECATED for an example)
*
* @param reply_to the original message
* @param error_name the error name
diff --git a/dbus/dbus-message.h b/dbus/dbus-message.h
index a3229c57..c66b30db 100644
--- a/dbus/dbus-message.h
+++ b/dbus/dbus-message.h
@@ -173,7 +173,7 @@ void dbus_message_iter_get_basic (DBusMessageIter *iter,
/* This function returns the wire protocol size of the array in bytes,
* you do not want to know that probably
*/
-int dbus_message_iter_get_array_len (DBusMessageIter *iter) DBUS_GNUC_DEPRECATED;
+DBUS_DEPRECATED int dbus_message_iter_get_array_len (DBusMessageIter *iter);
#endif
void dbus_message_iter_get_fixed_array (DBusMessageIter *iter,
void *value,