diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2010-12-20 18:03:33 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2010-12-20 18:03:33 -0500 |
commit | 1c91bcc0f7e1e30605a9473777ce0a7f627fbc45 (patch) | |
tree | aa1d277e81e9ed4931b107686bf3105c640dbf50 | |
parent | 9129dd9501b05c48fffd931996c31be06e23dbad (diff) | |
download | deheader-1c91bcc0f7e1e30605a9473777ce0a7f627fbc45.tar.gz deheader-1c91bcc0f7e1e30605a9473777ce0a7f627fbc45.tar.bz2 deheader-1c91bcc0f7e1e30605a9473777ce0a7f627fbc45.tar.xz deheader-1c91bcc0f7e1e30605a9473777ce0a7f627fbc45.zip |
More tests mostly in stdio.h functions.
-rwxr-xr-x | deheader | 9 | ||||
-rw-r--r-- | test/README | 3 | ||||
-rw-r--r-- | test/fstat.c | 13 | ||||
-rw-r--r-- | test/regress.chk | 14 |
4 files changed, 35 insertions, 4 deletions
@@ -148,6 +148,15 @@ requirements = ( (r"fputws()", ["<stdio.h>"]), (r"fread()", ["<stdio.h>"]), (r"free()", ["<stdlib.h>"]), + (r"freopen()", ["<stdio.h>"]), + (r"frexp()", ["<math.h>"]), + (r"fscanf()", ["<stdio.h>"]), + (r"scanf()", ["<stdio.h>"]), + (r"sscanf()", ["<stdio.h>"]), + (r"fseek()", ["<stdio.h>"]), + (r"fseeko()", ["<stdio.h>"]), + (r"fsetpos()", ["<stdio.h>"]), + (r"fstat()", ["<sys/types.h>", "<sys/stat.h>"]), # Header dependencies implies by SuS (r"<dirent.h>", ["<sys/types.h>"]), (r"<fcntl.h>", ["<sys/stat.h>", "<sys/types.h>"]), diff --git a/test/README b/test/README index 0c2b63f..646456c 100644 --- a/test/README +++ b/test/README @@ -39,6 +39,9 @@ fmtmsg.h - fmtmsg() not tested. fnmatch.h - fnmatch() not tested. unistd.h - fork(), fpathconf(), free() not tested. stdio.h - *printf*, fputc(), fputwc(), fputws(), fread() not tested. +stdio.h - freopen(), fscanf(), sscanf(), feek(), fseeko() not tested. +stdio.h - fsetpos() not tested. +math.h - frexp() not tested. For other dependencies not tested, see the commented-out lines in deheader's dependency table. diff --git a/test/fstat.c b/test/fstat.c new file mode 100644 index 0000000..575bc84 --- /dev/null +++ b/test/fstat.c @@ -0,0 +1,13 @@ +/* + * Items: fstat( + * Standardized-By: SuS + * Not-Detected-by: gcc-4.4.3 + Linux + */ + +#include <sys/stat.h> +#include <sys/types.h> + +main(int arg, char **argv) +{ + fstat(0, NULL); +} diff --git a/test/regress.chk b/test/regress.chk index b1533f4..418b0c9 100644 --- a/test/regress.chk +++ b/test/regress.chk @@ -46,6 +46,9 @@ deheader: ./cfsetispeed.c has requires <termios.h> from cfsetispeed() deheader: ./cfsetispeed.c includes <termios.h> deheader: ./sbrk.c includes <unistd.h> deheader: ./ctime.c includes <time.h> +deheader: ./fstat.c has requires <sys/types.h>,<sys/stat.h> from fstat() +deheader: ./fstat.c includes <sys/stat.h> +deheader: ./fstat.c includes <sys/types.h> deheader: ./fclose.c has requires <stdio.h> from fclose() deheader: ./fclose.c includes <stdio.h> deheader: ./alarm.c includes <unistd.h> @@ -79,6 +82,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 <stdio.h> from scanf() deheader: ./chroot.c includes <unistd.h> deheader: ./catgets.c has requires <nl_types.h> from catgets() deheader: ./catgets.c includes <nl_types.h> @@ -113,6 +117,8 @@ 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, <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' deheader: in ./cfgetispeed.c, retaining required '#include <termios.h>\n' @@ -132,19 +138,19 @@ deheader: remove <stdio.h> from ./duplicate.c deheader: remove <stdio.h> from ./duplicate.c deheader: ./chdir.c without <unistd.h> succeeded. deheader: remove <unistd.h> from ./chdir.c -deheader: ./chroot.c without <unistd.h> succeeded. -deheader: remove <unistd.h> from ./chroot.c deheader: in ./atanh.c, retaining required '#include <math.h>\n' deheader: ./close.c without <unistd.h> succeeded. deheader: remove <unistd.h> from ./close.c deheader: ./bcopy.c without <string.h> failed (512). +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. deheader: in ./fchmod.c, <sys/stat,h> is required for portability but not present. deheader: remove <sys/types.h> from ./fchmod.c deheader: in ./atof.c, retaining required '#include <stdlib.h>\n' -deheader: in ./crypt.c, retaining required '#include <unistd.h>\n' +deheader: ./chroot.c without <unistd.h> succeeded. +deheader: remove <unistd.h> from ./chroot.c deheader: in ./atol.c, retaining required '#include <stdlib.h>\n' deheader: in ./atoi.c, retaining required '#include <stdlib.h>\n' deheader: ./asinh.c without <math.h> succeeded. @@ -173,4 +179,4 @@ deheader: in ./chown.c, retaining required '#include <unistd.h>\n' deheader: in ./chown.c, retaining required '#include <sys/types.h>\n' deheader: in ./advance.c, retaining required '#include <regexp.h>\n' deheader: ./clearerr.c without <stdio.h> failed (512). -deheader: saw 56 files, 61 includes, 12 removed +deheader: saw 57 files, 63 includes, 12 removed |