NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: standards/45258: #include <string.h> -> <strings.h> -> <stdint.h>



The following reply was made to PR standards/45258; it has been noted by GNATS.

From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: standards/45258: #include <string.h> -> <strings.h> -> <stdint.h>
Date: Tue, 16 Aug 2011 01:39:10 +0000

 On Tue, Aug 16, 2011 at 01:30:00AM +0000, dholland%eecs.harvard.edu@localhost 
wrote:
  > Either remove <strings.h> from <string.h>, which is probably not a
  > viable proposition, or fix <strings.h> not to spew into the namespace.
 
 This should do it, but I haven't tested for build fallout yet. There
 will probably be some.
 
 Any objections?
 
 Index: strings.h
 ===================================================================
 RCS file: /cvsroot/src/include/strings.h,v
 retrieving revision 1.17
 diff -u -r1.17 strings.h
 --- strings.h  19 Aug 2009 04:22:53 -0000      1.17
 +++ strings.h  16 Aug 2011 01:37:49 -0000
 @@ -46,7 +46,7 @@
  
  #include <sys/cdefs.h>
  
 -#include <stdint.h>
 +#include <machine/int_types.h>
  
  __BEGIN_DECLS
  int    bcmp(const void *, const void *, size_t);
 @@ -57,8 +57,8 @@
  unsigned int  popcount(unsigned int) __constfunc;
  unsigned int  popcountl(unsigned long) __constfunc;
  unsigned int  popcountll(unsigned long long) __constfunc;
 -unsigned int  popcount32(uint32_t) __constfunc;
 -unsigned int  popcount64(uint64_t) __constfunc;
 +unsigned int  popcount32(__uint32_t) __constfunc;
 +unsigned int  popcount64(__uint64_t) __constfunc;
  char  *rindex(const char *, int);
  int    strcasecmp(const char *, const char *);
  int    strncasecmp(const char *, const char *, size_t);
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index