about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--conform/conformtest.pl2
-rw-r--r--conform/data/string.h-data31
-rw-r--r--conform/data/strings.h-data10
-rw-r--r--string/string.h6
5 files changed, 54 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index abe8633216..1a8518db0e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2000-02-24  Ulrich Drepper  <drepper@redhat.com>
+
+	* conform/conformtest.pl (@headers): Add string.h and strings.h.
+	* conform/data/string.h-data: New file.
+	* conform/data/strings.h-data: New file.
+
+	* string/string.h [__USE_XOPEN]: Don't declare functions from
+	<strings.h> here as well.
+
 2000-02-23  Ulrich Drepper  <drepper@redhat.com>
 
 	* posix/sys/wait.h: Pretty printing.  Allow WEXITSTATUS etc be
diff --git a/conform/conformtest.pl b/conform/conformtest.pl
index 518122f645..08b46c1bf1 100644
--- a/conform/conformtest.pl
+++ b/conform/conformtest.pl
@@ -4,7 +4,7 @@ $CC = "gcc";
 $CFLAGS = "-I. '-D__attribute__(x)=' -D_XOPEN_SOURCE=500";
 
 # List of the headers we are testing.
-@headers = ("stdlib.h", "stdio.h",
+@headers = ("strings.h", "string.h", "stdlib.h", "stdio.h",
 	    "stddef.h", "stdarg.h", "signal.h", "setjmp.h", "semaphore.h",
 	    "search.h", "sched.h", "regex.h", "pwd.h", "pthread.h",
 	    "poll.h", "nl_types.h", "ndbm.h", "mqueue.h", "monetary.h",
diff --git a/conform/data/string.h-data b/conform/data/string.h-data
new file mode 100644
index 0000000000..fe27c8ab61
--- /dev/null
+++ b/conform/data/string.h-data
@@ -0,0 +1,31 @@
+constant NULL
+
+type size_t
+
+function {void*} memccpy (void*, const void*, int, size_t)
+function {void*} memchr (const void*, int, size_t)
+function int memcmp (const void*, const void*, size_t)
+function {void*} memcpy (void*, const void*, size_t)
+function {void*} memmove (void*, const void*, size_t)
+function {void*} memset (void*, int, size_t)
+function {char*} strcat (char*, const char*)
+function {char*} strchr (const char*, int)
+function int strcmp (const char*, const char*)
+function int strcoll (const char*, const char*)
+function {char*} strcpy (char*, const char*)
+function size_t strcspn (const char*, const char*)
+function {char*} strdup (const char*)
+function {char*} strerror (int)
+function size_t strlen (const char*)
+function {char*} strncat (char*, const char*, size_t)
+function int strncmp (const char*, const char*, size_t)
+function {char*} strncpy (char*, const char*, size_t)
+function {char*} strpbrk (const char*, const char*)
+function {char*} strrchr (const char*, int)
+function size_t strspn (const char*, const char*)
+function {char*} strstr (const char*, const char*)
+function {char*} strtok (char*, const char*)
+function {char*} strtok_r (char*, const char*, char**)
+function size_t strxfrm (char*, const char*, size_t)
+
+allow-header stddef.h
diff --git a/conform/data/strings.h-data b/conform/data/strings.h-data
new file mode 100644
index 0000000000..7d7d67e9ce
--- /dev/null
+++ b/conform/data/strings.h-data
@@ -0,0 +1,10 @@
+function int bcmp (const void*, const void*, size_t)
+function void bcopy (const void*, void*, size_t)
+function void bzero (void*, size_t)
+function int ffs (int)
+function {char*} index (const char*, int)
+function {char*} rindex (const char*, int)
+function int strcasecmp (const char*, const char*)
+function int strncasecmp (const char*, const char*, size_t)
+
+type size_t
diff --git a/string/string.h b/string/string.h
index 58d0e7162e..d481e3fd3d 100644
--- a/string/string.h
+++ b/string/string.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,95,96,97,98,99 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,93,95,96,97,98,99, 2000 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -230,7 +230,7 @@ extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) __THROW;
    the namespace rules does not allow this.  */
 extern void __bzero (void *__s, size_t __n) __THROW;
 
-#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+#if defined __USE_BSD
 /* Copy N bytes of SRC to DEST (like memmove, but args reversed).  */
 extern void bcopy (__const void *__src, void *__dest, size_t __n) __THROW;
 
@@ -268,7 +268,7 @@ extern int strcasecmp (__const char *__s1, __const char *__s2) __THROW;
 /* Compare no more than N chars of S1 and S2, ignoring case.  */
 extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
      __THROW;
-#endif /* Use BSD or X/Open Unix.  */
+#endif /* Use BSD.  */
 
 #ifdef	__USE_GNU
 /* Again versions of a few functions which use the given locale instead