|
From: Florian F. <sou...@no...> - 2008-11-28 09:02:50
|
From: Florian Forster <oc...@ve...>
This way src/dbi_main.c can deactivate those attributes when implementing
the functions. For example, `dbi_driver_quote_string' uses
`dbi_driver_quote_string_copy', which is perfectly reasonable although
both functions are deprecated.
---
include/dbi/dbi.h.in | 14 ++++++++------
src/dbi_main.c | 2 ++
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/include/dbi/dbi.h.in b/include/dbi/dbi.h.in
index 3b26da5..b049844 100644
--- a/include/dbi/dbi.h.in
+++ b/include/dbi/dbi.h.in
@@ -32,12 +32,14 @@ extern "C" {
#include <time.h>
#include <limits.h> /* for the *_MAX definitions */
-#if defined _MSC_VER && _MSC_VER >= 1300
-#define LIBDBI_API_DEPRECATED __declspec(deprecated)
-#elif defined __GNUC__ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2))
-#define LIBDBI_API_DEPRECATED __attribute__((__deprecated__))
-#else
-#define LIBDBI_API_DEPRECATED
+#ifndef LIBDBI_API_DEPRECATED
+# if defined _MSC_VER && _MSC_VER >= 1300
+# define LIBDBI_API_DEPRECATED __declspec(deprecated)
+# elif defined __GNUC__ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2))
+# define LIBDBI_API_DEPRECATED __attribute__((__deprecated__))
+# else
+# define LIBDBI_API_DEPRECATED /**/
+# endif
#endif
/* opaque type definitions */
diff --git a/src/dbi_main.c b/src/dbi_main.c
index 43fc08d..1eb6819 100644
--- a/src/dbi_main.c
+++ b/src/dbi_main.c
@@ -20,6 +20,8 @@
* $Id: dbi_main.c,v 1.89 2008/11/27 21:55:57 mhoenicka Exp $
*/
+#define LIBDBI_API_DEPRECATED /**/
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
--
1.5.6.5
|