From owner-freebsd-standards@FreeBSD.ORG Wed Feb 25 16:00:34 2004 Return-Path: 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 CD98E16A4CF for ; Wed, 25 Feb 2004 16:00:34 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C63B843D1F for ; Wed, 25 Feb 2004 16:00:34 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i1Q00Ybv089057 for ; Wed, 25 Feb 2004 16:00:34 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i1Q00YmS089056; Wed, 25 Feb 2004 16:00:34 -0800 (PST) (envelope-from gnats) Resent-Date: Wed, 25 Feb 2004 16:00:34 -0800 (PST) Resent-Message-Id: <200402260000.i1Q00YmS089056@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Stefan Farfeleder Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D41CD16A4CE for ; Wed, 25 Feb 2004 16:00:03 -0800 (PST) Received: from laika.ifs.tuwien.ac.at (laika.ifs.tuwien.ac.at [128.131.167.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D99943D1D for ; Wed, 25 Feb 2004 16:00:03 -0800 (PST) (envelope-from stefan@fafoe.dyndns.org) Received: from fafoe.narf.at (unknown [212.186.3.235]) by laika.ifs.tuwien.ac.at (Postfix) with ESMTP id 032C420A9 for ; Thu, 26 Feb 2004 01:02:12 +0100 (CET) Received: from frog.fafoe.narf.at (frog.fafoe.narf.at [192.168.2.101]) by fafoe.narf.at (Postfix) with ESMTP id 55169410E; Thu, 26 Feb 2004 00:59:48 +0100 (CET) Received: by frog.fafoe.narf.at (Postfix, from userid 1001) id A3DD57E46; Thu, 26 Feb 2004 00:59:46 +0100 (CET) Message-Id: <20040225235946.A3DD57E46@frog.fafoe.narf.at> Date: Thu, 26 Feb 2004 00:59:46 +0100 (CET) From: Stefan Farfeleder To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: stefan@fafoe.narf.at Subject: standards/63371: [patch] isblank() not in C99/SUSv3 namespace X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Stefan Farfeleder List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Feb 2004 00:00:35 -0000 >Number: 63371 >Category: standards >Synopsis: [patch] isblank() not in C99/SUSv3 namespace >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Feb 25 16:00:34 PST 2004 >Closed-Date: >Last-Modified: >Originator: Stefan Farfeleder >Release: FreeBSD 5.2-CURRENT i386 >Organization: >Environment: System: FreeBSD frog.fafoe.narf.at 5.2-CURRENT FreeBSD 5.2-CURRENT #25: Mon Feb 23 11:19:34 CET 2004 freebsd@frog.fafoe.narf.at:/freebsd/frog/obj/freebsd/frog/src/sys/FROG i386 >Description: C99 standardised the isblank() macro/function which is currently protected by the __BSD_VISIBLE macro and thus fails to be visible in a strict C99/SUSv3 compilation environment. >How-To-Repeat: $ cat isblank.c #include int main(void) { return isblank('a'); } $ c99 -D_C99_SOURCE isblank.c isblank.c: In function `main': isblank.c:2: warning: implicit declaration of function `isblank' $ c99 -D_POSIX_C_SOURCE=200112L isblank.c isblank.c: In function `main': isblank.c:2: warning: implicit declaration of function `isblank' >Fix: --- isblank.diff begins here --- Index: src/include/ctype.h =================================================================== RCS file: /usr/home/ncvs/src/include/ctype.h,v retrieving revision 1.24 diff -u -r1.24 ctype.h --- src/include/ctype.h 9 Sep 2002 05:38:05 -0000 1.24 +++ src/include/ctype.h 25 Feb 2004 23:18:33 -0000 @@ -89,9 +89,12 @@ int toascii(int); #endif +#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 +int isblank(int); +#endif + #if __BSD_VISIBLE int digittoint(int); -int isblank(int); int ishexnumber(int); int isideogram(int); int isnumber(int); @@ -133,9 +136,12 @@ #define toascii(c) ((c) & 0x7F) #endif +#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 +#define isblank(c) __istype((c), _CTYPE_B) +#endif + #if __BSD_VISIBLE #define digittoint(c) __maskrune((c), 0xFF) -#define isblank(c) __istype((c), _CTYPE_B) #define ishexnumber(c) __istype((c), _CTYPE_X) #define isideogram(c) __istype((c), _CTYPE_I) #define isnumber(c) __istype((c), _CTYPE_D) --- isblank.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: