]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/macros.h
fix macro definition for very old GCC < 3
[apt.git] / apt-pkg / contrib / macros.h
index d97053553544ae21f04235d0a57dbfc593be709a..2f9c6c26930ab953c4cb86bdb921ad7be8d9f66e 100644 (file)
        #define APT_MUSTCHECK           __attribute__((warn_unused_result))
 #else
        #define APT_NONNULL(...)
-       #define APT_REQRET
+       #define APT_MUSTCHECK
 #endif
 
 #if APT_GCC_VERSION >= 0x0400
        #define APT_SENTINEL    __attribute__((sentinel))
+       #define APT_PUBLIC __attribute__ ((visibility ("default")))
+       #define APT_HIDDEN __attribute__ ((visibility ("hidden")))
 #else
        #define APT_SENTINEL
+       #define APT_PUBLIC
+       #define APT_HIDDEN
 #endif
 
 // cold functions are unlikely() to be called
 #endif
 #endif
 
+#if __GNUC__ >= 4
+       #define APT_IGNORE_DEPRECATED_PUSH \
+               _Pragma("GCC diagnostic push") \
+               _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
+       #define APT_IGNORE_DEPRECATED_POP \
+               _Pragma("GCC diagnostic pop")
+       #define APT_IGNORE_DEPRECATED(XXX) \
+               APT_IGNORE_DEPRECATED_PUSH \
+               XXX \
+               APT_IGNORE_DEPRECATED_POP
+#else
+       #define APT_IGNORE_DEPRECATED_PUSH
+       #define APT_IGNORE_DEPRECATED_POP
+       #define APT_IGNORE_DEPRECATED(XXX) XXX
+#endif
+
 // These lines are extracted by the makefiles and the buildsystem
 // Increasing MAJOR or MINOR results in the need of recompiling all
 // reverse-dependencies of libapt-pkg against the new SONAME.
 // Non-ABI-Breaks should only increase RELEASE number.
 // See also buildlib/libversion.mak
 #define APT_PKG_MAJOR 4
-#define APT_PKG_MINOR 12
+#define APT_PKG_MINOR 15
 #define APT_PKG_RELEASE 0
+#define APT_PKG_ABI ((APT_PKG_MAJOR * 100) + APT_PKG_MINOR)
 
 #endif