From owner-freebsd-standards Sat Mar 30 21:20:16 2002 Delivered-To: freebsd-standards@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 9244737B41D for ; Sat, 30 Mar 2002 21:20:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g2V5K1192445; Sat, 30 Mar 2002 21:20:01 -0800 (PST) (envelope-from gnats) Received: from treetop.robbins.dropbear.id.au (189.c.005.mel.iprimus.net.au [210.50.42.189]) by hub.freebsd.org (Postfix) with ESMTP id 8614037B405 for ; Sat, 30 Mar 2002 21:16:37 -0800 (PST) Received: from treetop.robbins.dropbear.id.au (localhost [127.0.0.1]) by treetop.robbins.dropbear.id.au (8.12.2/8.12.2) with ESMTP id g2V5LwMg003713 for ; Sun, 31 Mar 2002 15:21:58 +1000 (EST) (envelope-from tim@treetop.robbins.dropbear.id.au) Received: (from tim@localhost) by treetop.robbins.dropbear.id.au (8.12.2/8.12.2/Submit) id g2V5LvFr003712; Sun, 31 Mar 2002 15:21:57 +1000 (EST) Message-Id: <200203310521.g2V5LvFr003712@treetop.robbins.dropbear.id.au> Date: Sun, 31 Mar 2002 15:21:57 +1000 (EST) From: "Tim J. Robbins" Reply-To: "Tim J. Robbins" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: standards/36559: XSI is incorrect 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: 36559 >Category: standards >Synopsis: XSI is incorrect >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: Sat Mar 30 21:20:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Tim J. Robbins >Release: FreeBSD 4.5-STABLE i386 >Organization: >Environment: System: FreeBSD treetop.robbins.dropbear.id.au 4.5-STABLE FreeBSD 4.5-STABLE #2: Sat Mar 30 20:10:51 EST 2002 tim@treetop.robbins.dropbear.id.au:/usr/obj/usr/src/sys/GENERIC i386 >Description: is effectively an alias for , which is not what the P1003.1-2001 standard asks for (strings.h is an XSI extension). >How-To-Repeat: strings.h shouldn't define NULL, for example: #include int main(void) { int NULL; NULL = 0; return (0); } >Fix: Here is a proper header: /* * This file is in the public domain. * * $FreeBSD$ */ #ifndef _STRINGS_H_ #define _STRINGS_H_ #include #include #ifdef _BSD_SIZE_T_ typedef _BSD_SIZE_T_ size_t; #undef _BSD_SIZE_T_ #endif __BEGIN_DECLS int bcmp(const void *, const void *, size_t); void bcopy(const void *, void *, size_t); void bzero(void *, size_t); int ffs(int); char *index(const char *, int); char *rindex(const char *, int); int strcasecmp(const char *, const char *); int strncasecmp(const char *, const char *, size_t); __END_DECLS /* * Previous versions of included . */ #if !defined(_XOPEN_SOURCE) || _XOPEN_SOURCE < 420L #include #endif #endif /* _STRINGS_H_ */ >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message