|
@@ -27,19 +27,23 @@
|
|
|
|
|
|
|
|
/* Language definitions. */
|
|
/* Language definitions. */
|
|
|
|
|
|
|
|
-#if HAVE_C_ATTRIBUTE
|
|
|
|
|
|
|
+#if defined(__GNUC__) && (__GNUC__ >= 3)
|
|
|
#define DPKG_ATTR_UNUSED __attribute__((unused))
|
|
#define DPKG_ATTR_UNUSED __attribute__((unused))
|
|
|
#define DPKG_ATTR_CONST __attribute__((const))
|
|
#define DPKG_ATTR_CONST __attribute__((const))
|
|
|
#define DPKG_ATTR_NORET __attribute__((noreturn))
|
|
#define DPKG_ATTR_NORET __attribute__((noreturn))
|
|
|
#define DPKG_ATTR_PRINTF(n) __attribute__((format(printf, n, n + 1)))
|
|
#define DPKG_ATTR_PRINTF(n) __attribute__((format(printf, n, n + 1)))
|
|
|
#define DPKG_ATTR_VPRINTF(n) __attribute__((format(printf, n, 0)))
|
|
#define DPKG_ATTR_VPRINTF(n) __attribute__((format(printf, n, 0)))
|
|
|
-#define DPKG_ATTR_SENTINEL __attribute__((sentinel))
|
|
|
|
|
#else
|
|
#else
|
|
|
#define DPKG_ATTR_UNUSED
|
|
#define DPKG_ATTR_UNUSED
|
|
|
#define DPKG_ATTR_CONST
|
|
#define DPKG_ATTR_CONST
|
|
|
#define DPKG_ATTR_NORET
|
|
#define DPKG_ATTR_NORET
|
|
|
#define DPKG_ATTR_PRINTF(n)
|
|
#define DPKG_ATTR_PRINTF(n)
|
|
|
#define DPKG_ATTR_VPRINTF(n)
|
|
#define DPKG_ATTR_VPRINTF(n)
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
|
|
+#if defined(__GNUC__) && (__GNUC__ >= 4)
|
|
|
|
|
+#define DPKG_ATTR_SENTINEL __attribute__((sentinel))
|
|
|
|
|
+#else
|
|
|
#define DPKG_ATTR_SENTINEL
|
|
#define DPKG_ATTR_SENTINEL
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|