Date: Sat, 30 Aug 2003 14:19:14 -0500 (CDT) From: Larry Rosenman <ler@lerctr.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: misc/56206: src/sys/sys/cdefs.h uses PreProcessor variables that aren't defined, causing noisy warnings. Message-ID: <200308301919.h7UJJElh003555@lerlaptop.lerctr.org> Resent-Message-ID: <200308301920.h7UJKEOL049955@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 56206 >Category: misc >Synopsis: src/sys/sys/cdefs.h uses PreProcessor variables that aren't defined, causing noisy warnings. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Aug 30 12:20:14 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Larry Rosenman >Release: FreeBSD 5.1-CURRENT i386 >Organization: LERCTR Consulting >Environment: System: FreeBSD lerlaptop.lerctr.org 5.1-CURRENT FreeBSD 5.1-CURRENT #42: Fri Aug 29 19:27:56 CDT 2003 ler@lerlaptop.lerctr.org:/usr/obj/usr/src/sys/LERLAPTOP i386 >Description: the /usr/include/sys/cdefs.h file uses __STD_C__ and _POSIX_C_SOURCE variables without them being defined. This causes noise that is unneeded. The following patch shuts it up, and is functionally equivalent. Can we get this applied? >How-To-Repeat: compile KDE and see all the warnings. >Fix: --- /usr/src/sys/sys/cdefs.h.orig Sun Jul 27 08:03:46 2003 +++ /usr/src/sys/sys/cdefs.h Sat Aug 30 14:11:09 2003 @@ -171,7 +171,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 @@ -323,13 +323,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 >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200308301919.h7UJJElh003555>