This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] string.h/strings.h


On 08/19/2011 07:52 AM, Ralf Corsepius wrote:
Hi,

I would like to apply the patch below.

It adds #include <strings.h> to assure these files receive the
prototypes of "string/strings family" functions, POSIX has moved, but
newlib still hasn't moved.

Ralf


newlib-strings.diff



2011-08-19 Ralf CorsÃÂpius<ralf.corsepius@rtems.org>


* libc/string/bcmp.c: Include<strings.h> for "memcmp".

Wrong wording - this file needs two headers: <strings.h> for (obsolete) bcmp (missing, which meant we were implementing the function without pulling in its declaration), but <string.h> for memcmp (already present). So what you really did was:


bcmp.c: Include <strings.h> for declaration of bcmp.

* libc/string/bcopy.c: Include<strings.h> for "memmove".

Same problem with wording.


* libc/string/strcasestr.c: Include<strings.h> for "strncasecmp".

ACK.


* libc/time/strptime.c: Include<strings.h> for "strncasecmp".

ACK.




Index: libc/string/bcmp.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/string/bcmp.c,v
retrieving revision 1.3
diff -u -r1.3 bcmp.c
--- libc/string/bcmp.c	28 Oct 2005 21:21:07 -0000	1.3
+++ libc/string/bcmp.c	19 Aug 2011 13:28:35 -0000
@@ -36,6 +36,7 @@
  */

  #include<string.h>
+#include<strings.h>

ACK to the four code hunks, though - so once the changelog is fixed up for the two typos, this looks good to go.


--
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]