summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-12-21 13:48:08 -0500
committerEric S. Raymond <esr@thyrsus.com>2010-12-21 13:48:08 -0500
commita0c838056c854d9502e748c2e33a4cfc2c6c1b1f (patch)
tree2d3427f6e849edf57e8dd5894d20f1827ae7ea16
parentac8e9db008825948e528b19c6bb733c8a927176f (diff)
downloaddeheader-a0c838056c854d9502e748c2e33a4cfc2c6c1b1f.tar.gz
deheader-a0c838056c854d9502e748c2e33a4cfc2c6c1b1f.tar.bz2
deheader-a0c838056c854d9502e748c2e33a4cfc2c6c1b1f.tar.xz
deheader-a0c838056c854d9502e748c2e33a4cfc2c6c1b1f.zip
More tests in s*, and straighten out string.h vs. strings.h confusion.
-rwxr-xr-xdeheader96
-rw-r--r--test/bcmp.c2
-rw-r--r--test/bcopy.c2
-rw-r--r--test/bzero.c2
-rw-r--r--test/regress.chk19
5 files changed, 80 insertions, 41 deletions
diff --git a/deheader b/deheader
index 69a773f..d0f3659 100755
--- a/deheader
+++ b/deheader
@@ -86,9 +86,9 @@ requirements = (
# basename - return the last component of a pathname
(r"basename()", ["<libgen.h>"]),
# bcmp - memory operations
- (r"bcmp()", ["<string.h>"]),
+ (r"bcmp()", ["<strings.h>"]),
# bcopy - memory operations
- (r"bcopy()", ["<string.h>"]),
+ (r"bcopy()", ["<strings.h>"]),
# brk, sbrk - change space allocation (LEGACY)
(r"brk()", ["<unistd.h>"]),
# bsd_signal - simplified signal facilities
@@ -98,7 +98,7 @@ requirements = (
# btowc - single-byte to wide-character conversion
(r"btowc()", ["<stdio.h>", "<wchar.h>"]),
# bzero - memory operations
- (r"bzero()", ["<string.h>"]),
+ (r"bzero()", ["<strings.h>"]),
# calloc - a memory allocator
(r"calloc()", ["<stdlib.h>"]),
# catclose - close a message catalogue descriptor
@@ -787,7 +787,45 @@ requirements = (
(r"rint()", ["<math.h>"]),
# rmdir - remove a directory
("rmdir()", ["<unistd.h>"]),
-
+ # scalb - load exponent of a radix-independent floating-point number
+ (r"scalb()", ["<math.h>"]),
+ # scanf - convert formatted input
+ (r"scanf()", ["<stdio.h>"]),
+ # sched.h - execution scheduling
+ (r"sched_get_priority_max()", ["<sched.h>"]),
+ (r"sched_get_priority_min()", ["<sched.h>"]),
+ (r"sched_getparam()", ["<sched.h>"]),
+ (r"sched_getscheduler()", ["<sched.h>"]),
+ (r"sched_rr_get_interval()", ["<sched.h>"]),
+ (r"sched_setparam()", ["<sched.h>"]),
+ (r"sched_setscheduler()", ["<sched.h>"]),
+ (r"sched_yield()", ["<sched.h>"]),
+ # seekdir - set position of directory stream
+ (r"seekdir()", ["<sys/types.h>", "<dirent.h>"]),
+ # select - synchronous I/O multiplexing
+ (r"select()", ["<sys/time.h>"]),
+ # semaphore.h - semaphores
+ (r"sem_close()", ["<semaphore.h>"]),
+ (r"sem_destroy()", ["<semaphore.h>"]),
+ (r"sem_getvalue()", ["<semaphore.h>"]),
+ (r"sem_init()", ["<semaphore.h>"]),
+ (r"sem_open()", ["<semaphore.h>"]),
+ (r"sem_post()", ["<semaphore.h>"]),
+ (r"sem_trywait()", ["<semaphore.h>"]),
+ (r"sem_unlink()", ["<semaphore.h>"]),
+ (r"sem_wait()", ["<semaphore.h>"]),
+ # sys/sem.h - semaphore facility
+ (r"semctl()", ["<sys/sem.h>"]),
+ (r"semget()", ["<sys/sem.h>"]),
+ (r"semop()", ["<sys/sem.h>"]),
+ # setbuf - assign buffering to a stream
+ (r"setbuf()", ["<stdio.h>"]),
+ # setgid - set-group-ID
+ (r"setgid()", ["<sys/types.h>", "<unistd.h>"]),
+ # setgrent - reset group database to first entry
+ (r"setgrent()", ["<grp.h>"]),
+ # setkey - set encoding key
+ (r"setkey()", ["<stdlib.h>"]),
# setjmp.h - stack environment declarations
(r"longjmp()", ["<setjmp.h>"]),
@@ -797,31 +835,31 @@ requirements = (
(r"sigsetjmp()", ["<setjmp.h>"]),
(r"_setjmp()", ["<setjmp.h>"]),
# string.h - string operations
- (r"memccpy()", ["<strings.h>"]),
- (r"memchr()", ["<strings.h>"]),
- (r"memcmp()", ["<strings.h>"]),
- (r"memcpy()", ["<strings.h>"]),
- (r"memmove()", ["<strings.h>"]),
- (r"memset()", ["<strings.h>"]),
- (r"strcat()", ["<strings.h>"]),
- (r"strchr()", ["<strings.h>"]),
- (r"strcmp()", ["<strings.h>"]),
- (r"strcoll()", ["<strings.h>"]),
- (r"strcpy()", ["<strings.h>"]),
- (r"strcspn()", ["<strings.h>"]),
- (r"strdup()", ["<strings.h>"]),
- (r"strerror()", ["<strings.h>"]),
- (r"strlen()", ["<strings.h>"]),
- (r"strncat()", ["<strings.h>"]),
- (r"strncmp()", ["<strings.h>"]),
- (r"strncpy()", ["<strings.h>"]),
- (r"strpbrk()", ["<strings.h>"]),
- (r"strrchr()", ["<strings.h>"]),
- (r"strspn()", ["<strings.h>"]),
- (r"strstr()", ["<strings.h>"]),
- (r"strtok()", ["<strings.h>"]),
- (r"strtok_r()", ["<strings.h>"]),
- (r"strxfrm()", ["<strings.h>"]),
+ (r"memccpy()", ["<string.h>"]),
+ (r"memchr()", ["<string.h>"]),
+ (r"memcmp()", ["<string.h>"]),
+ (r"memcpy()", ["<string.h>"]),
+ (r"memmove()", ["<string.h>"]),
+ (r"memset()", ["<string.h>"]),
+ (r"strcat()", ["<string.h>"]),
+ (r"strchr()", ["<string.h>"]),
+ (r"strcmp()", ["<string.h>"]),
+ (r"strcoll()", ["<string.h>"]),
+ (r"strcpy()", ["<string.h>"]),
+ (r"strcspn()", ["<string.h>"]),
+ (r"strdup()", ["<string.h>"]),
+ (r"strerror()", ["<string.h>"]),
+ (r"strlen()", ["<string.h>"]),
+ (r"strncat()", ["<string.h>"]),
+ (r"strncmp()", ["<string.h>"]),
+ (r"strncpy()", ["<string.h>"]),
+ (r"strpbrk()", ["<string.h>"]),
+ (r"strrchr()", ["<string.h>"]),
+ (r"strspn()", ["<string.h>"]),
+ (r"strstr()", ["<string.h>"]),
+ (r"strtok()", ["<string.h>"]),
+ (r"strtok_r()", ["<string.h>"]),
+ (r"strxfrm()", ["<string.h>"]),
# wctype.h - wide-character classification and mapping utilities
(r"iswalnum()", ["<wctype.h>"]),
(r"iswalpha()", ["<wctype.h>"]),
diff --git a/test/bcmp.c b/test/bcmp.c
index 2f1389b..35a1be7 100644
--- a/test/bcmp.c
+++ b/test/bcmp.c
@@ -4,7 +4,7 @@
* Not-Detected-by: gcc-4.4.3 + Linux
*/
-#include <string.h>
+#include <strings.h>
main(int arg, char **argv)
{
diff --git a/test/bcopy.c b/test/bcopy.c
index c18c229..b8d735b 100644
--- a/test/bcopy.c
+++ b/test/bcopy.c
@@ -4,7 +4,7 @@
* Detected-by: gcc-4.4.3 + Linux
*/
-#include <string.h>
+#include <strings.h>
main(int arg, char **argv)
{
diff --git a/test/bzero.c b/test/bzero.c
index e1416cc..1fafa46 100644
--- a/test/bzero.c
+++ b/test/bzero.c
@@ -4,7 +4,7 @@
* Not-Detected-by: gcc-4.4.3 + Linux
*/
-#include <string.h>
+#include <strings.h>
main(int arg, char **argv)
{
diff --git a/test/regress.chk b/test/regress.chk
index 9519cdf..20e91e1 100644
--- a/test/regress.chk
+++ b/test/regress.chk
@@ -1,8 +1,8 @@
deheader: ./chdir.c has requires <unistd.h> from chdir()
deheader: ./chdir.c includes <unistd.h>
deheader: ./string.c includes <string.h>
-deheader: ./bzero.c has requires <string.h> from bzero()
-deheader: ./bzero.c includes <string.h>
+deheader: ./bzero.c has requires <strings.h> from bzero()
+deheader: ./bzero.c includes <strings.h>
deheader: ./cfsetospeed.c has requires <termios.h> from cfsetospeed()
deheader: ./cfsetospeed.c includes <termios.h>
deheader: ./duplicate.c includes <stdio.h>
@@ -25,12 +25,12 @@ deheader: ./cfgetispeed.c has requires <termios.h> from cfgetispeed()
deheader: ./cfgetispeed.c includes <termios.h>
deheader: ./a64l.c has requires <stdlib.h> from a64l()
deheader: ./a64l.c includes <stdlib.h>
-deheader: ./bcmp.c has requires <string.h> from bcmp()
-deheader: ./bcmp.c includes <string.h>
+deheader: ./bcmp.c has requires <strings.h> from bcmp()
+deheader: ./bcmp.c includes <strings.h>
deheader: ./ceil.c has requires <math.h> from ceil()
deheader: ./ceil.c includes <math.h>
-deheader: ./bcopy.c has requires <string.h> from bcopy()
-deheader: ./bcopy.c includes <string.h>
+deheader: ./bcopy.c has requires <strings.h> from bcopy()
+deheader: ./bcopy.c includes <strings.h>
deheader: ./atexit.c has requires <stdlib.h> from atexit()
deheader: ./atexit.c includes <stdlib.h>
deheader: ./btowc.c has requires <stdio.h>,<wchar.h> from btowc()
@@ -90,6 +90,7 @@ deheader: ignoring <stdio.h> (conditional inclusion)
deheader: ./bsort.c includes <string.h>
deheader: ignoring <string.h> (conditional inclusion)
deheader: ./bsort.c includes <stdlib.h>
+deheader: ./bsort.c has requires <string.h> from strcoll()
deheader: ./bsort.c has requires <stdio.h> from scanf()
deheader: ./chroot.c has requires <unistd.h> from chroot()
deheader: ./chroot.c includes <unistd.h>
@@ -130,6 +131,7 @@ deheader: in ./atan2.c, retaining required '#include <math.h>\n'
deheader: ./string.c without <string.h> succeeded.
deheader: remove <string.h> from ./string.c
deheader: in ./bsort.c, retaining required '#include <stdlib.h>\n'
+deheader: in ./bsort.c, <string.h> is required for portability but not present.
deheader: in ./bsort.c, <stdio.h> is required for portability but not present.
deheader: in ./cfgetospeed.c, retaining required '#include <termios.h>\n'
deheader: in ./catclose.c, retaining required '#include <nl_types.h>\n'
@@ -152,7 +154,6 @@ deheader: remove <stdio.h> from ./duplicate.c
deheader: in ./chdir.c, retaining required '#include <unistd.h>\n'
deheader: in ./atanh.c, retaining required '#include <math.h>\n'
deheader: in ./close.c, retaining required '#include <unistd.h>\n'
-deheader: in ./bcopy.c, retaining required '#include <string.h>\n'
deheader: in ./crypt.c, retaining required '#include <unistd.h>\n'
deheader: in ./cfsetispeed.c, retaining required '#include <termios.h>\n'
deheader: ./fchmod.c without <sys/types.h> succeeded.
@@ -172,14 +173,14 @@ deheader: in ./umask.c, retaining required '#include <sys/types.h>\n'
deheader: in ./umask.c, retaining required '#include <sys/stat.h>\n'
deheader: in ./calloc.c, retaining required '#include <stdlib.h>\n'
deheader: in ./atexit.c, retaining required '#include <stdlib.h>\n'
-deheader: in ./bzero.c, retaining required '#include <string.h>\n'
+deheader: in ./bzero.c, retaining required '#include <strings.h>\n'
deheader: in ./access.c, retaining required '#include <unistd.h>\n'
deheader: in ./btowc.c, retaining required '#include <wchar.h>\n'
deheader: in ./btowc.c, retaining required '#include <stdio.h>\n'
deheader: in ./clock.c, retaining required '#include <time.h>\n'
deheader: in ./acosh.c, retaining required '#include <math.h>\n'
deheader: in ./catgets.c, retaining required '#include <nl_types.h>\n'
-deheader: in ./bcmp.c, retaining required '#include <string.h>\n'
+deheader: in ./bcmp.c, retaining required '#include <strings.h>\n'
deheader: in ./a64l.c, retaining required '#include <stdlib.h>\n'
deheader: in ./chmod.c, retaining required '#include <sys/stat.h>\n'
deheader: in ./chmod.c, retaining required '#include <sys/types.h>\n'