Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Jan 2003 10:53:36 -0500 (EST)
From:      Brian Minard <bminard@certicom.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   i386/47300: -Wundef generates warning when compiling with /usr/include/sys/cdefs.h
Message-ID:  <200301211553.h0LFrZeI069183@ce00182.certicom.com>

next in thread | raw e-mail | index | archive | help

>Number:         47300
>Category:       i386
>Synopsis:       -Wundef generates warning when compiling with /usr/include/sys/cdefs.h
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 21 08:00:17 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Brian Minard
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
Certicom Corp.
>Environment:
System: FreeBSD 4.7-STABLE FreeBSD 4.7-STABLE: Sun Dec 1 07:30:05 EST 2002 i386


>Description:
	Using the GCC compiler option -Wundef on source using the file
	/usr/include/sys/cdefs.h causes a compiler warning.
>How-To-Repeat:
	Use the named compiler option when compiling a program requiring said file.
>Fix:

Apply the following patch:


Index: cdefs.h
===================================================================
RCS file: /home/ncvs/src/sys/sys/cdefs.h,v
retrieving revision 1.28.2.8
diff -c -r1.28.2.8 cdefs.h
*** cdefs.h	2002/09/18 04:05:13	1.28.2.8
--- cdefs.h	2003/01/21 15:24:35
***************
*** 270,275 ****
--- 270,276 ----
   */
  
  /* Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. */
+ #ifdef _POSIX_C_SOURCE
  #if _POSIX_C_SOURCE == 1
  #undef _POSIX_C_SOURCE		/* Probably illegal, but beyond caring now. */
  #define	_POSIX_C_SOURCE		199009
***************
*** 279,284 ****
--- 280,286 ----
  #if _POSIX_C_SOURCE == 2
  #undef _POSIX_C_SOURCE
  #define	_POSIX_C_SOURCE		199209
+ #endif
  #endif
  
  /* Deal with various X/Open Portability Guides and Single UNIX Spec. */

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200301211553.h0LFrZeI069183>