Date: Sun, 3 Nov 1996 23:45:48 -0800 (PST) From: jehamby@lightside.com To: FreeBSD-gnats-submit@freebsd.org Subject: bin/1954: Minor string.h patch for POSIX Message-ID: <199611040745.XAA00387@hamby1.lightside.net> Resent-Message-ID: <199611041600.IAA26543@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 1954 >Category: bin >Synopsis: Fix string.h to be POSIX compliant >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Nov 4 08:00:03 PST 1996 >Last-Modified: >Originator: Jake Hamby >Organization: JPL >Release: FreeBSD 3.0-CURRENT i386 >Environment: FreeBSD-current >Description: string.h defines a number of nonstandard routines unless _ANSI_SOURCE is defined. It should also not define them if _POSIX_SOURCE is defined. >How-To-Repeat: Try compiling a POSIX-compliant program (like ETET) which includes a replacement for a function like strcasecmp(). You'll probably get a function prototype mismatch (mainly because FreeBSD uses const char *, while a POSIX program is likely to declare it with char *). >Fix: Apply this one-line patch: *** string.h.orig Sun Nov 3 16:36:07 1996 --- string.h Sun Nov 3 16:37:00 1996 *************** *** 73,79 **** size_t strxfrm __P((char *, const char *, size_t)); /* Nonstandard routines */ ! #ifndef _ANSI_SOURCE int bcmp __P((const void *, const void *, size_t)); void bcopy __P((const void *, void *, size_t)); void bzero __P((void *, size_t)); --- 73,79 ---- size_t strxfrm __P((char *, const char *, size_t)); /* Nonstandard routines */ ! #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) int bcmp __P((const void *, const void *, size_t)); void bcopy __P((const void *, void *, size_t)); void bzero __P((void *, size_t)); >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611040745.XAA00387>