aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2012-04-14 15:12:30 +0200
committerYang Tse <yangsita@gmail.com>2012-04-14 15:12:30 +0200
commit48d13b44c660cdefaf1a921c974f43ee4df346a2 (patch)
treef1326db7842054f785921620f6dc827665b844ca /lib
parent8b63b48627961c0bf880eb4d57cf24d6a828dcd2 (diff)
headers: require GCC 2.7 or newer in order to allow attribute GCC'isms usage
Usage in other code paths already protected and requiring even newer versions.
Diffstat (limited to 'lib')
-rw-r--r--lib/setup.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/setup.h b/lib/setup.h
index 4bce5a93f..732b1a3b4 100644
--- a/lib/setup.h
+++ b/lib/setup.h
@@ -605,13 +605,17 @@ int netware_init(void);
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#endif
-/* Provide a mechanism to silence picky compilers, such as gcc 4.6+.
- Parameters should of course normally not be unused, but for example when we
- have multiple implementations of the same interface it may happen. */
-#ifndef __GNUC__
-#define UNUSED_PARAM /*NOTHING*/
+/*
+ * Provide a mechanism to silence picky compilers, such as gcc 4.6+.
+ * Parameters should of course normally not be unused, but for example when
+ * we have multiple implementations of the same interface it may happen.
+ */
+
+#if defined(__GNUC__) && ((__GNUC__ >= 3) || \
+ ((__GNUC__ == 2) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 7)))
+# define UNUSED_PARAM __attribute__((__unused__))
#else
-#define UNUSED_PARAM __attribute__((__unused__))
+# define UNUSED_PARAM /*NOTHING*/
#endif
/*