# HG changeset patch # User Eric Blake # Date 1261504634 25200 # Node ID 33ab12a7cea25c59e134dcdc1743360259f94028 # Parent 9bd9b7a4b42b6521b3e75994ab915a73d0f1c3a4 tests: add signature checks These tests will help catch problems similar to the one recently fixed for cygwin declaring getsubopt and symlinkat in the wrong header. * tests/signature.h (SIGNATURE_CHECK): New file. * modules/atexit-tests (Files): Use it. * modules/btowc-tests (Files): Likewise. * modules/canonicalize-lgpl-tests (Files): Likewise. * modules/ceilf-tests (Files): Likewise. * modules/ceill-tests (Files): Likewise. * modules/chown-tests (Files): Likewise. * modules/dprintf-posix-tests (Files): Likewise. * modules/dup2-tests (Files): Likewise. * modules/dup3-tests (Files): Likewise. * modules/duplocale-tests (Files): Likewise. * modules/fchdir-tests (Files): Likewise. * modules/fcntl-tests (Files): Likewise. * modules/fdopendir-tests (Files): Likewise. * modules/fflush-tests (Files): Likewise. * modules/flock-tests (Files): Likewise. * modules/floorf-tests (Files): Likewise. * modules/floorl-tests (Files): Likewise. * modules/fnmatch-tests (Files): Likewise. * modules/fopen-tests (Files): Likewise. * modules/fprintf-posix-tests (Files): Likewise. * modules/freopen-tests (Files): Likewise. * modules/frexp-nolibm-tests (Files): Likewise. * modules/frexp-tests (Files): Likewise. * modules/frexpl-nolibm-tests (Files): Likewise. * modules/frexpl-tests (Files): Likewise. * modules/fseek-tests (Files): Likewise. * modules/fseeko-tests (Files): Likewise. * modules/fsync-tests (Files): Likewise. * modules/ftell-tests (Files): Likewise. * modules/ftello-tests (Files): Likewise. * modules/futimens-tests (Files): Likewise. * modules/getaddrinfo-tests (Files): Likewise. * modules/getcwd-tests (Files): Likewise. * modules/getdelim-tests (Files): Likewise. * modules/getdtablesize-tests (Files): Likewise. * modules/getgroups-tests (Files): Likewise. * modules/gethostname-tests (Files): Likewise. * modules/getline-tests (Files): Likewise. * modules/getopt-posix-tests (Files): Likewise. * modules/gettimeofday-tests (Files): Likewise. * modules/glob-tests (Files): Likewise. * modules/iconv-tests (Files): Likewise. * modules/inet_ntop-tests (Files): Likewise. * modules/inet_pton-tests (Files): Likewise. * modules/isblank-tests (Files): Likewise. * modules/lchown-tests (Files): Likewise. * modules/ldexpl-tests (Files): Likewise. * modules/link-tests (Files): Likewise. * modules/linkat-tests (Files): Likewise. * modules/lseek-tests (Files): Likewise. * modules/lstat-tests (Files): Likewise. * modules/mbrtowc-tests (Files): Likewise. * modules/mbsinit-tests (Files): Likewise. * modules/mbsnrtowcs-tests (Files): Likewise. * modules/mbsrtowcs-tests (Files): Likewise. * modules/memchr-tests (Files): Likewise. * modules/memcmp-tests (Files): Likewise. * modules/memmem-tests (Files): Likewise. * modules/memrchr-tests (Files): Likewise. * modules/mkdir-tests (Files): Likewise. * modules/mkfifo-tests (Files): Likewise. * modules/mkfifoat-tests (Files): Likewise. * modules/mknod-tests (Files): Likewise. * modules/nanosleep-tests (Files): Likewise. * modules/nl_langinfo-tests (Files): Likewise. * modules/obstack-printf-tests (Files): Likewise. * modules/open-tests (Files): Likewise. * modules/openat-tests (Files): Likewise. * modules/perror-tests (Files): Likewise. * modules/pipe2-tests (Files): Likewise. * modules/poll-tests (Files): Likewise. * modules/popen-tests (Files): Likewise. * modules/posix_spawn-tests (Files): Likewise. * modules/posix_spawnp-tests (Files): Likewise. * modules/pread-tests (Files): Likewise. * modules/printf-posix-tests (Files): Likewise. * modules/pty-tests (Files): Likewise. * modules/random_r-tests (Files): Likewise. * modules/rawmemchr-tests (Files): Likewise. * modules/readlink-tests (Files): Likewise. * modules/remove-tests (Files): Likewise. * modules/rename-tests (Files): Likewise. * modules/renameat-tests (Files): Likewise. * modules/rmdir-tests (Files): Likewise. * modules/round-tests (Files): Likewise. * modules/roundf-tests (Files): Likewise. * modules/roundl-tests (Files): Likewise. * modules/select-tests (Files): Likewise. * modules/setenv-tests (Files): Likewise. * modules/sigaction-tests (Files): Likewise. * modules/sleep-tests (Files): Likewise. * modules/snprintf-posix-tests (Files): Likewise. * modules/snprintf-tests (Files): Likewise. * modules/sprintf-posix-tests (Files): Likewise. * modules/stat-tests (Files): Likewise. * modules/strcasestr-tests (Files): Likewise. * modules/strchrnul-tests (Files): Likewise. * modules/strerror-tests (Files): Likewise. * modules/strsignal-tests (Files): Likewise. * modules/strstr-tests (Files): Likewise. * modules/strtod-tests (Files): Likewise. * modules/strverscmp-tests (Files): Likewise. * modules/symlink-tests (Files): Likewise. * modules/symlinkat-tests (Files): Likewise. * modules/times-tests (Files): Likewise. * modules/trunc-tests (Files): Likewise. * modules/truncf-tests (Files): Likewise. * modules/truncl-tests (Files): Likewise. * modules/tsearch-tests (Files): Likewise. * modules/uname-tests (Files): Likewise. * modules/unlink-tests (Files): Likewise. * modules/unsetenv-tests (Files): Likewise. * modules/usleep-tests (Files): Likewise. * modules/utimensat-tests (Files): Likewise. * modules/vasprintf-tests (Files): Likewise. * modules/vdprintf-posix-tests (Files): Likewise. * modules/vfprintf-posix-tests (Files): Likewise. * modules/vprintf-posix-tests (Files): Likewise. * modules/vsnprintf-posix-tests (Files): Likewise. * modules/vsnprintf-tests (Files): Likewise. * modules/vsprintf-posix-tests (Files): Likewise. * modules/wcrtomb-tests (Files): Likewise. * modules/wcsnrtombs-tests (Files): Likewise. * modules/wcsrtombs-tests (Files): Likewise. * modules/wcwidth-tests (Files): Likewise. * tests/test-isfinite.c (isfinite): Ensure macro declaration. * tests/test-isinf.c (isinf): Likewise. * tests/test-isnan.c (isnan): Likewise. * tests/test-signbit.c (signbit): Likewise. * tests/test-select.c (FD_CLR, FD_ISSET, FD_SET, FD_ZERO): Ensure declaration, either as macro or with correct signature. (select): Ensure function under test is declared with correct signature in correct header. * tests/test-atexit.c (atexit): Likewise. * tests/test-btowc.c (btowc): Likewise. * tests/test-canonicalize-lgpl.c (realpath) (canonicalize_file_name): Likewise. * tests/test-ceilf1.c (ceilf): Likewise. * tests/test-ceill.c (ceill): Likewise. * tests/test-chown.c (chown): Likewise. * tests/test-dprintf-posix.c (dprintf): Likewise. * tests/test-dup2.c (dup2): Likewise. * tests/test-dup3.c (dup3): Likewise. * tests/test-duplocale.c (duplocale): Likewise. * tests/test-fchdir.c (fchdir): Likewise. * tests/test-fchownat.c (fchownat): Likewise. * tests/test-fcntl.c (fcntl): Likewise. * tests/test-fdopendir.c (fdopendir): Likewise. * tests/test-fflush.c (fflush): Likewise. * tests/test-flock.c (flock): Likewise. * tests/test-floorf1.c (floorf): Likewise. * tests/test-floorl.c (floorl): Likewise. * tests/test-fnmatch.c (fnmatch): Likewise. * tests/test-fopen.c (fopen): Likewise. * tests/test-fprintf-posix.c (fprintf): Likewise. * tests/test-freopen.c (freopen): Likewise. * tests/test-frexp.c (frexp): Likewise. * tests/test-frexpl.c (frexpl): Likewise. * tests/test-fseek.c (fseek): Likewise. * tests/test-fseeko.c (fseeko): Likewise. * tests/test-fstatat.c (fstatat): Likewise. * tests/test-fsync.c (fsync): Likewise. * tests/test-ftell.c (ftell): Likewise. * tests/test-ftello.c (ftello): Likewise. * tests/test-futimens.c (futimens): Likewise. * tests/test-getaddrinfo.c (getaddrinfo, freeaddrinfo) (gai_strerror): Likewise. * tests/test-getcwd.c (getcwd): Likewise. * tests/test-getdelim.c (getdelim): Likewise. * tests/test-getdtablesize.c (getdtablesize): Likewise. * tests/test-getgroups.c (getgroups): Likewise. * tests/test-gethostname.c (gethostname): Likewise. * tests/test-getline.c (getline): Likewise. * tests/test-getopt.c (getopt, getopt_long, getopt_long_only): Likewise. * tests/test-gettimeofday.c (gettimeofday): Likewise. * tests/test-glob.c (glob, globfree): Likewise. * tests/test-iconv.c (iconv, iconv_open, iconv_close): Likewise. * tests/test-inet_ntop.c (inet_ntop): Likewise. * tests/test-inet_pton.c (inet_pton): Likewise. * tests/test-isblank.c (isblank): Likewise. * tests/test-lchown.c (lchown): Likewise. * tests/test-ldexpl.c (ldexpl): Likewise. * tests/test-link.c (link): Likewise. * tests/test-linkat.c (linkat): Likewise. * tests/test-lseek.c (lseek): Likewise. * tests/test-lstat.c (lstat): Likewise. * tests/test-mbrtowc.c (mbrtowc): Likewise. * tests/test-mbsinit.c (mbsinit): Likewise. * tests/test-mbsnrtowcs.c (mbsnrtowcs): Likewise. * tests/test-mbsrtowcs.c (mbsrtowcs): Likewise. * tests/test-memchr.c (memchr): Likewise. * tests/test-memcmp.c (memcmp): Likewise. * tests/test-memmem.c (memmem): Likewise. * tests/test-memrchr.c (memrchr): Likewise. * tests/test-mkdir.c (mkdir): Likewise. * tests/test-mkdirat.c (mkdirat): Likewise. * tests/test-mkfifo.c (mkfifo): Likewise. * tests/test-mkfifoat.c (mkfifoat, mknodat): Likewise. * tests/test-mknod.c (mknod): Likewise. * tests/test-nanosleep.c (nanosleep): Likewise. * tests/test-nl_langinfo.c (nl_langinfo): Likewise. * tests/test-obstack-printf.c (obstack_printf, obstack_vprintf): Likewise. * tests/test-open.c (open): Likewise. * tests/test-openat.c (openat): Likewise. * tests/test-perror.c (perror): Likewise. * tests/test-pipe2.c (pipe2): Likewise. * tests/test-poll.c (poll): Likewise. * tests/test-popen.c (popen, pclose): Likewise. * tests/test-posix_spawn1.c (posix_spawnp, posix_spawnattr_init) (posix_spawnattr_destroy, posix_spawnattr_setsigmask) (posix_spawnattr_setflags, posix_spawn_file_actions_init) (posix_spawn_file_actions_destroy) (posix_spawn_file_actions_addclose) (posix_spawn_file_actions_addopen) (posix_spawn_file_actions_adddup2): Likewise. * tests/test-posix_spawn3.c (posix_spawn): Likewise. * tests/test-pread.c (pread): Likewise. * tests/test-printf-posix.c (printf): Likewise. * tests/test-pty.c (openpty, forkpty): Likewise. * tests/test-random_r.c (srandom_r, initstate_r, setstate_r) (random_r): Likewise. * tests/test-rawmemchr.c (rawmemchr): Likewise. * tests/test-readlink.c (readlink): Likewise. * tests/test-remove.c (remove): Likewise. * tests/test-rename.c (rename): Likewise. * tests/test-renameat.c (renameat): Likewise. * tests/test-rmdir.c (rmdir): Likewise. * tests/test-round1.c (round): Likewise. * tests/test-roundf1.c (roundf): Likewise. * tests/test-roundl.c (roundl): Likewise. * tests/test-setenv.c (setenv): Likewise. * tests/test-sigaction.c (sigaction): Likewise. * tests/test-sleep.c (sleep): Likewise. * tests/test-snprintf.c (snprintf): Likewise. * tests/test-sprintf-posix.c (sprintf): Likewise. * tests/test-stat.c (stat): Likewise. * tests/test-stpncpy.c (stpncpy): Likewise. * tests/test-strcasestr.c (strcasestr): Likewise. * tests/test-strchrnul.c (strchrnul): Likewise. * tests/test-strerror.c (strerror): Likewise. * tests/test-strsignal.c (strsignal): Likewise. * tests/test-strstr.c (strstr): Likewise. * tests/test-strtod.c (strtod): Likewise. * tests/test-strverscmp.c (strverscmp): Likewise. * tests/test-symlink.c (symlink): Likewise. * tests/test-symlinkat.c (symlinkat, readlinkat): Likewise. * tests/test-times.c (times): Likewise. * tests/test-trunc1.c (trunc): Likewise. * tests/test-truncf1.c (truncf): Likewise. * tests/test-truncl.c (truncl): Likewise. * tests/test-tsearch.c (tdelete, tfind, tsearch, twalk): Likewise. * tests/test-uname.c (uname): Likewise. * tests/test-unlink.c (unlink): Likewise. * tests/test-unlinkat.c (unlinkat): Likewise. * tests/test-unsetenv.c (unsetenv): Likewise. * tests/test-usleep.c (usleep): Likewise. * tests/test-utimensat.c (utimensat): Likewise. * tests/test-vasprintf.c (asprintf, vasprintf): Likewise. * tests/test-vdprintf-posix.c (vdprintf): Likewise. * tests/test-vfprintf-posix.c (vfprintf): Likewise. * tests/test-vprintf-posix.c (vprintf): Likewise. * tests/test-vsnprintf.c (vsnprintf): Likewise. * tests/test-vsprintf-posix.c (vsprintf): Likewise. * tests/test-wcrtomb.c (wcrtomb): Likewise. * tests/test-wcsnrtombs.c (wcsnrtombs): Likewise. * tests/test-wcsrtombs.c (wcsrtombs): Likewise. * tests/test-wcwidth.c (wcwidth): Likewise. Signed-off-by: Eric Blake diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,278 @@ 2009-12-24 Eric Blake + tests: add signature checks + * tests/signature.h (SIGNATURE_CHECK): New file. + * modules/atexit-tests (Files): Use it. + * modules/btowc-tests (Files): Likewise. + * modules/canonicalize-lgpl-tests (Files): Likewise. + * modules/ceilf-tests (Files): Likewise. + * modules/ceill-tests (Files): Likewise. + * modules/chown-tests (Files): Likewise. + * modules/dprintf-posix-tests (Files): Likewise. + * modules/dup2-tests (Files): Likewise. + * modules/dup3-tests (Files): Likewise. + * modules/duplocale-tests (Files): Likewise. + * modules/fchdir-tests (Files): Likewise. + * modules/fcntl-tests (Files): Likewise. + * modules/fdopendir-tests (Files): Likewise. + * modules/fflush-tests (Files): Likewise. + * modules/flock-tests (Files): Likewise. + * modules/floorf-tests (Files): Likewise. + * modules/floorl-tests (Files): Likewise. + * modules/fnmatch-tests (Files): Likewise. + * modules/fopen-tests (Files): Likewise. + * modules/fprintf-posix-tests (Files): Likewise. + * modules/freopen-tests (Files): Likewise. + * modules/frexp-nolibm-tests (Files): Likewise. + * modules/frexp-tests (Files): Likewise. + * modules/frexpl-nolibm-tests (Files): Likewise. + * modules/frexpl-tests (Files): Likewise. + * modules/fseek-tests (Files): Likewise. + * modules/fseeko-tests (Files): Likewise. + * modules/fsync-tests (Files): Likewise. + * modules/ftell-tests (Files): Likewise. + * modules/ftello-tests (Files): Likewise. + * modules/futimens-tests (Files): Likewise. + * modules/getaddrinfo-tests (Files): Likewise. + * modules/getcwd-tests (Files): Likewise. + * modules/getdelim-tests (Files): Likewise. + * modules/getdtablesize-tests (Files): Likewise. + * modules/getgroups-tests (Files): Likewise. + * modules/gethostname-tests (Files): Likewise. + * modules/getline-tests (Files): Likewise. + * modules/getopt-posix-tests (Files): Likewise. + * modules/gettimeofday-tests (Files): Likewise. + * modules/glob-tests (Files): Likewise. + * modules/iconv-tests (Files): Likewise. + * modules/inet_ntop-tests (Files): Likewise. + * modules/inet_pton-tests (Files): Likewise. + * modules/isblank-tests (Files): Likewise. + * modules/lchown-tests (Files): Likewise. + * modules/ldexpl-tests (Files): Likewise. + * modules/link-tests (Files): Likewise. + * modules/linkat-tests (Files): Likewise. + * modules/lseek-tests (Files): Likewise. + * modules/lstat-tests (Files): Likewise. + * modules/mbrtowc-tests (Files): Likewise. + * modules/mbsinit-tests (Files): Likewise. + * modules/mbsnrtowcs-tests (Files): Likewise. + * modules/mbsrtowcs-tests (Files): Likewise. + * modules/memchr-tests (Files): Likewise. + * modules/memcmp-tests (Files): Likewise. + * modules/memmem-tests (Files): Likewise. + * modules/memrchr-tests (Files): Likewise. + * modules/mkdir-tests (Files): Likewise. + * modules/mkfifo-tests (Files): Likewise. + * modules/mkfifoat-tests (Files): Likewise. + * modules/mknod-tests (Files): Likewise. + * modules/nanosleep-tests (Files): Likewise. + * modules/nl_langinfo-tests (Files): Likewise. + * modules/obstack-printf-tests (Files): Likewise. + * modules/open-tests (Files): Likewise. + * modules/openat-tests (Files): Likewise. + * modules/perror-tests (Files): Likewise. + * modules/pipe2-tests (Files): Likewise. + * modules/poll-tests (Files): Likewise. + * modules/popen-tests (Files): Likewise. + * modules/posix_spawn-tests (Files): Likewise. + * modules/posix_spawnp-tests (Files): Likewise. + * modules/pread-tests (Files): Likewise. + * modules/printf-posix-tests (Files): Likewise. + * modules/pty-tests (Files): Likewise. + * modules/random_r-tests (Files): Likewise. + * modules/rawmemchr-tests (Files): Likewise. + * modules/readlink-tests (Files): Likewise. + * modules/remove-tests (Files): Likewise. + * modules/rename-tests (Files): Likewise. + * modules/renameat-tests (Files): Likewise. + * modules/rmdir-tests (Files): Likewise. + * modules/round-tests (Files): Likewise. + * modules/roundf-tests (Files): Likewise. + * modules/roundl-tests (Files): Likewise. + * modules/select-tests (Files): Likewise. + * modules/setenv-tests (Files): Likewise. + * modules/sigaction-tests (Files): Likewise. + * modules/sleep-tests (Files): Likewise. + * modules/snprintf-posix-tests (Files): Likewise. + * modules/snprintf-tests (Files): Likewise. + * modules/sprintf-posix-tests (Files): Likewise. + * modules/stat-tests (Files): Likewise. + * modules/strcasestr-tests (Files): Likewise. + * modules/strchrnul-tests (Files): Likewise. + * modules/strerror-tests (Files): Likewise. + * modules/strsignal-tests (Files): Likewise. + * modules/strstr-tests (Files): Likewise. + * modules/strtod-tests (Files): Likewise. + * modules/strverscmp-tests (Files): Likewise. + * modules/symlink-tests (Files): Likewise. + * modules/symlinkat-tests (Files): Likewise. + * modules/times-tests (Files): Likewise. + * modules/trunc-tests (Files): Likewise. + * modules/truncf-tests (Files): Likewise. + * modules/truncl-tests (Files): Likewise. + * modules/tsearch-tests (Files): Likewise. + * modules/uname-tests (Files): Likewise. + * modules/unlink-tests (Files): Likewise. + * modules/unsetenv-tests (Files): Likewise. + * modules/usleep-tests (Files): Likewise. + * modules/utimensat-tests (Files): Likewise. + * modules/vasprintf-tests (Files): Likewise. + * modules/vdprintf-posix-tests (Files): Likewise. + * modules/vfprintf-posix-tests (Files): Likewise. + * modules/vprintf-posix-tests (Files): Likewise. + * modules/vsnprintf-posix-tests (Files): Likewise. + * modules/vsnprintf-tests (Files): Likewise. + * modules/vsprintf-posix-tests (Files): Likewise. + * modules/wcrtomb-tests (Files): Likewise. + * modules/wcsnrtombs-tests (Files): Likewise. + * modules/wcsrtombs-tests (Files): Likewise. + * modules/wcwidth-tests (Files): Likewise. + * tests/test-isfinite.c (isfinite): Ensure macro declaration. + * tests/test-isinf.c (isinf): Likewise. + * tests/test-isnan.c (isnan): Likewise. + * tests/test-signbit.c (signbit): Likewise. + * tests/test-select.c (FD_CLR, FD_ISSET, FD_SET, FD_ZERO): Ensure + declaration, either as macro or with correct signature. + (select): Ensure function under test is declared with correct + signature in correct header. + * tests/test-atexit.c (atexit): Likewise. + * tests/test-btowc.c (btowc): Likewise. + * tests/test-canonicalize-lgpl.c (realpath) + (canonicalize_file_name): Likewise. + * tests/test-ceilf1.c (ceilf): Likewise. + * tests/test-ceill.c (ceill): Likewise. + * tests/test-chown.c (chown): Likewise. + * tests/test-dprintf-posix.c (dprintf): Likewise. + * tests/test-dup2.c (dup2): Likewise. + * tests/test-dup3.c (dup3): Likewise. + * tests/test-duplocale.c (duplocale): Likewise. + * tests/test-fchdir.c (fchdir): Likewise. + * tests/test-fchownat.c (fchownat): Likewise. + * tests/test-fcntl.c (fcntl): Likewise. + * tests/test-fdopendir.c (fdopendir): Likewise. + * tests/test-fflush.c (fflush): Likewise. + * tests/test-flock.c (flock): Likewise. + * tests/test-floorf1.c (floorf): Likewise. + * tests/test-floorl.c (floorl): Likewise. + * tests/test-fnmatch.c (fnmatch): Likewise. + * tests/test-fopen.c (fopen): Likewise. + * tests/test-fprintf-posix.c (fprintf): Likewise. + * tests/test-freopen.c (freopen): Likewise. + * tests/test-frexp.c (frexp): Likewise. + * tests/test-frexpl.c (frexpl): Likewise. + * tests/test-fseek.c (fseek): Likewise. + * tests/test-fseeko.c (fseeko): Likewise. + * tests/test-fstatat.c (fstatat): Likewise. + * tests/test-fsync.c (fsync): Likewise. + * tests/test-ftell.c (ftell): Likewise. + * tests/test-ftello.c (ftello): Likewise. + * tests/test-futimens.c (futimens): Likewise. + * tests/test-getaddrinfo.c (getaddrinfo, freeaddrinfo) + (gai_strerror): Likewise. + * tests/test-getcwd.c (getcwd): Likewise. + * tests/test-getdelim.c (getdelim): Likewise. + * tests/test-getdtablesize.c (getdtablesize): Likewise. + * tests/test-getgroups.c (getgroups): Likewise. + * tests/test-gethostname.c (gethostname): Likewise. + * tests/test-getline.c (getline): Likewise. + * tests/test-getopt.c (getopt, getopt_long, getopt_long_only): + Likewise. + * tests/test-gettimeofday.c (gettimeofday): Likewise. + * tests/test-glob.c (glob, globfree): Likewise. + * tests/test-iconv.c (iconv, iconv_open, iconv_close): Likewise. + * tests/test-inet_ntop.c (inet_ntop): Likewise. + * tests/test-inet_pton.c (inet_pton): Likewise. + * tests/test-isblank.c (isblank): Likewise. + * tests/test-lchown.c (lchown): Likewise. + * tests/test-ldexpl.c (ldexpl): Likewise. + * tests/test-link.c (link): Likewise. + * tests/test-linkat.c (linkat): Likewise. + * tests/test-lseek.c (lseek): Likewise. + * tests/test-lstat.c (lstat): Likewise. + * tests/test-mbrtowc.c (mbrtowc): Likewise. + * tests/test-mbsinit.c (mbsinit): Likewise. + * tests/test-mbsnrtowcs.c (mbsnrtowcs): Likewise. + * tests/test-mbsrtowcs.c (mbsrtowcs): Likewise. + * tests/test-memchr.c (memchr): Likewise. + * tests/test-memcmp.c (memcmp): Likewise. + * tests/test-memmem.c (memmem): Likewise. + * tests/test-memrchr.c (memrchr): Likewise. + * tests/test-mkdir.c (mkdir): Likewise. + * tests/test-mkdirat.c (mkdirat): Likewise. + * tests/test-mkfifo.c (mkfifo): Likewise. + * tests/test-mkfifoat.c (mkfifoat, mknodat): Likewise. + * tests/test-mknod.c (mknod): Likewise. + * tests/test-nanosleep.c (nanosleep): Likewise. + * tests/test-nl_langinfo.c (nl_langinfo): Likewise. + * tests/test-obstack-printf.c (obstack_printf, obstack_vprintf): + Likewise. + * tests/test-open.c (open): Likewise. + * tests/test-openat.c (openat): Likewise. + * tests/test-perror.c (perror): Likewise. + * tests/test-pipe2.c (pipe2): Likewise. + * tests/test-poll.c (poll): Likewise. + * tests/test-popen.c (popen, pclose): Likewise. + * tests/test-posix_spawn1.c (posix_spawnp, posix_spawnattr_init) + (posix_spawnattr_destroy, posix_spawnattr_setsigmask) + (posix_spawnattr_setflags, posix_spawn_file_actions_init) + (posix_spawn_file_actions_destroy) + (posix_spawn_file_actions_addclose) + (posix_spawn_file_actions_addopen) + (posix_spawn_file_actions_adddup2): Likewise. + * tests/test-posix_spawn3.c (posix_spawn): Likewise. + * tests/test-pread.c (pread): Likewise. + * tests/test-printf-posix.c (printf): Likewise. + * tests/test-pty.c (openpty, forkpty): Likewise. + * tests/test-random_r.c (srandom_r, initstate_r, setstate_r) + (random_r): Likewise. + * tests/test-rawmemchr.c (rawmemchr): Likewise. + * tests/test-readlink.c (readlink): Likewise. + * tests/test-remove.c (remove): Likewise. + * tests/test-rename.c (rename): Likewise. + * tests/test-renameat.c (renameat): Likewise. + * tests/test-rmdir.c (rmdir): Likewise. + * tests/test-round1.c (round): Likewise. + * tests/test-roundf1.c (roundf): Likewise. + * tests/test-roundl.c (roundl): Likewise. + * tests/test-setenv.c (setenv): Likewise. + * tests/test-sigaction.c (sigaction): Likewise. + * tests/test-sleep.c (sleep): Likewise. + * tests/test-snprintf.c (snprintf): Likewise. + * tests/test-sprintf-posix.c (sprintf): Likewise. + * tests/test-stat.c (stat): Likewise. + * tests/test-stpncpy.c (stpncpy): Likewise. + * tests/test-strcasestr.c (strcasestr): Likewise. + * tests/test-strchrnul.c (strchrnul): Likewise. + * tests/test-strerror.c (strerror): Likewise. + * tests/test-strsignal.c (strsignal): Likewise. + * tests/test-strstr.c (strstr): Likewise. + * tests/test-strtod.c (strtod): Likewise. + * tests/test-strverscmp.c (strverscmp): Likewise. + * tests/test-symlink.c (symlink): Likewise. + * tests/test-symlinkat.c (symlinkat, readlinkat): Likewise. + * tests/test-times.c (times): Likewise. + * tests/test-trunc1.c (trunc): Likewise. + * tests/test-truncf1.c (truncf): Likewise. + * tests/test-truncl.c (truncl): Likewise. + * tests/test-tsearch.c (tdelete, tfind, tsearch, twalk): + Likewise. + * tests/test-uname.c (uname): Likewise. + * tests/test-unlink.c (unlink): Likewise. + * tests/test-unlinkat.c (unlinkat): Likewise. + * tests/test-unsetenv.c (unsetenv): Likewise. + * tests/test-usleep.c (usleep): Likewise. + * tests/test-utimensat.c (utimensat): Likewise. + * tests/test-vasprintf.c (asprintf, vasprintf): Likewise. + * tests/test-vdprintf-posix.c (vdprintf): Likewise. + * tests/test-vfprintf-posix.c (vfprintf): Likewise. + * tests/test-vprintf-posix.c (vprintf): Likewise. + * tests/test-vsnprintf.c (vsnprintf): Likewise. + * tests/test-vsprintf-posix.c (vsprintf): Likewise. + * tests/test-wcrtomb.c (wcrtomb): Likewise. + * tests/test-wcsnrtombs.c (wcsnrtombs): Likewise. + * tests/test-wcsrtombs.c (wcsrtombs): Likewise. + * tests/test-wcwidth.c (wcwidth): Likewise. + build: pull in conditional headers during GNULIB_POSIXCHECK * lib/stdio.in.h (includes): Using GNULIB_POSIXCHECK also requires definitions from any conditionally-included headers. diff --git a/modules/atexit-tests b/modules/atexit-tests --- a/modules/atexit-tests +++ b/modules/atexit-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-atexit.sh tests/test-atexit.c diff --git a/modules/btowc-tests b/modules/btowc-tests --- a/modules/btowc-tests +++ b/modules/btowc-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-btowc1.sh tests/test-btowc2.sh tests/test-btowc.c diff --git a/modules/canonicalize-lgpl-tests b/modules/canonicalize-lgpl-tests --- a/modules/canonicalize-lgpl-tests +++ b/modules/canonicalize-lgpl-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-canonicalize-lgpl.c Depends-on: diff --git a/modules/ceilf-tests b/modules/ceilf-tests --- a/modules/ceilf-tests +++ b/modules/ceilf-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-ceilf1.c tests/test-ceilf2.c tests/nan.h diff --git a/modules/ceill-tests b/modules/ceill-tests --- a/modules/ceill-tests +++ b/modules/ceill-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-ceill.c tests/nan.h diff --git a/modules/chown-tests b/modules/chown-tests --- a/modules/chown-tests +++ b/modules/chown-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/nap.h tests/test-chown.h tests/test-chown.c diff --git a/modules/dprintf-posix-tests b/modules/dprintf-posix-tests --- a/modules/dprintf-posix-tests +++ b/modules/dprintf-posix-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-dprintf-posix.sh tests/test-dprintf-posix.c tests/test-printf-posix.output diff --git a/modules/dup2-tests b/modules/dup2-tests --- a/modules/dup2-tests +++ b/modules/dup2-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-dup2.c Depends-on: diff --git a/modules/dup3-tests b/modules/dup3-tests --- a/modules/dup3-tests +++ b/modules/dup3-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-dup3.c Depends-on: diff --git a/modules/duplocale-tests b/modules/duplocale-tests --- a/modules/duplocale-tests +++ b/modules/duplocale-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-duplocale.c Depends-on: diff --git a/modules/fchdir-tests b/modules/fchdir-tests --- a/modules/fchdir-tests +++ b/modules/fchdir-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-fchdir.c Depends-on: diff --git a/modules/fcntl-tests b/modules/fcntl-tests --- a/modules/fcntl-tests +++ b/modules/fcntl-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-fcntl.c Depends-on: diff --git a/modules/fdopendir-tests b/modules/fdopendir-tests --- a/modules/fdopendir-tests +++ b/modules/fdopendir-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-fdopendir.c Depends-on: diff --git a/modules/fflush-tests b/modules/fflush-tests --- a/modules/fflush-tests +++ b/modules/fflush-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-fflush.c tests/test-fflush2.sh tests/test-fflush2.c diff --git a/modules/flock-tests b/modules/flock-tests --- a/modules/flock-tests +++ b/modules/flock-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-flock.c Depends-on: diff --git a/modules/floorf-tests b/modules/floorf-tests --- a/modules/floorf-tests +++ b/modules/floorf-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-floorf1.c tests/test-floorf2.c tests/nan.h diff --git a/modules/floorl-tests b/modules/floorl-tests --- a/modules/floorl-tests +++ b/modules/floorl-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-floorl.c tests/nan.h diff --git a/modules/fnmatch-tests b/modules/fnmatch-tests --- a/modules/fnmatch-tests +++ b/modules/fnmatch-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-fnmatch.c Makefile.am: diff --git a/modules/fopen-tests b/modules/fopen-tests --- a/modules/fopen-tests +++ b/modules/fopen-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-fopen.h tests/test-fopen.c diff --git a/modules/fprintf-posix-tests b/modules/fprintf-posix-tests --- a/modules/fprintf-posix-tests +++ b/modules/fprintf-posix-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-fprintf-posix.sh tests/test-fprintf-posix.c tests/test-fprintf-posix.h diff --git a/modules/freopen-tests b/modules/freopen-tests --- a/modules/freopen-tests +++ b/modules/freopen-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-freopen.c Depends-on: diff --git a/modules/frexp-nolibm-tests b/modules/frexp-nolibm-tests --- a/modules/frexp-nolibm-tests +++ b/modules/frexp-nolibm-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-frexp.c Depends-on: diff --git a/modules/frexp-tests b/modules/frexp-tests --- a/modules/frexp-tests +++ b/modules/frexp-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-frexp.c tests/nan.h diff --git a/modules/frexpl-nolibm-tests b/modules/frexpl-nolibm-tests --- a/modules/frexpl-nolibm-tests +++ b/modules/frexpl-nolibm-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-frexpl.c Depends-on: diff --git a/modules/frexpl-tests b/modules/frexpl-tests --- a/modules/frexpl-tests +++ b/modules/frexpl-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-frexpl.c tests/nan.h diff --git a/modules/fseek-tests b/modules/fseek-tests --- a/modules/fseek-tests +++ b/modules/fseek-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-fseek.c tests/test-fseek.sh tests/test-fseek2.sh diff --git a/modules/fseeko-tests b/modules/fseeko-tests --- a/modules/fseeko-tests +++ b/modules/fseeko-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-fseeko.c tests/test-fseeko.sh tests/test-fseeko2.sh diff --git a/modules/fsync-tests b/modules/fsync-tests --- a/modules/fsync-tests +++ b/modules/fsync-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-fsync.c Depends-on: diff --git a/modules/ftell-tests b/modules/ftell-tests --- a/modules/ftell-tests +++ b/modules/ftell-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-ftell.c tests/test-ftell.sh tests/test-ftell2.sh diff --git a/modules/ftello-tests b/modules/ftello-tests --- a/modules/ftello-tests +++ b/modules/ftello-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-ftello.c tests/test-ftello.sh tests/test-ftello2.sh diff --git a/modules/futimens-tests b/modules/futimens-tests --- a/modules/futimens-tests +++ b/modules/futimens-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/nap.h tests/test-futimens.h tests/test-utimens-common.h diff --git a/modules/getaddrinfo-tests b/modules/getaddrinfo-tests --- a/modules/getaddrinfo-tests +++ b/modules/getaddrinfo-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-getaddrinfo.c Depends-on: diff --git a/modules/getcwd-tests b/modules/getcwd-tests --- a/modules/getcwd-tests +++ b/modules/getcwd-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-getcwd.c Depends-on: diff --git a/modules/getdelim-tests b/modules/getdelim-tests --- a/modules/getdelim-tests +++ b/modules/getdelim-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-getdelim.c Depends-on: diff --git a/modules/getdtablesize-tests b/modules/getdtablesize-tests --- a/modules/getdtablesize-tests +++ b/modules/getdtablesize-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-getdtablesize.c Depends-on: diff --git a/modules/getgroups-tests b/modules/getgroups-tests --- a/modules/getgroups-tests +++ b/modules/getgroups-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-getgroups.c Depends-on: diff --git a/modules/gethostname-tests b/modules/gethostname-tests --- a/modules/gethostname-tests +++ b/modules/gethostname-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-gethostname.c Depends-on: diff --git a/modules/getline-tests b/modules/getline-tests --- a/modules/getline-tests +++ b/modules/getline-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-getline.c Depends-on: diff --git a/modules/getopt-posix-tests b/modules/getopt-posix-tests --- a/modules/getopt-posix-tests +++ b/modules/getopt-posix-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-getopt.c tests/test-getopt.h tests/test-getopt_long.h diff --git a/modules/gettimeofday-tests b/modules/gettimeofday-tests --- a/modules/gettimeofday-tests +++ b/modules/gettimeofday-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-gettimeofday.c Depends-on: diff --git a/modules/glob-tests b/modules/glob-tests --- a/modules/glob-tests +++ b/modules/glob-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-glob.c Makefile.am: diff --git a/modules/iconv-tests b/modules/iconv-tests --- a/modules/iconv-tests +++ b/modules/iconv-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-iconv.c Depends-on: diff --git a/modules/inet_ntop-tests b/modules/inet_ntop-tests --- a/modules/inet_ntop-tests +++ b/modules/inet_ntop-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-inet_ntop.c Depends-on: diff --git a/modules/inet_pton-tests b/modules/inet_pton-tests --- a/modules/inet_pton-tests +++ b/modules/inet_pton-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-inet_pton.c Depends-on: diff --git a/modules/isblank-tests b/modules/isblank-tests --- a/modules/isblank-tests +++ b/modules/isblank-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-isblank.c Depends-on: diff --git a/modules/lchown-tests b/modules/lchown-tests --- a/modules/lchown-tests +++ b/modules/lchown-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/nap.h tests/test-lchown.h tests/test-lchown.c diff --git a/modules/ldexpl-tests b/modules/ldexpl-tests --- a/modules/ldexpl-tests +++ b/modules/ldexpl-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-ldexpl.c tests/nan.h diff --git a/modules/link-tests b/modules/link-tests --- a/modules/link-tests +++ b/modules/link-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-link.h tests/test-link.c diff --git a/modules/linkat-tests b/modules/linkat-tests --- a/modules/linkat-tests +++ b/modules/linkat-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-link.h tests/test-linkat.c diff --git a/modules/lseek-tests b/modules/lseek-tests --- a/modules/lseek-tests +++ b/modules/lseek-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-lseek.c tests/test-lseek.sh diff --git a/modules/lstat-tests b/modules/lstat-tests --- a/modules/lstat-tests +++ b/modules/lstat-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-lstat.h tests/test-lstat.c diff --git a/modules/mbrtowc-tests b/modules/mbrtowc-tests --- a/modules/mbrtowc-tests +++ b/modules/mbrtowc-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-mbrtowc1.sh tests/test-mbrtowc2.sh tests/test-mbrtowc3.sh diff --git a/modules/mbsinit-tests b/modules/mbsinit-tests --- a/modules/mbsinit-tests +++ b/modules/mbsinit-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-mbsinit.sh tests/test-mbsinit.c m4/locale-fr.m4 diff --git a/modules/mbsnrtowcs-tests b/modules/mbsnrtowcs-tests --- a/modules/mbsnrtowcs-tests +++ b/modules/mbsnrtowcs-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-mbsnrtowcs1.sh tests/test-mbsnrtowcs2.sh tests/test-mbsnrtowcs3.sh diff --git a/modules/mbsrtowcs-tests b/modules/mbsrtowcs-tests --- a/modules/mbsrtowcs-tests +++ b/modules/mbsrtowcs-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-mbsrtowcs1.sh tests/test-mbsrtowcs2.sh tests/test-mbsrtowcs3.sh diff --git a/modules/memchr-tests b/modules/memchr-tests --- a/modules/memchr-tests +++ b/modules/memchr-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-memchr.c tests/zerosize-ptr.h diff --git a/modules/memcmp-tests b/modules/memcmp-tests --- a/modules/memcmp-tests +++ b/modules/memcmp-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-memcmp.c tests/zerosize-ptr.h m4/mmap-anon.m4 diff --git a/modules/memmem-tests b/modules/memmem-tests --- a/modules/memmem-tests +++ b/modules/memmem-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-memmem.c tests/zerosize-ptr.h m4/mmap-anon.m4 diff --git a/modules/memrchr-tests b/modules/memrchr-tests --- a/modules/memrchr-tests +++ b/modules/memrchr-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-memrchr.c tests/zerosize-ptr.h m4/mmap-anon.m4 diff --git a/modules/mkdir-tests b/modules/mkdir-tests --- a/modules/mkdir-tests +++ b/modules/mkdir-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-mkdir.h tests/test-mkdir.c diff --git a/modules/mkfifo-tests b/modules/mkfifo-tests --- a/modules/mkfifo-tests +++ b/modules/mkfifo-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-mkfifo.h tests/test-mkfifo.c diff --git a/modules/mkfifoat-tests b/modules/mkfifoat-tests --- a/modules/mkfifoat-tests +++ b/modules/mkfifoat-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-mkfifo.h tests/test-mkfifoat.c diff --git a/modules/mknod-tests b/modules/mknod-tests --- a/modules/mknod-tests +++ b/modules/mknod-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-mkfifo.h tests/test-mknod.c diff --git a/modules/nanosleep-tests b/modules/nanosleep-tests --- a/modules/nanosleep-tests +++ b/modules/nanosleep-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-nanosleep.c Depends-on: diff --git a/modules/nl_langinfo-tests b/modules/nl_langinfo-tests --- a/modules/nl_langinfo-tests +++ b/modules/nl_langinfo-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-nl_langinfo.sh tests/test-nl_langinfo.c m4/locale-fr.m4 diff --git a/modules/obstack-printf-tests b/modules/obstack-printf-tests --- a/modules/obstack-printf-tests +++ b/modules/obstack-printf-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-obstack-printf.c Depends-on: diff --git a/modules/open-tests b/modules/open-tests --- a/modules/open-tests +++ b/modules/open-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-open.h tests/test-open.c diff --git a/modules/openat-tests b/modules/openat-tests --- a/modules/openat-tests +++ b/modules/openat-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/nap.h tests/test-chown.h tests/test-lchown.h diff --git a/modules/perror-tests b/modules/perror-tests --- a/modules/perror-tests +++ b/modules/perror-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-perror.c tests/test-perror.sh diff --git a/modules/pipe2-tests b/modules/pipe2-tests --- a/modules/pipe2-tests +++ b/modules/pipe2-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-pipe2.c Depends-on: diff --git a/modules/poll-tests b/modules/poll-tests --- a/modules/poll-tests +++ b/modules/poll-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-poll.c Depends-on: diff --git a/modules/popen-tests b/modules/popen-tests --- a/modules/popen-tests +++ b/modules/popen-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-popen.h tests/test-popen.c diff --git a/modules/posix_spawn-tests b/modules/posix_spawn-tests --- a/modules/posix_spawn-tests +++ b/modules/posix_spawn-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-posix_spawn3.c Depends-on: diff --git a/modules/posix_spawnp-tests b/modules/posix_spawnp-tests --- a/modules/posix_spawnp-tests +++ b/modules/posix_spawnp-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-posix_spawn1.c tests/test-posix_spawn1.in.sh tests/test-posix_spawn2.c diff --git a/modules/pread-tests b/modules/pread-tests --- a/modules/pread-tests +++ b/modules/pread-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-pread.c tests/test-pread.sh tests/init.sh diff --git a/modules/printf-posix-tests b/modules/printf-posix-tests --- a/modules/printf-posix-tests +++ b/modules/printf-posix-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-printf-posix.sh tests/test-printf-posix.c tests/test-printf-posix.h diff --git a/modules/pty-tests b/modules/pty-tests --- a/modules/pty-tests +++ b/modules/pty-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-pty.c Makefile.am: diff --git a/modules/random_r-tests b/modules/random_r-tests --- a/modules/random_r-tests +++ b/modules/random_r-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-random_r.c Depends-on: diff --git a/modules/rawmemchr-tests b/modules/rawmemchr-tests --- a/modules/rawmemchr-tests +++ b/modules/rawmemchr-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-rawmemchr.c Depends-on: diff --git a/modules/readlink-tests b/modules/readlink-tests --- a/modules/readlink-tests +++ b/modules/readlink-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-readlink.h tests/test-readlink.c diff --git a/modules/remove-tests b/modules/remove-tests --- a/modules/remove-tests +++ b/modules/remove-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-remove.c Depends-on: diff --git a/modules/rename-tests b/modules/rename-tests --- a/modules/rename-tests +++ b/modules/rename-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-rename.h tests/test-rename.c diff --git a/modules/renameat-tests b/modules/renameat-tests --- a/modules/renameat-tests +++ b/modules/renameat-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-rename.h tests/test-renameat.c diff --git a/modules/rmdir-tests b/modules/rmdir-tests --- a/modules/rmdir-tests +++ b/modules/rmdir-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-rmdir.h tests/test-rmdir.c diff --git a/modules/round-tests b/modules/round-tests --- a/modules/round-tests +++ b/modules/round-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-round1.c tests/test-round2.c tests/nan.h diff --git a/modules/roundf-tests b/modules/roundf-tests --- a/modules/roundf-tests +++ b/modules/roundf-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-roundf1.c tests/test-round2.c tests/test-roundf2.c diff --git a/modules/roundl-tests b/modules/roundl-tests --- a/modules/roundl-tests +++ b/modules/roundl-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-roundl.c tests/nan.h diff --git a/modules/select-tests b/modules/select-tests --- a/modules/select-tests +++ b/modules/select-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-select.c tests/test-select-fd.c tests/test-select-in.sh diff --git a/modules/setenv-tests b/modules/setenv-tests --- a/modules/setenv-tests +++ b/modules/setenv-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-setenv.c Depends-on: diff --git a/modules/sigaction-tests b/modules/sigaction-tests --- a/modules/sigaction-tests +++ b/modules/sigaction-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-sigaction.c Depends-on: diff --git a/modules/sleep-tests b/modules/sleep-tests --- a/modules/sleep-tests +++ b/modules/sleep-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-sleep.c Depends-on: diff --git a/modules/snprintf-posix-tests b/modules/snprintf-posix-tests --- a/modules/snprintf-posix-tests +++ b/modules/snprintf-posix-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-snprintf-posix.c tests/test-snprintf-posix.h tests/test-snprintf.c diff --git a/modules/snprintf-tests b/modules/snprintf-tests --- a/modules/snprintf-tests +++ b/modules/snprintf-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-snprintf.c Depends-on: diff --git a/modules/sprintf-posix-tests b/modules/sprintf-posix-tests --- a/modules/sprintf-posix-tests +++ b/modules/sprintf-posix-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-sprintf-posix.c tests/test-sprintf-posix.h tests/nan.h diff --git a/modules/stat-tests b/modules/stat-tests --- a/modules/stat-tests +++ b/modules/stat-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-stat.h tests/test-stat.c diff --git a/modules/strcasestr-tests b/modules/strcasestr-tests --- a/modules/strcasestr-tests +++ b/modules/strcasestr-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-strcasestr.c Depends-on: diff --git a/modules/strchrnul-tests b/modules/strchrnul-tests --- a/modules/strchrnul-tests +++ b/modules/strchrnul-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-strchrnul.c Depends-on: diff --git a/modules/strerror-tests b/modules/strerror-tests --- a/modules/strerror-tests +++ b/modules/strerror-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-strerror.c Depends-on: diff --git a/modules/strsignal-tests b/modules/strsignal-tests --- a/modules/strsignal-tests +++ b/modules/strsignal-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-strsignal.c Depends-on: diff --git a/modules/strstr-tests b/modules/strstr-tests --- a/modules/strstr-tests +++ b/modules/strstr-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-strstr.c tests/zerosize-ptr.h m4/mmap-anon.m4 diff --git a/modules/strtod-tests b/modules/strtod-tests --- a/modules/strtod-tests +++ b/modules/strtod-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-strtod.c Depends-on: diff --git a/modules/strverscmp-tests b/modules/strverscmp-tests --- a/modules/strverscmp-tests +++ b/modules/strverscmp-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-strverscmp.c Depends-on: diff --git a/modules/symlink-tests b/modules/symlink-tests --- a/modules/symlink-tests +++ b/modules/symlink-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-symlink.h tests/test-symlink.c diff --git a/modules/symlinkat-tests b/modules/symlinkat-tests --- a/modules/symlinkat-tests +++ b/modules/symlinkat-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-readlink.h tests/test-symlink.h tests/test-symlinkat.c diff --git a/modules/times-tests b/modules/times-tests --- a/modules/times-tests +++ b/modules/times-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-times.c Makefile.am: diff --git a/modules/trunc-tests b/modules/trunc-tests --- a/modules/trunc-tests +++ b/modules/trunc-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-trunc1.c tests/test-trunc2.c tests/nan.h diff --git a/modules/truncf-tests b/modules/truncf-tests --- a/modules/truncf-tests +++ b/modules/truncf-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-truncf1.c tests/test-truncf2.c tests/nan.h diff --git a/modules/truncl-tests b/modules/truncl-tests --- a/modules/truncl-tests +++ b/modules/truncl-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-truncl.c tests/nan.h diff --git a/modules/tsearch-tests b/modules/tsearch-tests --- a/modules/tsearch-tests +++ b/modules/tsearch-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-tsearch.sh tests/test-tsearch.c diff --git a/modules/uname-tests b/modules/uname-tests --- a/modules/uname-tests +++ b/modules/uname-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-uname.c Depends-on: diff --git a/modules/unlink-tests b/modules/unlink-tests --- a/modules/unlink-tests +++ b/modules/unlink-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-unlink.h tests/test-unlink.c diff --git a/modules/unsetenv-tests b/modules/unsetenv-tests --- a/modules/unsetenv-tests +++ b/modules/unsetenv-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-unsetenv.c Depends-on: diff --git a/modules/usleep-tests b/modules/usleep-tests --- a/modules/usleep-tests +++ b/modules/usleep-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-usleep.c Depends-on: diff --git a/modules/utimensat-tests b/modules/utimensat-tests --- a/modules/utimensat-tests +++ b/modules/utimensat-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/nap.h tests/test-lutimens.h tests/test-utimens.h diff --git a/modules/vasprintf-tests b/modules/vasprintf-tests --- a/modules/vasprintf-tests +++ b/modules/vasprintf-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-vasprintf.c Depends-on: diff --git a/modules/vdprintf-posix-tests b/modules/vdprintf-posix-tests --- a/modules/vdprintf-posix-tests +++ b/modules/vdprintf-posix-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-vdprintf-posix.sh tests/test-vdprintf-posix.c tests/test-fprintf-posix.h diff --git a/modules/vfprintf-posix-tests b/modules/vfprintf-posix-tests --- a/modules/vfprintf-posix-tests +++ b/modules/vfprintf-posix-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-vfprintf-posix.sh tests/test-vfprintf-posix.c tests/test-fprintf-posix.h diff --git a/modules/vprintf-posix-tests b/modules/vprintf-posix-tests --- a/modules/vprintf-posix-tests +++ b/modules/vprintf-posix-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-vprintf-posix.sh tests/test-vprintf-posix.c tests/test-printf-posix.h diff --git a/modules/vsnprintf-posix-tests b/modules/vsnprintf-posix-tests --- a/modules/vsnprintf-posix-tests +++ b/modules/vsnprintf-posix-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-vsnprintf-posix.c tests/test-snprintf-posix.h tests/test-vsnprintf.c diff --git a/modules/vsnprintf-tests b/modules/vsnprintf-tests --- a/modules/vsnprintf-tests +++ b/modules/vsnprintf-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-vsnprintf.c Depends-on: diff --git a/modules/vsprintf-posix-tests b/modules/vsprintf-posix-tests --- a/modules/vsprintf-posix-tests +++ b/modules/vsprintf-posix-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-vsprintf-posix.c tests/test-sprintf-posix.h tests/nan.h diff --git a/modules/wcrtomb-tests b/modules/wcrtomb-tests --- a/modules/wcrtomb-tests +++ b/modules/wcrtomb-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-wcrtomb.sh tests/test-wcrtomb.c m4/locale-fr.m4 diff --git a/modules/wcsnrtombs-tests b/modules/wcsnrtombs-tests --- a/modules/wcsnrtombs-tests +++ b/modules/wcsnrtombs-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-wcsnrtombs1.sh tests/test-wcsnrtombs2.sh tests/test-wcsnrtombs3.sh diff --git a/modules/wcsrtombs-tests b/modules/wcsrtombs-tests --- a/modules/wcsrtombs-tests +++ b/modules/wcsrtombs-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-wcsrtombs1.sh tests/test-wcsrtombs2.sh tests/test-wcsrtombs3.sh diff --git a/modules/wcwidth-tests b/modules/wcwidth-tests --- a/modules/wcwidth-tests +++ b/modules/wcwidth-tests @@ -1,4 +1,5 @@ Files: +tests/signature.h tests/test-wcwidth.c Depends-on: diff --git a/tests/signature.h b/tests/signature.h new file mode 100644 --- /dev/null +++ b/tests/signature.h @@ -0,0 +1,48 @@ +/* Macro for checking that a function declaration is compliant. + Copyright (C) 2009 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef SIGNATURE_CHECK + +/* Check that the function FN takes the specified arguments ARGS with + a return type of RET. This header is designed to be included after + and the one system header that is supposed to contain + the function being checked, but prior to any other system headers + that are necessary for the unit test. Therefore, this file does + not include any system headers, nor reference anything outside of + the macro arguments. For an example, if foo.h should provide: + + extern int foo (char, float); + + then the unit test named test-foo.c would start out with: + + #include + #include + #include "signature.h" + SIGNATURE_CHECK (foo, int, (char, float)); + #include + ... +*/ +# define SIGNATURE_CHECK(fn, ret, args) \ + SIGNATURE_CHECK1 (fn, ret, args, __LINE__) + +/* Necessary to allow multiple SIGNATURE_CHECK lines in a unit test. + Note that the checks must not occupy the same line. */ +# define SIGNATURE_CHECK1(fn, ret, args, id) \ + SIGNATURE_CHECK2 (fn, ret, args, id) /* macroexpand line */ +# define SIGNATURE_CHECK2(fn, ret, args, id) \ + static ret (* _GL_UNUSED signature_check ## id) args = fn + +#endif /* SIGNATURE_CHECK */ diff --git a/tests/test-atexit.c b/tests/test-atexit.c --- a/tests/test-atexit.c +++ b/tests/test-atexit.c @@ -1,5 +1,5 @@ /* Test of execution of program termination handlers. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,6 +19,10 @@ #include #include + +#include "signature.h" +SIGNATURE_CHECK (atexit, int, (void (*) (void))); + #include #define TEMPFILE "t-atexit.tmp" diff --git a/tests/test-btowc.c b/tests/test-btowc.c --- a/tests/test-btowc.c +++ b/tests/test-btowc.c @@ -1,5 +1,5 @@ /* Test of conversion of unibyte character to wide character. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (btowc, wint_t, (int)); + #include #include #include diff --git a/tests/test-canonicalize-lgpl.c b/tests/test-canonicalize-lgpl.c --- a/tests/test-canonicalize-lgpl.c +++ b/tests/test-canonicalize-lgpl.c @@ -20,6 +20,10 @@ #include +#include "signature.h" +SIGNATURE_CHECK (realpath, char *, (const char *, char *)); +SIGNATURE_CHECK (canonicalize_file_name, char *, (const char *)); + #include #include #include diff --git a/tests/test-ceilf1.c b/tests/test-ceilf1.c --- a/tests/test-ceilf1.c +++ b/tests/test-ceilf1.c @@ -1,5 +1,5 @@ /* Test of rounding towards positive infinity. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (ceilf, float, (float)); + #include #include diff --git a/tests/test-ceill.c b/tests/test-ceill.c --- a/tests/test-ceill.c +++ b/tests/test-ceill.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (ceill, long double, (long double)); + #include #include #include diff --git a/tests/test-chown.c b/tests/test-chown.c --- a/tests/test-chown.c +++ b/tests/test-chown.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (chown, int, (char const *, uid_t, gid_t)); + #include #include #include diff --git a/tests/test-dprintf-posix.c b/tests/test-dprintf-posix.c --- a/tests/test-dprintf-posix.c +++ b/tests/test-dprintf-posix.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (dprintf, int, (int, const char *, ...)); + #include #include #include diff --git a/tests/test-dup2.c b/tests/test-dup2.c --- a/tests/test-dup2.c +++ b/tests/test-dup2.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (dup2, int, (int, int)); + #include #include #include diff --git a/tests/test-dup3.c b/tests/test-dup3.c --- a/tests/test-dup3.c +++ b/tests/test-dup3.c @@ -21,6 +21,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (dup3, int, (int, int, int)); + #include #include #include diff --git a/tests/test-duplocale.c b/tests/test-duplocale.c --- a/tests/test-duplocale.c +++ b/tests/test-duplocale.c @@ -22,6 +22,9 @@ #if HAVE_DUPLOCALE +#include "signature.h" +SIGNATURE_CHECK (duplocale, locale_t, (locale_t)); + #include #include #include diff --git a/tests/test-fchdir.c b/tests/test-fchdir.c --- a/tests/test-fchdir.c +++ b/tests/test-fchdir.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (fchdir, int, (int)); + #include #include #include diff --git a/tests/test-fchownat.c b/tests/test-fchownat.c --- a/tests/test-fchownat.c +++ b/tests/test-fchownat.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (fchownat, int, (int, char const *, uid_t, gid_t, int)); + #include #include #include diff --git a/tests/test-fcntl.c b/tests/test-fcntl.c --- a/tests/test-fcntl.c +++ b/tests/test-fcntl.c @@ -21,6 +21,9 @@ /* Specification. */ #include +#include "signature.h" +SIGNATURE_CHECK (fcntl, int, (int, int, ...)); + /* Helpers. */ #include #include diff --git a/tests/test-fdopendir.c b/tests/test-fdopendir.c --- a/tests/test-fdopendir.c +++ b/tests/test-fdopendir.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (fdopendir, DIR *, (int)); + #include #include #include diff --git a/tests/test-fflush.c b/tests/test-fflush.c --- a/tests/test-fflush.c +++ b/tests/test-fflush.c @@ -19,6 +19,10 @@ #include #include + +#include "signature.h" +SIGNATURE_CHECK (fflush, int, (FILE *)); + #include int diff --git a/tests/test-flock.c b/tests/test-flock.c --- a/tests/test-flock.c +++ b/tests/test-flock.c @@ -18,6 +18,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (flock, int, (int, int)); + #include #include #include diff --git a/tests/test-floorf1.c b/tests/test-floorf1.c --- a/tests/test-floorf1.c +++ b/tests/test-floorf1.c @@ -1,5 +1,5 @@ /* Test of rounding towards negative infinity. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (floorf, float, (float)); + #include #include diff --git a/tests/test-floorl.c b/tests/test-floorl.c --- a/tests/test-floorl.c +++ b/tests/test-floorl.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (floorl, long double, (long double)); + #include #include #include diff --git a/tests/test-fnmatch.c b/tests/test-fnmatch.c --- a/tests/test-fnmatch.c +++ b/tests/test-fnmatch.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (fnmatch, int, (char const *, char const *, int)); + #include #include diff --git a/tests/test-fopen.c b/tests/test-fopen.c --- a/tests/test-fopen.c +++ b/tests/test-fopen.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (fopen, FILE *, (char const *, char const *)); + #define BASE "test-fopen.t" #include "test-fopen.h" diff --git a/tests/test-fprintf-posix.c b/tests/test-fprintf-posix.c --- a/tests/test-fprintf-posix.c +++ b/tests/test-fprintf-posix.c @@ -1,5 +1,5 @@ /* Test of POSIX compatible fprintf() function. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (fprintf, int, (FILE *, char const *, ...)); + #include #include #include diff --git a/tests/test-freopen.c b/tests/test-freopen.c --- a/tests/test-freopen.c +++ b/tests/test-freopen.c @@ -1,5 +1,5 @@ /* Test of opening a file stream. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,6 +19,10 @@ #include #include + +#include "signature.h" +SIGNATURE_CHECK (freopen, FILE *, (char const *, char const *, FILE *)); + #include #define ASSERT(expr) \ diff --git a/tests/test-frexp.c b/tests/test-frexp.c --- a/tests/test-frexp.c +++ b/tests/test-frexp.c @@ -1,5 +1,5 @@ /* Test of splitting a double into fraction and mantissa. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (frexp, double, (double, int *)); + #include #include #include diff --git a/tests/test-frexpl.c b/tests/test-frexpl.c --- a/tests/test-frexpl.c +++ b/tests/test-frexpl.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (frexpl, long double, (long double, int *)); + #include #include #include diff --git a/tests/test-fseek.c b/tests/test-fseek.c --- a/tests/test-fseek.c +++ b/tests/test-fseek.c @@ -19,6 +19,10 @@ #include #include + +#include "signature.h" +SIGNATURE_CHECK (fseek, int, (FILE *, long, int)); + #include #define ASSERT(expr) \ diff --git a/tests/test-fseeko.c b/tests/test-fseeko.c --- a/tests/test-fseeko.c +++ b/tests/test-fseeko.c @@ -26,6 +26,10 @@ #endif #include + +#include "signature.h" +SIGNATURE_CHECK (fseeko, int, (FILE *, off_t, int)); + #include #define ASSERT(expr) \ diff --git a/tests/test-fstatat.c b/tests/test-fstatat.c --- a/tests/test-fstatat.c +++ b/tests/test-fstatat.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (fstatat, int, (int, char const *, struct stat *, int)); + #include #include #include diff --git a/tests/test-fsync.c b/tests/test-fsync.c --- a/tests/test-fsync.c +++ b/tests/test-fsync.c @@ -18,6 +18,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (fsync, int, (int)); + #include #include #include diff --git a/tests/test-ftell.c b/tests/test-ftell.c --- a/tests/test-ftell.c +++ b/tests/test-ftell.c @@ -19,6 +19,10 @@ #include #include + +#include "signature.h" +SIGNATURE_CHECK (ftell, long, (FILE *)); + #include #include "binary-io.h" diff --git a/tests/test-ftello.c b/tests/test-ftello.c --- a/tests/test-ftello.c +++ b/tests/test-ftello.c @@ -19,6 +19,10 @@ #include #include + +#include "signature.h" +SIGNATURE_CHECK (ftello, off_t, (FILE *)); + #include #include "binary-io.h" diff --git a/tests/test-futimens.c b/tests/test-futimens.c --- a/tests/test-futimens.c +++ b/tests/test-futimens.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (futimens, int, (int, struct timespec const[2])); + #include #include #include diff --git a/tests/test-getaddrinfo.c b/tests/test-getaddrinfo.c --- a/tests/test-getaddrinfo.c +++ b/tests/test-getaddrinfo.c @@ -18,8 +18,16 @@ /* Written by Simon Josefsson. */ #include + #include +#include "signature.h" +SIGNATURE_CHECK (freeaddrinfo, void, (struct addrinfo *)); +SIGNATURE_CHECK (gai_strerror, char const *, (int)); +SIGNATURE_CHECK (getaddrinfo, int, (char const *, char const *, + struct addrinfo const *, + struct addrinfo **)); + #include #include #include diff --git a/tests/test-getcwd.c b/tests/test-getcwd.c --- a/tests/test-getcwd.c +++ b/tests/test-getcwd.c @@ -18,6 +18,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (getcwd, char *, (char *, size_t)); + #include #include #include diff --git a/tests/test-getdelim.c b/tests/test-getdelim.c --- a/tests/test-getdelim.c +++ b/tests/test-getdelim.c @@ -20,6 +20,10 @@ #include #include + +#include "signature.h" +SIGNATURE_CHECK (getdelim, ssize_t, (char **, size_t *, int, FILE *)); + #include #include diff --git a/tests/test-getdtablesize.c b/tests/test-getdtablesize.c --- a/tests/test-getdtablesize.c +++ b/tests/test-getdtablesize.c @@ -1,5 +1,5 @@ /* Test of getdtablesize() function. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (getdtablesize, int, (void)); + #include #include diff --git a/tests/test-getgroups.c b/tests/test-getgroups.c --- a/tests/test-getgroups.c +++ b/tests/test-getgroups.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (getgroups, int, (int, gid_t[])); + #include #include #include diff --git a/tests/test-gethostname.c b/tests/test-gethostname.c --- a/tests/test-gethostname.c +++ b/tests/test-gethostname.c @@ -19,6 +19,10 @@ /* Get gethostname() declaration. */ #include + +#include "signature.h" +SIGNATURE_CHECK (gethostname, int, (char *, size_t)); + /* Get HOST_NAME_MAX definition. */ #include diff --git a/tests/test-getline.c b/tests/test-getline.c --- a/tests/test-getline.c +++ b/tests/test-getline.c @@ -20,6 +20,10 @@ #include #include + +#include "signature.h" +SIGNATURE_CHECK (getline, ssize_t, (char **, size_t *, FILE *)); + #include #include diff --git a/tests/test-getopt.c b/tests/test-getopt.c --- a/tests/test-getopt.c +++ b/tests/test-getopt.c @@ -27,9 +27,25 @@ #if GNULIB_GETOPT_GNU # include + +# ifndef __getopt_argv_const +# define __getopt_argv_const const +# endif +# include "signature.h" +SIGNATURE_CHECK (getopt_long, int, (int, char *__getopt_argv_const *, + char const *, struct option const *, + int *)); +SIGNATURE_CHECK (getopt_long_only, int, (int, char *__getopt_argv_const *, + char const *, struct option const *, + int *)); + #endif + #include +#include "signature.h" +SIGNATURE_CHECK (getopt, int, (int, char * const[], char const *)); + #include #include #include diff --git a/tests/test-gettimeofday.c b/tests/test-gettimeofday.c --- a/tests/test-gettimeofday.c +++ b/tests/test-gettimeofday.c @@ -18,6 +18,10 @@ #include #include + +#include "signature.h" +SIGNATURE_CHECK (gettimeofday, int, (struct timeval *, void *)); + #include #include diff --git a/tests/test-glob.c b/tests/test-glob.c --- a/tests/test-glob.c +++ b/tests/test-glob.c @@ -20,6 +20,11 @@ #include +#include "signature.h" +SIGNATURE_CHECK (glob, int, (char const *, int, int (*) (char const *, int), + glob_t *)); +SIGNATURE_CHECK (globfree, void, (glob_t *)); + #include #include #include diff --git a/tests/test-iconv.c b/tests/test-iconv.c --- a/tests/test-iconv.c +++ b/tests/test-iconv.c @@ -1,5 +1,5 @@ /* Test of character set conversion. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,17 @@ #if HAVE_ICONV # include + +# ifndef ICONV_CONST +# define ICONV_CONST /* empty */ +# endif + +#include "signature.h" +SIGNATURE_CHECK (iconv, size_t, (iconv_t, ICONV_CONST char **, size_t *, + char **, size_t *)); +SIGNATURE_CHECK (iconv_close, int, (iconv_t x)); +SIGNATURE_CHECK (iconv_open, iconv_t, (char const *, char const *)); + #endif #include diff --git a/tests/test-inet_ntop.c b/tests/test-inet_ntop.c --- a/tests/test-inet_ntop.c +++ b/tests/test-inet_ntop.c @@ -20,6 +20,10 @@ #include +#include "signature.h" +SIGNATURE_CHECK (inet_ntop, char const *, (int, void const *, char *, + socklen_t)); + #include #include #include diff --git a/tests/test-inet_pton.c b/tests/test-inet_pton.c --- a/tests/test-inet_pton.c +++ b/tests/test-inet_pton.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (inet_pton, int, (int, const char *, void *)); + #include #include #include diff --git a/tests/test-isblank.c b/tests/test-isblank.c --- a/tests/test-isblank.c +++ b/tests/test-isblank.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (isblank, int, (int)); + #include #include #include diff --git a/tests/test-isfinite.c b/tests/test-isfinite.c --- a/tests/test-isfinite.c +++ b/tests/test-isfinite.c @@ -21,6 +21,11 @@ #include +/* isfinite must be a macro. */ +#ifndef isfinite +# error missing declaration +#endif + #include #include #include diff --git a/tests/test-isinf.c b/tests/test-isinf.c --- a/tests/test-isinf.c +++ b/tests/test-isinf.c @@ -21,6 +21,11 @@ #include +/* isinf must be a macro. */ +#ifndef isinf +# error missing declaration +#endif + #include #include #include diff --git a/tests/test-isnan.c b/tests/test-isnan.c --- a/tests/test-isnan.c +++ b/tests/test-isnan.c @@ -21,6 +21,11 @@ #include +/* isnan must be a macro. */ +#ifndef isnan +# error missing declaration +#endif + #include #include #include diff --git a/tests/test-lchown.c b/tests/test-lchown.c --- a/tests/test-lchown.c +++ b/tests/test-lchown.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (lchown, int, (char const *, uid_t, gid_t)); + #include #include #include diff --git a/tests/test-ldexpl.c b/tests/test-ldexpl.c --- a/tests/test-ldexpl.c +++ b/tests/test-ldexpl.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (ldexpl, long double, (long double, int)); + #include #include #include diff --git a/tests/test-link.c b/tests/test-link.c --- a/tests/test-link.c +++ b/tests/test-link.c @@ -18,6 +18,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (link, int, (char const *, char const *)); + #include #include #include diff --git a/tests/test-linkat.c b/tests/test-linkat.c --- a/tests/test-linkat.c +++ b/tests/test-linkat.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (linkat, int, (int, char const *, int, char const *, int)); + #include #include #include diff --git a/tests/test-lseek.c b/tests/test-lseek.c --- a/tests/test-lseek.c +++ b/tests/test-lseek.c @@ -1,5 +1,5 @@ /* Test of lseek() function. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,9 +18,13 @@ #include +#include + +#include "signature.h" +SIGNATURE_CHECK (lseek, off_t, (int, off_t, int)); + #include #include -#include #define ASSERT(expr) \ do \ diff --git a/tests/test-lstat.c b/tests/test-lstat.c --- a/tests/test-lstat.c +++ b/tests/test-lstat.c @@ -20,6 +20,13 @@ #include +/* Caution: lstat may be a function-like macro. Although this + signature check must pass, it may be the signature of the real (and + broken) lstat rather than rpl_lstat. Most code should not use the + address of lstat. */ +#include "signature.h" +SIGNATURE_CHECK (lstat, int, (char const *, struct stat *)); + #include #include #include diff --git a/tests/test-mbrtowc.c b/tests/test-mbrtowc.c --- a/tests/test-mbrtowc.c +++ b/tests/test-mbrtowc.c @@ -1,5 +1,5 @@ /* Test of conversion of multibyte character to wide character. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,10 @@ #include +#include "signature.h" +SIGNATURE_CHECK (mbrtowc, size_t, (wchar_t *, char const *, size_t, + mbstate_t *)); + #include #include #include diff --git a/tests/test-mbsinit.c b/tests/test-mbsinit.c --- a/tests/test-mbsinit.c +++ b/tests/test-mbsinit.c @@ -1,5 +1,5 @@ /* Test of test for initial conversion state. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (mbsinit, int, (const mbstate_t *)); + #include #include #include diff --git a/tests/test-mbsnrtowcs.c b/tests/test-mbsnrtowcs.c --- a/tests/test-mbsnrtowcs.c +++ b/tests/test-mbsnrtowcs.c @@ -1,5 +1,5 @@ /* Test of conversion of string to wide string. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,10 @@ #include +#include "signature.h" +SIGNATURE_CHECK (mbsnrtowcs, size_t, (wchar_t *, char const **, size_t, size_t, + mbstate_t *)); + #include #include #include diff --git a/tests/test-mbsrtowcs.c b/tests/test-mbsrtowcs.c --- a/tests/test-mbsrtowcs.c +++ b/tests/test-mbsrtowcs.c @@ -1,5 +1,5 @@ /* Test of conversion of string to wide string. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,10 @@ #include +#include "signature.h" +SIGNATURE_CHECK (mbsrtowcs, size_t, (wchar_t *, char const **, size_t, + mbstate_t *)); + #include #include #include diff --git a/tests/test-memchr.c b/tests/test-memchr.c --- a/tests/test-memchr.c +++ b/tests/test-memchr.c @@ -19,6 +19,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (memchr, void *, (void const *, int, size_t)); + #include #include diff --git a/tests/test-memcmp.c b/tests/test-memcmp.c --- a/tests/test-memcmp.c +++ b/tests/test-memcmp.c @@ -19,6 +19,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (memcmp, int, (void const *, void const *, size_t)); + #include #include diff --git a/tests/test-memmem.c b/tests/test-memmem.c --- a/tests/test-memmem.c +++ b/tests/test-memmem.c @@ -19,6 +19,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (memmem, void *, (void const *, size_t, void const *, size_t)); + #include #include #include diff --git a/tests/test-memrchr.c b/tests/test-memrchr.c --- a/tests/test-memrchr.c +++ b/tests/test-memrchr.c @@ -19,6 +19,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (memrchr, void *, (void const *, int, size_t)); + #include #include diff --git a/tests/test-mkdir.c b/tests/test-mkdir.c --- a/tests/test-mkdir.c +++ b/tests/test-mkdir.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (mkdir, int, (char const *, mode_t)); + #include #include #include diff --git a/tests/test-mkdirat.c b/tests/test-mkdirat.c --- a/tests/test-mkdirat.c +++ b/tests/test-mkdirat.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (mkdirat, int, (int, char const *, mode_t)); + #include #include #include diff --git a/tests/test-mkfifo.c b/tests/test-mkfifo.c --- a/tests/test-mkfifo.c +++ b/tests/test-mkfifo.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (mkfifo, int, (char const *, mode_t)); + #include #include #include diff --git a/tests/test-mkfifoat.c b/tests/test-mkfifoat.c --- a/tests/test-mkfifoat.c +++ b/tests/test-mkfifoat.c @@ -20,6 +20,10 @@ #include +#include "signature.h" +SIGNATURE_CHECK (mkfifoat, int, (int, char const *, mode_t)); +SIGNATURE_CHECK (mknodat, int, (int, char const *, mode_t, dev_t)); + #include #include #include diff --git a/tests/test-mknod.c b/tests/test-mknod.c --- a/tests/test-mknod.c +++ b/tests/test-mknod.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (mknod, int, (char const *, mode_t, dev_t)); + #include #include #include diff --git a/tests/test-nanosleep.c b/tests/test-nanosleep.c --- a/tests/test-nanosleep.c +++ b/tests/test-nanosleep.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (nanosleep, int, (struct timespec const *, struct timepec *)); + #include #include #include diff --git a/tests/test-nl_langinfo.c b/tests/test-nl_langinfo.c --- a/tests/test-nl_langinfo.c +++ b/tests/test-nl_langinfo.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (nl_langinfo, char *, (nl_item)); + #include #include #include diff --git a/tests/test-obstack-printf.c b/tests/test-obstack-printf.c --- a/tests/test-obstack-printf.c +++ b/tests/test-obstack-printf.c @@ -20,6 +20,11 @@ #include +#include "signature.h" +SIGNATURE_CHECK (obstack_printf, int, (struct obstack *, char const *, ...)); +SIGNATURE_CHECK (obstack_vprintf, int, (struct obstack *, char const *, + va_list)); + #include "obstack.h" #include "xalloc.h" diff --git a/tests/test-open.c b/tests/test-open.c --- a/tests/test-open.c +++ b/tests/test-open.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (open, int, (char const *, int, ...)); + #include #include #include diff --git a/tests/test-openat.c b/tests/test-openat.c --- a/tests/test-openat.c +++ b/tests/test-openat.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (openat, int, (int, char const *, int, ...)); + #include #include #include diff --git a/tests/test-perror.c b/tests/test-perror.c --- a/tests/test-perror.c +++ b/tests/test-perror.c @@ -1,5 +1,5 @@ /* Test of perror() function. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008, 2009 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,6 +19,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (perror, void, (char const *)); + #include int diff --git a/tests/test-pipe2.c b/tests/test-pipe2.c --- a/tests/test-pipe2.c +++ b/tests/test-pipe2.c @@ -19,6 +19,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (pipe2, int, (int[2], int)); + #include #include diff --git a/tests/test-poll.c b/tests/test-poll.c --- a/tests/test-poll.c +++ b/tests/test-poll.c @@ -19,12 +19,16 @@ #include +#include + +#include "signature.h" +SIGNATURE_CHECK (poll, int, (struct pollfd[], nfds_t, int)); + #include #include #include #include #include -#include #include #include #include diff --git a/tests/test-popen.c b/tests/test-popen.c --- a/tests/test-popen.c +++ b/tests/test-popen.c @@ -21,4 +21,8 @@ /* Specification. */ #include +#include "signature.h" +SIGNATURE_CHECK (popen, FILE *, (char const *, char const *)); +SIGNATURE_CHECK (pclose, int, (FILE *)); + #include "test-popen.h" diff --git a/tests/test-posix_spawn1.c b/tests/test-posix_spawn1.c --- a/tests/test-posix_spawn1.c +++ b/tests/test-posix_spawn1.c @@ -20,6 +20,28 @@ #include +#include "signature.h" +SIGNATURE_CHECK (posix_spawnp, int, (pid_t *, char const *, + posix_spawn_file_actions_t const *, + posix_spawnattr_t const *, + char *const[], char *const[])); +SIGNATURE_CHECK (posix_spawnattr_init, int, (posix_spawnattr_t *)); +SIGNATURE_CHECK (posix_spawnattr_destroy, int, (posix_spawnattr_t *)); +SIGNATURE_CHECK (posix_spawnattr_setsigmask, int, (posix_spawnattr_t *, + sigset_t const *)); +SIGNATURE_CHECK (posix_spawnattr_setflags, int, (posix_spawnattr_t *, short)); +SIGNATURE_CHECK (posix_spawn_file_actions_init, int, + (posix_spawn_file_actions_t *)); +SIGNATURE_CHECK (posix_spawn_file_actions_destroy, int, + (posix_spawn_file_actions_t *)); +SIGNATURE_CHECK (posix_spawn_file_actions_addclose, int, + (posix_spawn_file_actions_t *, int)); +SIGNATURE_CHECK (posix_spawn_file_actions_addopen, int, + (posix_spawn_file_actions_t *, int, char const *, int, + mode_t)); +SIGNATURE_CHECK (posix_spawn_file_actions_adddup2, int, + (posix_spawn_file_actions_t *, int, int)); + #include #include #include diff --git a/tests/test-posix_spawn3.c b/tests/test-posix_spawn3.c --- a/tests/test-posix_spawn3.c +++ b/tests/test-posix_spawn3.c @@ -23,6 +23,11 @@ #include +#include "signature.h" +SIGNATURE_CHECK (posix_spawn, int, (pid_t *, char const *, + posix_spawn_file_actions_t const *, + posix_spawnattr_t const *, + char *const[], char *const[])); #include #include #include diff --git a/tests/test-pread.c b/tests/test-pread.c --- a/tests/test-pread.c +++ b/tests/test-pread.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (pread, ssize_t, (int, void *, size_t, off_t)); + #include #include #include diff --git a/tests/test-printf-posix.c b/tests/test-printf-posix.c --- a/tests/test-printf-posix.c +++ b/tests/test-printf-posix.c @@ -1,5 +1,5 @@ /* Test of POSIX compatible printf() function. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (printf, int, (char const *, ...)); + #include #include #include diff --git a/tests/test-pty.c b/tests/test-pty.c --- a/tests/test-pty.c +++ b/tests/test-pty.c @@ -20,6 +20,12 @@ #include +#include "signature.h" +SIGNATURE_CHECK (forkpty, int, (int *, char *, struct termios *, + struct winsize *)); +SIGNATURE_CHECK (openpty, int, (int *, int *, char *, struct termios *, + struct winsize *)); + #include int diff --git a/tests/test-random_r.c b/tests/test-random_r.c --- a/tests/test-random_r.c +++ b/tests/test-random_r.c @@ -18,6 +18,13 @@ #include +#include "signature.h" +SIGNATURE_CHECK (srandom_r, int, (unsigned int, struct random_data *)); +SIGNATURE_CHECK (initstate_r, int, (unsigned int, char *, size_t, + struct random_data *)); +SIGNATURE_CHECK (setstate_r, int, (char *, struct random_data *)); +SIGNATURE_CHECK (random_r, int, (struct random_data *, int32_t *)); + #include #include diff --git a/tests/test-rawmemchr.c b/tests/test-rawmemchr.c --- a/tests/test-rawmemchr.c +++ b/tests/test-rawmemchr.c @@ -19,6 +19,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (rawmemchr, void *, (void const *, int)); + #include #include diff --git a/tests/test-readlink.c b/tests/test-readlink.c --- a/tests/test-readlink.c +++ b/tests/test-readlink.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (readlink, ssize_t, (char const *, char *, size_t)); + #include #include #include diff --git a/tests/test-remove.c b/tests/test-remove.c --- a/tests/test-remove.c +++ b/tests/test-remove.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (remove, int, (char const *)); + #include #include #include diff --git a/tests/test-rename.c b/tests/test-rename.c --- a/tests/test-rename.c +++ b/tests/test-rename.c @@ -16,12 +16,14 @@ #include -#include +#include + +#include "signature.h" +SIGNATURE_CHECK (rename, int, (char const *, char const *)); #include #include #include -#include #include #include #include diff --git a/tests/test-renameat.c b/tests/test-renameat.c --- a/tests/test-renameat.c +++ b/tests/test-renameat.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (renameat, int, (int, char const *, int, char const *)); + #include #include #include diff --git a/tests/test-rmdir.c b/tests/test-rmdir.c --- a/tests/test-rmdir.c +++ b/tests/test-rmdir.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (rmdir, int, (char const *)); + #include #include #include diff --git a/tests/test-round1.c b/tests/test-round1.c --- a/tests/test-round1.c +++ b/tests/test-round1.c @@ -1,5 +1,5 @@ /* Test of rounding to nearest, breaking ties away from zero. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,6 +22,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (round, double, (double)); + #include #include diff --git a/tests/test-roundf1.c b/tests/test-roundf1.c --- a/tests/test-roundf1.c +++ b/tests/test-roundf1.c @@ -1,5 +1,5 @@ /* Test of rounding to nearest, breaking ties away from zero. - Copyright (C) 2007, 2008 Free Software Foundation, Inc. + Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,6 +22,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (roundf, float, (float)); + #include #include diff --git a/tests/test-roundl.c b/tests/test-roundl.c --- a/tests/test-roundl.c +++ b/tests/test-roundl.c @@ -22,6 +22,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (roundl, long double, (long double)); + #include #include #include diff --git a/tests/test-select.c b/tests/test-select.c --- a/tests/test-select.c +++ b/tests/test-select.c @@ -20,6 +20,24 @@ #include +#include "signature.h" +SIGNATURE_CHECK (select, int, (int, fd_set *, fd_set *, fd_set *, + struct timeval *)); +/* The following may be macros without underlying functions, so only + check signature if they are not macros. */ +#ifndef FD_CLR +SIGNATURE_CHECK (FD_CLR, void, (int, fd_set *)); +#endif +#ifndef FD_ISSET +SIGNATURE_CHECK (FD_ISSET, void, (int, fd_set *)); +#endif +#ifndef FD_SET +SIGNATURE_CHECK (FD_SET, int, (int, fd_set *)); +#endif +#ifndef FD_ZERO +SIGNATURE_CHECK (FD_ZERO, void, (fd_set *)); +#endif + #include #include #include diff --git a/tests/test-setenv.c b/tests/test-setenv.c --- a/tests/test-setenv.c +++ b/tests/test-setenv.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (setenv, int, (char const *, char const *, int)); + #include #include #include diff --git a/tests/test-sigaction.c b/tests/test-sigaction.c --- a/tests/test-sigaction.c +++ b/tests/test-sigaction.c @@ -20,6 +20,10 @@ #include +#include "signature.h" +SIGNATURE_CHECK (sigaction, int, (int, struct sigaction const *, + struct sigaction *)); + #include #include diff --git a/tests/test-signbit.c b/tests/test-signbit.c --- a/tests/test-signbit.c +++ b/tests/test-signbit.c @@ -20,6 +20,11 @@ #include +/* signbit must be a macro. */ +#ifndef signbit +# error missing declaration +#endif + #include #include #include diff --git a/tests/test-sleep.c b/tests/test-sleep.c --- a/tests/test-sleep.c +++ b/tests/test-sleep.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (sleep, unsigned int, (unsigned int)); + #include #include #include diff --git a/tests/test-snprintf.c b/tests/test-snprintf.c --- a/tests/test-snprintf.c +++ b/tests/test-snprintf.c @@ -1,5 +1,5 @@ /* Test of snprintf() function. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (snprintf, int, (char *, size_t, char const *, ...)); + #include #include diff --git a/tests/test-sprintf-posix.c b/tests/test-sprintf-posix.c --- a/tests/test-sprintf-posix.c +++ b/tests/test-sprintf-posix.c @@ -1,5 +1,5 @@ /* Test of POSIX compatible sprintf() function. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (sprintf, int, (char *, char const *, ...)); + #include #include #include diff --git a/tests/test-stat.c b/tests/test-stat.c --- a/tests/test-stat.c +++ b/tests/test-stat.c @@ -20,6 +20,13 @@ #include +/* Caution: stat may be a function-like macro. Although this + signature check must pass, it may be the signature of the real (and + broken) stat rather than rpl_stat. Most code should not use the + address of stat. */ +#include "signature.h" +SIGNATURE_CHECK (stat, int, (char const *, struct stat *)); + #include #include #include diff --git a/tests/test-stpncpy.c b/tests/test-stpncpy.c --- a/tests/test-stpncpy.c +++ b/tests/test-stpncpy.c @@ -1,5 +1,5 @@ /* Test the system defined function stpncpy(). - Copyright (C) 2003, 2008 Free Software Foundation, Inc. + Copyright (C) 2003, 2008, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,6 +17,10 @@ #include #include + +#include "signature.h" +SIGNATURE_CHECK (stpncpy, char *, (char *, char const *, size_t)); + #include int diff --git a/tests/test-strcasestr.c b/tests/test-strcasestr.c --- a/tests/test-strcasestr.c +++ b/tests/test-strcasestr.c @@ -1,5 +1,5 @@ /* Test of case-insensitive searching in a string. - Copyright (C) 2007, 2008 Free Software Foundation, Inc. + Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (strcasestr, char *, (char const *, char const *)); + #include #include #include diff --git a/tests/test-strchrnul.c b/tests/test-strchrnul.c --- a/tests/test-strchrnul.c +++ b/tests/test-strchrnul.c @@ -19,6 +19,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (strchrnul, char *, (char const *, int)); + #include #include diff --git a/tests/test-strerror.c b/tests/test-strerror.c --- a/tests/test-strerror.c +++ b/tests/test-strerror.c @@ -21,6 +21,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (strerror, char *, (int)); + #include #include #include diff --git a/tests/test-strsignal.c b/tests/test-strsignal.c --- a/tests/test-strsignal.c +++ b/tests/test-strsignal.c @@ -21,6 +21,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (strsignal, char *, (int)); + #include #include #include diff --git a/tests/test-strstr.c b/tests/test-strstr.c --- a/tests/test-strstr.c +++ b/tests/test-strstr.c @@ -19,6 +19,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (strstr, char *, (char const *, char const *)); + #include #include #include diff --git a/tests/test-strtod.c b/tests/test-strtod.c --- a/tests/test-strtod.c +++ b/tests/test-strtod.c @@ -19,6 +19,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (strtod, double, (char const *, char **)); + #include #include #include diff --git a/tests/test-strverscmp.c b/tests/test-strverscmp.c --- a/tests/test-strverscmp.c +++ b/tests/test-strverscmp.c @@ -21,6 +21,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (strverscmp, int, (const char *, const char *)); + #include #include diff --git a/tests/test-symlink.c b/tests/test-symlink.c --- a/tests/test-symlink.c +++ b/tests/test-symlink.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (symlink, int, (char const *, char const *)); + #include #include #include diff --git a/tests/test-symlinkat.c b/tests/test-symlinkat.c --- a/tests/test-symlinkat.c +++ b/tests/test-symlinkat.c @@ -20,6 +20,10 @@ #include +#include "signature.h" +SIGNATURE_CHECK (symlinkat, int, (char const *, int, char const *)); +SIGNATURE_CHECK (readlinkat, ssize_t, (int, char const *, char *, size_t)); + #include #include #include diff --git a/tests/test-times.c b/tests/test-times.c --- a/tests/test-times.c +++ b/tests/test-times.c @@ -1,5 +1,5 @@ /* Test of times function. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,6 +19,10 @@ #include #include + +#include "signature.h" +SIGNATURE_CHECK (times, clock_t, (struct tms *)); + #include #include #include diff --git a/tests/test-trunc1.c b/tests/test-trunc1.c --- a/tests/test-trunc1.c +++ b/tests/test-trunc1.c @@ -1,5 +1,5 @@ /* Test of rounding towards zero. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (trunc, double, (double)); + #include #include diff --git a/tests/test-truncf1.c b/tests/test-truncf1.c --- a/tests/test-truncf1.c +++ b/tests/test-truncf1.c @@ -1,5 +1,5 @@ /* Test of rounding towards zero. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (truncf, float, (float)); + #include #include diff --git a/tests/test-truncl.c b/tests/test-truncl.c --- a/tests/test-truncl.c +++ b/tests/test-truncl.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (truncl, long double, (long double)); + #include #include #include diff --git a/tests/test-tsearch.c b/tests/test-tsearch.c --- a/tests/test-tsearch.c +++ b/tests/test-tsearch.c @@ -1,5 +1,5 @@ /* Test program for tsearch et al. - Copyright (C) 1997, 2000-2001, 2007-2008 Free Software Foundation, Inc. + Copyright (C) 1997, 2000-2001, 2007-2009 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 @@ -19,6 +19,16 @@ #include +#include "signature.h" +SIGNATURE_CHECK (tdelete, void *, (void const *, void **, + int (*) (void const *, void const *))); +SIGNATURE_CHECK (tfind, void *, (void const *, void * const *, + int (*) (void const *, void const *))); +SIGNATURE_CHECK (tsearch, void *, (void const *, void **, + int (*) (void const *, void const *))); +SIGNATURE_CHECK (twalk, void, (void const *, + void (*) (void const *, VISIT, int))); + #include #include #include diff --git a/tests/test-uname.c b/tests/test-uname.c --- a/tests/test-uname.c +++ b/tests/test-uname.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (uname, int, (struct utsname *)); + #include #include #include diff --git a/tests/test-unlink.c b/tests/test-unlink.c --- a/tests/test-unlink.c +++ b/tests/test-unlink.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (unlink, int, (char const *)); + #include #include #include diff --git a/tests/test-unlinkat.c b/tests/test-unlinkat.c --- a/tests/test-unlinkat.c +++ b/tests/test-unlinkat.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (unlinkat, int, (int, char const *, int)); + #include #include #include diff --git a/tests/test-unsetenv.c b/tests/test-unsetenv.c --- a/tests/test-unsetenv.c +++ b/tests/test-unsetenv.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (unsetenv, int, (char const *)); + #include #include #include diff --git a/tests/test-usleep.c b/tests/test-usleep.c --- a/tests/test-usleep.c +++ b/tests/test-usleep.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (usleep, int, (useconds_t)); + #include #include #include diff --git a/tests/test-utimensat.c b/tests/test-utimensat.c --- a/tests/test-utimensat.c +++ b/tests/test-utimensat.c @@ -20,6 +20,10 @@ #include +#include "signature.h" +SIGNATURE_CHECK (utimensat, int, (int, char const *, struct timespec const[2], + int)); + #include #include #include diff --git a/tests/test-vasprintf.c b/tests/test-vasprintf.c --- a/tests/test-vasprintf.c +++ b/tests/test-vasprintf.c @@ -1,5 +1,5 @@ /* Test of vasprintf() and asprintf() functions. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,10 @@ #include +#include "signature.h" +SIGNATURE_CHECK (asprintf, int, (char **, char const *, ...)); +SIGNATURE_CHECK (vasprintf, int, (char **, char const *, va_list)); + #include #include #include diff --git a/tests/test-vdprintf-posix.c b/tests/test-vdprintf-posix.c --- a/tests/test-vdprintf-posix.c +++ b/tests/test-vdprintf-posix.c @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (vdprintf, int, (int, char const *, va_list)); + #include #include #include diff --git a/tests/test-vfprintf-posix.c b/tests/test-vfprintf-posix.c --- a/tests/test-vfprintf-posix.c +++ b/tests/test-vfprintf-posix.c @@ -1,5 +1,5 @@ /* Test of POSIX compatible vfprintf() function. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (vfprintf, int, (FILE *, char const *, va_list)); + #include #include #include diff --git a/tests/test-vprintf-posix.c b/tests/test-vprintf-posix.c --- a/tests/test-vprintf-posix.c +++ b/tests/test-vprintf-posix.c @@ -1,5 +1,5 @@ /* Test of POSIX compatible vfprintf() function. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (vprintf, int, (char const *, va_list)); + #include #include #include diff --git a/tests/test-vsnprintf.c b/tests/test-vsnprintf.c --- a/tests/test-vsnprintf.c +++ b/tests/test-vsnprintf.c @@ -1,5 +1,5 @@ /* Test of vsnprintf() function. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (vsnprintf, int, (char *, size_t, char const *, va_list)); + #include #include #include diff --git a/tests/test-vsprintf-posix.c b/tests/test-vsprintf-posix.c --- a/tests/test-vsprintf-posix.c +++ b/tests/test-vsprintf-posix.c @@ -1,5 +1,5 @@ /* Test of POSIX compatible vsprintf() function. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (vsprintf, int, (char *, char const *, va_list)); + #include #include #include diff --git a/tests/test-wcrtomb.c b/tests/test-wcrtomb.c --- a/tests/test-wcrtomb.c +++ b/tests/test-wcrtomb.c @@ -1,5 +1,5 @@ /* Test of conversion of wide character to multibyte character. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (wcrtomb, size_t, (char *, wchar_t, mbstate_t *)); + #include #include #include diff --git a/tests/test-wcsnrtombs.c b/tests/test-wcsnrtombs.c --- a/tests/test-wcsnrtombs.c +++ b/tests/test-wcsnrtombs.c @@ -1,5 +1,5 @@ /* Test of conversion of wide string to string. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,10 @@ #include +#include "signature.h" +SIGNATURE_CHECK (wcsnrtombs, size_t, (char *, wchar_t const **, size_t, size_t, + mbstate_t *)); + #include #include #include diff --git a/tests/test-wcsrtombs.c b/tests/test-wcsrtombs.c --- a/tests/test-wcsrtombs.c +++ b/tests/test-wcsrtombs.c @@ -1,5 +1,5 @@ /* Test of conversion of wide string to string. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,10 @@ #include +#include "signature.h" +SIGNATURE_CHECK (wcsrtombs, size_t, (char *, wchar_t const **, size_t, + mbstate_t *)); + #include #include #include diff --git a/tests/test-wcwidth.c b/tests/test-wcwidth.c --- a/tests/test-wcwidth.c +++ b/tests/test-wcwidth.c @@ -1,5 +1,5 @@ /* Test of wcwidth() function. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,9 @@ #include +#include "signature.h" +SIGNATURE_CHECK (wcwidth, int, (wchar_t)); + #include #include #include