From owner-freebsd-standards Mon Mar 24 9:30:17 2003 Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 964B137B401 for ; Mon, 24 Mar 2003 09:30:13 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F9BE43FBF for ; Mon, 24 Mar 2003 09:30:11 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h2OHUBNS035217 for ; Mon, 24 Mar 2003 09:30:11 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h2OHUBdi035216; Mon, 24 Mar 2003 09:30:11 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9A19637B401 for ; Mon, 24 Mar 2003 09:25:20 -0800 (PST) Received: from mail.cs.tu-berlin.de (mail.cs.tu-berlin.de [130.149.17.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 508F743FA3 for ; Mon, 24 Mar 2003 09:25:18 -0800 (PST) (envelope-from boris@cs.tu-berlin.de) Received: from fiesta.cs.tu-berlin.de (daemon@fiesta.cs.tu-berlin.de [130.149.17.4]) by mail.cs.tu-berlin.de (8.9.3/8.9.3) with ESMTP id SAA24565 for ; Mon, 24 Mar 2003 18:20:33 +0100 (MET) Received: (from boris@localhost) by fiesta.cs.tu-berlin.de (8.11.6+Sun/8.9.3) id h2OHKXo02811 for FreeBSD-gnats-submit@freebsd.org; Mon, 24 Mar 2003 18:20:33 +0100 (MET) Message-Id: <20030324172032.GA2128@fiesta.cs.tu-berlin.de> Date: Mon, 24 Mar 2003 18:20:33 +0100 From: Boris Nikolaus Reply-To: Boris Nikolaus To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: standards/50257: _POSIX_C_SOURCE is undefined warnings in sys/cdefs.h when -Wundef enabled X-Spam-Status: No, hits=-0.8 required=5.0 tests=RESENT_TO version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >Number: 50257 >Category: standards >Synopsis: _POSIX_C_SOURCE is undefined warnings in sys/cdefs.h when -Wundef enabled >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Mar 24 09:30:10 PST 2003 >Closed-Date: >Last-Modified: >Originator: Boris Nikolaus >Release: FreeBSD 4.8-RC i386 >Organization: >Environment: System: FreeBSD XXXXXX 4.8-RC FreeBSD 4.8-RC #1: Tue Mar 18 11:49:23 CET 2003 root@XXXXXX:/usr/src/sys/compile/XXXXXX i386 >Description: When sys/cdefs.h is included (e. g. from sys/types.h) and gcc's warning option -Wundef is enabled, you get the following output: In file included from /usr/include/sys/types.h:45, from tst.c:1: /usr/include/sys/cdefs.h:273: warning: `_POSIX_C_SOURCE' is not defined /usr/include/sys/cdefs.h:279: warning: `_POSIX_C_SOURCE' is not defined >How-To-Repeat: echo "#include " >tst.c gcc -c -Wundef tst.c >Fix: Replace #if _POSIX_C_SOURCE == 1 by #if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 1 (and similar for "== 2") in sys/cdefs.h. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message