From jehamby@hamby1.lightside.net  Mon Nov  4 07:57:28 1996
Received: from hamby1.lightside.net (hamby1.lightside.net [207.67.176.17])
          by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id HAA26414
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 4 Nov 1996 07:57:26 -0800 (PST)
Received: (from jehamby@localhost) by hamby1.lightside.net (8.8.2/8.8.2) id XAA00387; Sun, 3 Nov 1996 23:45:48 -0800 (PST)
Message-Id: <199611040745.XAA00387@hamby1.lightside.net>
Date: Sun, 3 Nov 1996 23:45:48 -0800 (PST)
From: jehamby@lightside.com
Reply-To: jehamby@lightside.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: Minor string.h patch for POSIX
X-Send-Pr-Version: 3.2

>Number:         1954
>Category:       bin
>Synopsis:       Fix string.h to be POSIX compliant
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov  4 08:00:03 PST 1996
>Closed-Date:    Tue Dec 17 12:35:58 MST 1996
>Last-Modified:  Tue Dec 17 12:38:48 MST 1996
>Originator:     Jake Hamby
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
JPL
>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));

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed  
State-Changed-By: imp 
State-Changed-When: Tue Dec 17 12:35:58 MST 1996 
State-Changed-Why:  


Patch applied. 
>Unformatted:

imp says:
POSIX doesn't define these routines, so this patch is correct.
