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]

[patch] string.h/strings.h


Hi again,

this is the next bunch of string.h/strings.h patches.

It adds #include <strings.h> to assure these files receive the prototypes/declarations of "string/strings family" functions, POSIX has moved.

Ralf
2011-08-20  Ralf Corsépius <ralf.corsepius@rtems.org>

	* libc/string/index.c: Include <strings.h> for "index".
	* libc/string/rindex.c: Include <strings.h> for "rindex".
	* libc/string/strcasecmp.c: Include <strings.h> for "strcasecmp".
	Don't include <string.h>.
	* libc/string/strncasecmp.c: Include <strings.h> for "strncasecmp".
	Don't include <string.h>.
	* libc/string/bzero.c: Include <strings.h> for "bzero".
	Don't include <string.h>
	* libc/misc/ffs.c: Include <strings.h> for "ffs".
	Don't include <_ansi.h>.

Index: libc/misc/ffs.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/misc/ffs.c,v
retrieving revision 1.2
diff -u -r1.2 ffs.c
--- libc/misc/ffs.c	6 Jun 2003 19:57:51 -0000	1.2
+++ libc/misc/ffs.c	20 Aug 2011 03:58:01 -0000
@@ -24,7 +24,7 @@
 
 No supporting OS subroutines are required.  */
 
-#include <_ansi.h>
+#include <strings.h>
 
 int
 _DEFUN(ffs, (word),
Index: libc/string/bzero.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/string/bzero.c,v
retrieving revision 1.2
diff -u -r1.2 bzero.c
--- libc/string/bzero.c	23 May 2002 18:46:04 -0000	1.2
+++ libc/string/bzero.c	20 Aug 2011 03:58:01 -0000
@@ -30,7 +30,7 @@
 <<bzero>> requires no supporting OS subroutines.
 */
 
-#include <string.h>
+#include <strings.h>
 
 _VOID
 _DEFUN (bzero, (b, length),
Index: libc/string/index.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/string/index.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 index.c
--- libc/string/index.c	17 Feb 2000 19:39:48 -0000	1.1.1.1
+++ libc/string/index.c	20 Aug 2011 03:58:01 -0000
@@ -34,6 +34,7 @@
 */
 
 #include <string.h>
+#include <strings.h>
 
 char *
 _DEFUN (index, (s, c),
Index: libc/string/rindex.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/string/rindex.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 rindex.c
--- libc/string/rindex.c	17 Feb 2000 19:39:48 -0000	1.1.1.1
+++ libc/string/rindex.c	20 Aug 2011 03:58:01 -0000
@@ -34,6 +34,7 @@
 */
 
 #include <string.h>
+#include <strings.h>
 
 char *
 _DEFUN (rindex, (s, c),
Index: libc/string/strcasecmp.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/string/strcasecmp.c,v
retrieving revision 1.3
diff -u -r1.3 strcasecmp.c
--- libc/string/strcasecmp.c	23 Apr 2009 18:11:22 -0000	1.3
+++ libc/string/strcasecmp.c	20 Aug 2011 03:58:01 -0000
@@ -38,7 +38,7 @@
 	strcasecmp
 */
 
-#include <string.h>
+#include <strings.h>
 #include <ctype.h>
 
 int
Index: libc/string/strncasecmp.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/string/strncasecmp.c,v
retrieving revision 1.4
diff -u -r1.4 strncasecmp.c
--- libc/string/strncasecmp.c	23 Apr 2009 18:11:22 -0000	1.4
+++ libc/string/strncasecmp.c	20 Aug 2011 03:58:01 -0000
@@ -40,7 +40,7 @@
 	strncasecmp
 */
 
-#include <string.h>
+#include <strings.h>
 #include <ctype.h>
 
 int 

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