summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2003-10-31 05:42:53 +0000
committerpeter <peter@FreeBSD.org>2003-10-31 05:42:53 +0000
commitc91d4042c44e92451c3886f911848e1db315d2a3 (patch)
treee7e5e83a829a054882f099082b63a69b6a3e9ec7
parent2a6ec0ca670ecd9fe07027def7afe3b818e3c674 (diff)
downloadFreeBSD-src-c91d4042c44e92451c3886f911848e1db315d2a3.zip
FreeBSD-src-c91d4042c44e92451c3886f911848e1db315d2a3.tar.gz
While not illegal, attempt to pacify gcc -Wundef. It just so happens
that libtool-using packages seem to love using this flag. /usr/include/sys/cdefs.h:184:5: warning: "__STDC_VERSION__" is not defined /usr/include/sys/cdefs.h:372:5: warning: "_POSIX_C_SOURCE" is not defined /usr/include/sys/cdefs.h:378:5: warning: "_POSIX_C_SOURCE" is not defined
-rw-r--r--sys/sys/cdefs.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
index 7d0c953..f8eae84 100644
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -181,7 +181,7 @@
* software that is unaware of C99 keywords.
*/
#if !(__GNUC__ == 2 && __GNUC_MINOR__ == 95)
-#if __STDC_VERSION__ < 199901
+#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901
#define __restrict
#else
#define __restrict restrict
@@ -369,13 +369,13 @@
*/
/* Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. */
-#if _POSIX_C_SOURCE == 1
+#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 1
#undef _POSIX_C_SOURCE /* Probably illegal, but beyond caring now. */
#define _POSIX_C_SOURCE 199009
#endif
/* Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. */
-#if _POSIX_C_SOURCE == 2
+#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 2
#undef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 199209
#endif
OpenPOWER on IntegriCloud