changeset 12489:33ab12a7cea2

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 <ebb9@byu.net>
author Eric Blake <ebb9@byu.net>
date Tue, 22 Dec 2009 10:57:14 -0700
parents 9bd9b7a4b42b
children e811ee92408c
files ChangeLog modules/atexit-tests modules/btowc-tests modules/canonicalize-lgpl-tests modules/ceilf-tests modules/ceill-tests modules/chown-tests modules/dprintf-posix-tests modules/dup2-tests modules/dup3-tests modules/duplocale-tests modules/fchdir-tests modules/fcntl-tests modules/fdopendir-tests modules/fflush-tests modules/flock-tests modules/floorf-tests modules/floorl-tests modules/fnmatch-tests modules/fopen-tests modules/fprintf-posix-tests modules/freopen-tests modules/frexp-nolibm-tests modules/frexp-tests modules/frexpl-nolibm-tests modules/frexpl-tests modules/fseek-tests modules/fseeko-tests modules/fsync-tests modules/ftell-tests modules/ftello-tests modules/futimens-tests modules/getaddrinfo-tests modules/getcwd-tests modules/getdelim-tests modules/getdtablesize-tests modules/getgroups-tests modules/gethostname-tests modules/getline-tests modules/getopt-posix-tests modules/gettimeofday-tests modules/glob-tests modules/iconv-tests modules/inet_ntop-tests modules/inet_pton-tests modules/isblank-tests modules/lchown-tests modules/ldexpl-tests modules/link-tests modules/linkat-tests modules/lseek-tests modules/lstat-tests modules/mbrtowc-tests modules/mbsinit-tests modules/mbsnrtowcs-tests modules/mbsrtowcs-tests modules/memchr-tests modules/memcmp-tests modules/memmem-tests modules/memrchr-tests modules/mkdir-tests modules/mkfifo-tests modules/mkfifoat-tests modules/mknod-tests modules/nanosleep-tests modules/nl_langinfo-tests modules/obstack-printf-tests modules/open-tests modules/openat-tests modules/perror-tests modules/pipe2-tests modules/poll-tests modules/popen-tests modules/posix_spawn-tests modules/posix_spawnp-tests modules/pread-tests modules/printf-posix-tests modules/pty-tests modules/random_r-tests modules/rawmemchr-tests modules/readlink-tests modules/remove-tests modules/rename-tests modules/renameat-tests modules/rmdir-tests modules/round-tests modules/roundf-tests modules/roundl-tests modules/select-tests modules/setenv-tests modules/sigaction-tests modules/sleep-tests modules/snprintf-posix-tests modules/snprintf-tests modules/sprintf-posix-tests modules/stat-tests modules/strcasestr-tests modules/strchrnul-tests modules/strerror-tests modules/strsignal-tests modules/strstr-tests modules/strtod-tests modules/strverscmp-tests modules/symlink-tests modules/symlinkat-tests modules/times-tests modules/trunc-tests modules/truncf-tests modules/truncl-tests modules/tsearch-tests modules/uname-tests modules/unlink-tests modules/unsetenv-tests modules/usleep-tests modules/utimensat-tests modules/vasprintf-tests modules/vdprintf-posix-tests modules/vfprintf-posix-tests modules/vprintf-posix-tests modules/vsnprintf-posix-tests modules/vsnprintf-tests modules/vsprintf-posix-tests modules/wcrtomb-tests modules/wcsnrtombs-tests modules/wcsrtombs-tests modules/wcwidth-tests tests/signature.h tests/test-atexit.c tests/test-btowc.c tests/test-canonicalize-lgpl.c tests/test-ceilf1.c tests/test-ceill.c tests/test-chown.c tests/test-dprintf-posix.c tests/test-dup2.c tests/test-dup3.c tests/test-duplocale.c tests/test-fchdir.c tests/test-fchownat.c tests/test-fcntl.c tests/test-fdopendir.c tests/test-fflush.c tests/test-flock.c tests/test-floorf1.c tests/test-floorl.c tests/test-fnmatch.c tests/test-fopen.c tests/test-fprintf-posix.c tests/test-freopen.c tests/test-frexp.c tests/test-frexpl.c tests/test-fseek.c tests/test-fseeko.c tests/test-fstatat.c tests/test-fsync.c tests/test-ftell.c tests/test-ftello.c tests/test-futimens.c tests/test-getaddrinfo.c tests/test-getcwd.c tests/test-getdelim.c tests/test-getdtablesize.c tests/test-getgroups.c tests/test-gethostname.c tests/test-getline.c tests/test-getopt.c tests/test-gettimeofday.c tests/test-glob.c tests/test-iconv.c tests/test-inet_ntop.c tests/test-inet_pton.c tests/test-isblank.c tests/test-isfinite.c tests/test-isinf.c tests/test-isnan.c tests/test-lchown.c tests/test-ldexpl.c tests/test-link.c tests/test-linkat.c tests/test-lseek.c tests/test-lstat.c tests/test-mbrtowc.c tests/test-mbsinit.c tests/test-mbsnrtowcs.c tests/test-mbsrtowcs.c tests/test-memchr.c tests/test-memcmp.c tests/test-memmem.c tests/test-memrchr.c tests/test-mkdir.c tests/test-mkdirat.c tests/test-mkfifo.c tests/test-mkfifoat.c tests/test-mknod.c tests/test-nanosleep.c tests/test-nl_langinfo.c tests/test-obstack-printf.c tests/test-open.c tests/test-openat.c tests/test-perror.c tests/test-pipe2.c tests/test-poll.c tests/test-popen.c tests/test-posix_spawn1.c tests/test-posix_spawn3.c tests/test-pread.c tests/test-printf-posix.c tests/test-pty.c tests/test-random_r.c tests/test-rawmemchr.c tests/test-readlink.c tests/test-remove.c tests/test-rename.c tests/test-renameat.c tests/test-rmdir.c tests/test-round1.c tests/test-roundf1.c tests/test-roundl.c tests/test-select.c tests/test-setenv.c tests/test-sigaction.c tests/test-signbit.c tests/test-sleep.c tests/test-snprintf.c tests/test-sprintf-posix.c tests/test-stat.c tests/test-stpncpy.c tests/test-strcasestr.c tests/test-strchrnul.c tests/test-strerror.c tests/test-strsignal.c tests/test-strstr.c tests/test-strtod.c tests/test-strverscmp.c tests/test-symlink.c tests/test-symlinkat.c tests/test-times.c tests/test-trunc1.c tests/test-truncf1.c tests/test-truncl.c tests/test-tsearch.c tests/test-uname.c tests/test-unlink.c tests/test-unlinkat.c tests/test-unsetenv.c tests/test-usleep.c tests/test-utimensat.c tests/test-vasprintf.c tests/test-vdprintf-posix.c tests/test-vfprintf-posix.c tests/test-vprintf-posix.c tests/test-vsnprintf.c tests/test-vsprintf-posix.c tests/test-wcrtomb.c tests/test-wcsnrtombs.c tests/test-wcsrtombs.c tests/test-wcwidth.c
diffstat 257 files changed, 998 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,278 @@
 2009-12-24  Eric Blake  <ebb9@byu.net>
 
+	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.
--- a/modules/atexit-tests
+++ b/modules/atexit-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-atexit.sh
 tests/test-atexit.c
 
--- 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
--- 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:
--- 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
--- a/modules/ceill-tests
+++ b/modules/ceill-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-ceill.c
 tests/nan.h
 
--- 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
--- 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
--- a/modules/dup2-tests
+++ b/modules/dup2-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-dup2.c
 
 Depends-on:
--- a/modules/dup3-tests
+++ b/modules/dup3-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-dup3.c
 
 Depends-on:
--- a/modules/duplocale-tests
+++ b/modules/duplocale-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-duplocale.c
 
 Depends-on:
--- a/modules/fchdir-tests
+++ b/modules/fchdir-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-fchdir.c
 
 Depends-on:
--- a/modules/fcntl-tests
+++ b/modules/fcntl-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-fcntl.c
 
 Depends-on:
--- a/modules/fdopendir-tests
+++ b/modules/fdopendir-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-fdopendir.c
 
 Depends-on:
--- 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
--- a/modules/flock-tests
+++ b/modules/flock-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-flock.c
 
 Depends-on:
--- 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
--- a/modules/floorl-tests
+++ b/modules/floorl-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-floorl.c
 tests/nan.h
 
--- a/modules/fnmatch-tests
+++ b/modules/fnmatch-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-fnmatch.c
 
 Makefile.am:
--- a/modules/fopen-tests
+++ b/modules/fopen-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-fopen.h
 tests/test-fopen.c
 
--- 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
--- a/modules/freopen-tests
+++ b/modules/freopen-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-freopen.c
 
 Depends-on:
--- a/modules/frexp-nolibm-tests
+++ b/modules/frexp-nolibm-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-frexp.c
 
 Depends-on:
--- a/modules/frexp-tests
+++ b/modules/frexp-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-frexp.c
 tests/nan.h
 
--- a/modules/frexpl-nolibm-tests
+++ b/modules/frexpl-nolibm-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-frexpl.c
 
 Depends-on:
--- a/modules/frexpl-tests
+++ b/modules/frexpl-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-frexpl.c
 tests/nan.h
 
--- 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
--- 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
--- a/modules/fsync-tests
+++ b/modules/fsync-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-fsync.c
 
 Depends-on:
--- 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
--- 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
--- 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
--- a/modules/getaddrinfo-tests
+++ b/modules/getaddrinfo-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-getaddrinfo.c
 
 Depends-on:
--- a/modules/getcwd-tests
+++ b/modules/getcwd-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-getcwd.c
 
 Depends-on:
--- a/modules/getdelim-tests
+++ b/modules/getdelim-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-getdelim.c
 
 Depends-on:
--- a/modules/getdtablesize-tests
+++ b/modules/getdtablesize-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-getdtablesize.c
 
 Depends-on:
--- a/modules/getgroups-tests
+++ b/modules/getgroups-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-getgroups.c
 
 Depends-on:
--- a/modules/gethostname-tests
+++ b/modules/gethostname-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-gethostname.c
 
 Depends-on:
--- a/modules/getline-tests
+++ b/modules/getline-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-getline.c
 
 Depends-on:
--- 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
--- a/modules/gettimeofday-tests
+++ b/modules/gettimeofday-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-gettimeofday.c
 
 Depends-on:
--- a/modules/glob-tests
+++ b/modules/glob-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-glob.c
 
 Makefile.am:
--- a/modules/iconv-tests
+++ b/modules/iconv-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-iconv.c
 
 Depends-on:
--- 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:
--- 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:
--- a/modules/isblank-tests
+++ b/modules/isblank-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-isblank.c
 
 Depends-on:
--- 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
--- a/modules/ldexpl-tests
+++ b/modules/ldexpl-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-ldexpl.c
 tests/nan.h
 
--- a/modules/link-tests
+++ b/modules/link-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-link.h
 tests/test-link.c
 
--- a/modules/linkat-tests
+++ b/modules/linkat-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-link.h
 tests/test-linkat.c
 
--- a/modules/lseek-tests
+++ b/modules/lseek-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-lseek.c
 tests/test-lseek.sh
 
--- a/modules/lstat-tests
+++ b/modules/lstat-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-lstat.h
 tests/test-lstat.c
 
--- 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
--- 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
--- 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
--- 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
--- a/modules/memchr-tests
+++ b/modules/memchr-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-memchr.c
 tests/zerosize-ptr.h
 
--- 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
--- 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
--- 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
--- a/modules/mkdir-tests
+++ b/modules/mkdir-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-mkdir.h
 tests/test-mkdir.c
 
--- a/modules/mkfifo-tests
+++ b/modules/mkfifo-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-mkfifo.h
 tests/test-mkfifo.c
 
--- a/modules/mkfifoat-tests
+++ b/modules/mkfifoat-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-mkfifo.h
 tests/test-mkfifoat.c
 
--- a/modules/mknod-tests
+++ b/modules/mknod-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-mkfifo.h
 tests/test-mknod.c
 
--- a/modules/nanosleep-tests
+++ b/modules/nanosleep-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-nanosleep.c
 
 Depends-on:
--- 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
--- 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:
--- a/modules/open-tests
+++ b/modules/open-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-open.h
 tests/test-open.c
 
--- 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
--- a/modules/perror-tests
+++ b/modules/perror-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-perror.c
 tests/test-perror.sh
 
--- a/modules/pipe2-tests
+++ b/modules/pipe2-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-pipe2.c
 
 Depends-on:
--- a/modules/poll-tests
+++ b/modules/poll-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-poll.c
 
 Depends-on:
--- a/modules/popen-tests
+++ b/modules/popen-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-popen.h
 tests/test-popen.c
 
--- 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:
--- 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
--- 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
--- 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
--- a/modules/pty-tests
+++ b/modules/pty-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-pty.c
 
 Makefile.am:
--- 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:
--- a/modules/rawmemchr-tests
+++ b/modules/rawmemchr-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-rawmemchr.c
 
 Depends-on:
--- a/modules/readlink-tests
+++ b/modules/readlink-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-readlink.h
 tests/test-readlink.c
 
--- a/modules/remove-tests
+++ b/modules/remove-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-remove.c
 
 Depends-on:
--- a/modules/rename-tests
+++ b/modules/rename-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-rename.h
 tests/test-rename.c
 
--- a/modules/renameat-tests
+++ b/modules/renameat-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-rename.h
 tests/test-renameat.c
 
--- a/modules/rmdir-tests
+++ b/modules/rmdir-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-rmdir.h
 tests/test-rmdir.c
 
--- 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
--- 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
--- a/modules/roundl-tests
+++ b/modules/roundl-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-roundl.c
 tests/nan.h
 
--- 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
--- a/modules/setenv-tests
+++ b/modules/setenv-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-setenv.c
 
 Depends-on:
--- a/modules/sigaction-tests
+++ b/modules/sigaction-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-sigaction.c
 
 Depends-on:
--- a/modules/sleep-tests
+++ b/modules/sleep-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-sleep.c
 
 Depends-on:
--- 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
--- a/modules/snprintf-tests
+++ b/modules/snprintf-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-snprintf.c
 
 Depends-on:
--- 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
--- a/modules/stat-tests
+++ b/modules/stat-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-stat.h
 tests/test-stat.c
 
--- a/modules/strcasestr-tests
+++ b/modules/strcasestr-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-strcasestr.c
 
 Depends-on:
--- a/modules/strchrnul-tests
+++ b/modules/strchrnul-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-strchrnul.c
 
 Depends-on:
--- a/modules/strerror-tests
+++ b/modules/strerror-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-strerror.c
 
 Depends-on:
--- a/modules/strsignal-tests
+++ b/modules/strsignal-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-strsignal.c
 
 Depends-on:
--- 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
--- a/modules/strtod-tests
+++ b/modules/strtod-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-strtod.c
 
 Depends-on:
--- a/modules/strverscmp-tests
+++ b/modules/strverscmp-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-strverscmp.c
 
 Depends-on:
--- a/modules/symlink-tests
+++ b/modules/symlink-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-symlink.h
 tests/test-symlink.c
 
--- 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
--- a/modules/times-tests
+++ b/modules/times-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-times.c
 
 Makefile.am:
--- 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
--- 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
--- a/modules/truncl-tests
+++ b/modules/truncl-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-truncl.c
 tests/nan.h
 
--- a/modules/tsearch-tests
+++ b/modules/tsearch-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-tsearch.sh
 tests/test-tsearch.c
 
--- a/modules/uname-tests
+++ b/modules/uname-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-uname.c
 
 Depends-on:
--- a/modules/unlink-tests
+++ b/modules/unlink-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-unlink.h
 tests/test-unlink.c
 
--- a/modules/unsetenv-tests
+++ b/modules/unsetenv-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-unsetenv.c
 
 Depends-on:
--- a/modules/usleep-tests
+++ b/modules/usleep-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-usleep.c
 
 Depends-on:
--- 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
--- a/modules/vasprintf-tests
+++ b/modules/vasprintf-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-vasprintf.c
 
 Depends-on:
--- 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
--- 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
--- 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
--- 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
--- a/modules/vsnprintf-tests
+++ b/modules/vsnprintf-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-vsnprintf.c
 
 Depends-on:
--- 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
--- 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
--- 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
--- 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
--- a/modules/wcwidth-tests
+++ b/modules/wcwidth-tests
@@ -1,4 +1,5 @@
 Files:
+tests/signature.h
 tests/test-wcwidth.c
 
 Depends-on:
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 <http://www.gnu.org/licenses/>.  */
+
+#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
+   <config.h> 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 <config.h>
+   #include <foo.h>
+   #include "signature.h"
+   SIGNATURE_CHECK (foo, int, (char, float));
+   #include <other.h>
+   ...
+*/
+# 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 */
--- 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 <config.h>
 
 #include <stdlib.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (atexit, int, (void (*) (void)));
+
 #include <unistd.h>
 
 #define TEMPFILE "t-atexit.tmp"
--- 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 <wchar.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (btowc, wint_t, (int));
+
 #include <locale.h>
 #include <stdio.h>
 #include <stdlib.h>
--- a/tests/test-canonicalize-lgpl.c
+++ b/tests/test-canonicalize-lgpl.c
@@ -20,6 +20,10 @@
 
 #include <stdlib.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (realpath, char *, (const char *, char *));
+SIGNATURE_CHECK (canonicalize_file_name, char *, (const char *));
+
 #include <errno.h>
 #include <fcntl.h>
 #include <stdio.h>
--- 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 <math.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (ceilf, float, (float));
+
 #include <stdio.h>
 #include <stdlib.h>
 
--- a/tests/test-ceill.c
+++ b/tests/test-ceill.c
@@ -20,6 +20,9 @@
 
 #include <math.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (ceill, long double, (long double));
+
 #include <float.h>
 #include <stdio.h>
 #include <stdlib.h>
--- a/tests/test-chown.c
+++ b/tests/test-chown.c
@@ -20,6 +20,9 @@
 
 #include <unistd.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (chown, int, (char const *, uid_t, gid_t));
+
 #include <fcntl.h>
 #include <errno.h>
 #include <stdbool.h>
--- a/tests/test-dprintf-posix.c
+++ b/tests/test-dprintf-posix.c
@@ -20,6 +20,9 @@
 
 #include <stdio.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (dprintf, int, (int, const char *, ...));
+
 #include <stddef.h>
 #include <stdint.h>
 #include <stdlib.h>
--- a/tests/test-dup2.c
+++ b/tests/test-dup2.c
@@ -20,6 +20,9 @@
 
 #include <unistd.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (dup2, int, (int, int));
+
 #include <errno.h>
 #include <fcntl.h>
 #include <stdio.h>
--- a/tests/test-dup3.c
+++ b/tests/test-dup3.c
@@ -21,6 +21,9 @@
 
 #include <unistd.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (dup3, int, (int, int, int));
+
 #include <errno.h>
 #include <fcntl.h>
 #include <stdbool.h>
--- 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 <langinfo.h>
 #include <monetary.h>
 #include <stdio.h>
--- a/tests/test-fchdir.c
+++ b/tests/test-fchdir.c
@@ -20,6 +20,9 @@
 
 #include <unistd.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (fchdir, int, (int));
+
 #include <errno.h>
 #include <fcntl.h>
 #include <stdio.h>
--- a/tests/test-fchownat.c
+++ b/tests/test-fchownat.c
@@ -20,6 +20,9 @@
 
 #include <unistd.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (fchownat, int, (int, char const *, uid_t, gid_t, int));
+
 #include <fcntl.h>
 #include <errno.h>
 #include <stdbool.h>
--- a/tests/test-fcntl.c
+++ b/tests/test-fcntl.c
@@ -21,6 +21,9 @@
 /* Specification.  */
 #include <fcntl.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (fcntl, int, (int, int, ...));
+
 /* Helpers.  */
 #include <errno.h>
 #include <stdarg.h>
--- a/tests/test-fdopendir.c
+++ b/tests/test-fdopendir.c
@@ -20,6 +20,9 @@
 
 #include <dirent.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (fdopendir, DIR *, (int));
+
 #include <errno.h>
 #include <fcntl.h>
 #include <stdio.h>
--- a/tests/test-fflush.c
+++ b/tests/test-fflush.c
@@ -19,6 +19,10 @@
 #include <config.h>
 
 #include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fflush, int, (FILE *));
+
 #include <unistd.h>
 
 int
--- a/tests/test-flock.c
+++ b/tests/test-flock.c
@@ -18,6 +18,9 @@
 
 #include <sys/file.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (flock, int, (int, int));
+
 #include <fcntl.h>
 #include <stdio.h>
 #include <stdlib.h>
--- 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 <math.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (floorf, float, (float));
+
 #include <stdio.h>
 #include <stdlib.h>
 
--- a/tests/test-floorl.c
+++ b/tests/test-floorl.c
@@ -20,6 +20,9 @@
 
 #include <math.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (floorl, long double, (long double));
+
 #include <float.h>
 #include <stdio.h>
 #include <stdlib.h>
--- a/tests/test-fnmatch.c
+++ b/tests/test-fnmatch.c
@@ -20,6 +20,9 @@
 
 #include <fnmatch.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (fnmatch, int, (char const *, char const *, int));
+
 #include <stdio.h>
 #include <stdlib.h>
 
--- a/tests/test-fopen.c
+++ b/tests/test-fopen.c
@@ -20,6 +20,9 @@
 
 #include <stdio.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (fopen, FILE *, (char const *, char const *));
+
 #define BASE "test-fopen.t"
 
 #include "test-fopen.h"
--- 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 <stdio.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (fprintf, int, (FILE *, char const *, ...));
+
 #include <stdarg.h>
 #include <stddef.h>
 #include <stdint.h>
--- 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 <config.h>
 
 #include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (freopen, FILE *, (char const *, char const *, FILE *));
+
 #include <stdlib.h>
 
 #define ASSERT(expr) \
--- 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 <math.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (frexp, double, (double, int *));
+
 #include <float.h>
 #include <stdio.h>
 #include <stdlib.h>
--- a/tests/test-frexpl.c
+++ b/tests/test-frexpl.c
@@ -20,6 +20,9 @@
 
 #include <math.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (frexpl, long double, (long double, int *));
+
 #include <float.h>
 #include <stdio.h>
 #include <stdlib.h>
--- a/tests/test-fseek.c
+++ b/tests/test-fseek.c
@@ -19,6 +19,10 @@
 #include <config.h>
 
 #include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fseek, int, (FILE *, long, int));
+
 #include <stdlib.h>
 
 #define ASSERT(expr) \
--- a/tests/test-fseeko.c
+++ b/tests/test-fseeko.c
@@ -26,6 +26,10 @@
 #endif
 
 #include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fseeko, int, (FILE *, off_t, int));
+
 #include <stdlib.h>
 
 #define ASSERT(expr) \
--- a/tests/test-fstatat.c
+++ b/tests/test-fstatat.c
@@ -20,6 +20,9 @@
 
 #include <sys/stat.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (fstatat, int, (int, char const *, struct stat *, int));
+
 #include <fcntl.h>
 #include <errno.h>
 #include <stdbool.h>
--- a/tests/test-fsync.c
+++ b/tests/test-fsync.c
@@ -18,6 +18,9 @@
 
 #include <unistd.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (fsync, int, (int));
+
 #include <errno.h>
 #include <stdio.h>
 #include <fcntl.h>
--- a/tests/test-ftell.c
+++ b/tests/test-ftell.c
@@ -19,6 +19,10 @@
 #include <config.h>
 
 #include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (ftell, long, (FILE *));
+
 #include <stdlib.h>
 
 #include "binary-io.h"
--- a/tests/test-ftello.c
+++ b/tests/test-ftello.c
@@ -19,6 +19,10 @@
 #include <config.h>
 
 #include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (ftello, off_t, (FILE *));
+
 #include <stdlib.h>
 
 #include "binary-io.h"
--- a/tests/test-futimens.c
+++ b/tests/test-futimens.c
@@ -20,6 +20,9 @@
 
 #include <sys/stat.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (futimens, int, (int, struct timespec const[2]));
+
 #include <fcntl.h>
 #include <errno.h>
 #include <stdbool.h>
--- a/tests/test-getaddrinfo.c
+++ b/tests/test-getaddrinfo.c
@@ -18,8 +18,16 @@
 /* Written by Simon Josefsson.  */
 
 #include <config.h>
+
 #include <netdb.h>
 
+#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 <arpa/inet.h>
 #include <errno.h>
 #include <netinet/in.h>
--- a/tests/test-getcwd.c
+++ b/tests/test-getcwd.c
@@ -18,6 +18,9 @@
 
 #include <unistd.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (getcwd, char *, (char *, size_t));
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
--- a/tests/test-getdelim.c
+++ b/tests/test-getdelim.c
@@ -20,6 +20,10 @@
 #include <config.h>
 
 #include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (getdelim, ssize_t, (char **, size_t *, int, FILE *));
+
 #include <stdlib.h>
 #include <string.h>
 
--- 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 <unistd.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (getdtablesize, int, (void));
+
 #include <stdio.h>
 #include <stdlib.h>
 
--- a/tests/test-getgroups.c
+++ b/tests/test-getgroups.c
@@ -20,6 +20,9 @@
 
 #include <unistd.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (getgroups, int, (int, gid_t[]));
+
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
--- a/tests/test-gethostname.c
+++ b/tests/test-gethostname.c
@@ -19,6 +19,10 @@
 
 /* Get gethostname() declaration.  */
 #include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (gethostname, int, (char *, size_t));
+
 /* Get HOST_NAME_MAX definition.  */
 #include <limits.h>
 
--- a/tests/test-getline.c
+++ b/tests/test-getline.c
@@ -20,6 +20,10 @@
 #include <config.h>
 
 #include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (getline, ssize_t, (char **, size_t *, FILE *));
+
 #include <stdlib.h>
 #include <string.h>
 
--- a/tests/test-getopt.c
+++ b/tests/test-getopt.c
@@ -27,9 +27,25 @@
 
 #if GNULIB_GETOPT_GNU
 # include <getopt.h>
+
+# 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 <unistd.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (getopt, int, (int, char * const[], char const *));
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
--- a/tests/test-gettimeofday.c
+++ b/tests/test-gettimeofday.c
@@ -18,6 +18,10 @@
 #include <config.h>
 
 #include <sys/time.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (gettimeofday, int, (struct timeval *, void *));
+
 #include <time.h>
 
 #include <stdio.h>
--- a/tests/test-glob.c
+++ b/tests/test-glob.c
@@ -20,6 +20,11 @@
 
 #include <glob.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (glob, int, (char const *, int, int (*) (char const *, int),
+                             glob_t *));
+SIGNATURE_CHECK (globfree, void, (glob_t *));
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
--- 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 <iconv.h>
+
+# 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 <errno.h>
--- a/tests/test-inet_ntop.c
+++ b/tests/test-inet_ntop.c
@@ -20,6 +20,10 @@
 
 #include <arpa/inet.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (inet_ntop, char const *, (int, void const *, char *,
+                                           socklen_t));
+
 #include <netinet/in.h>
 #include <sys/socket.h>
 #include <stdio.h>
--- a/tests/test-inet_pton.c
+++ b/tests/test-inet_pton.c
@@ -20,6 +20,9 @@
 
 #include <arpa/inet.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (inet_pton, int, (int, const char *, void *));
+
 #include <netinet/in.h>
 #include <sys/socket.h>
 #include <stdio.h>
--- a/tests/test-isblank.c
+++ b/tests/test-isblank.c
@@ -20,6 +20,9 @@
 
 #include <ctype.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (isblank, int, (int));
+
 #include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
--- a/tests/test-isfinite.c
+++ b/tests/test-isfinite.c
@@ -21,6 +21,11 @@
 
 #include <math.h>
 
+/* isfinite must be a macro.  */
+#ifndef isfinite
+# error missing declaration
+#endif
+
 #include <float.h>
 #include <limits.h>
 #include <stdio.h>
--- a/tests/test-isinf.c
+++ b/tests/test-isinf.c
@@ -21,6 +21,11 @@
 
 #include <math.h>
 
+/* isinf must be a macro.  */
+#ifndef isinf
+# error missing declaration
+#endif
+
 #include <float.h>
 #include <limits.h>
 #include <stdio.h>
--- a/tests/test-isnan.c
+++ b/tests/test-isnan.c
@@ -21,6 +21,11 @@
 
 #include <math.h>
 
+/* isnan must be a macro.  */
+#ifndef isnan
+# error missing declaration
+#endif
+
 #include <float.h>
 #include <limits.h>
 #include <stdio.h>
--- a/tests/test-lchown.c
+++ b/tests/test-lchown.c
@@ -20,6 +20,9 @@
 
 #include <unistd.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (lchown, int, (char const *, uid_t, gid_t));
+
 #include <fcntl.h>
 #include <errno.h>
 #include <stdbool.h>
--- a/tests/test-ldexpl.c
+++ b/tests/test-ldexpl.c
@@ -20,6 +20,9 @@
 
 #include <math.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (ldexpl, long double, (long double, int));
+
 #include <float.h>
 #include <stdio.h>
 #include <stdlib.h>
--- a/tests/test-link.c
+++ b/tests/test-link.c
@@ -18,6 +18,9 @@
 
 #include <unistd.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (link, int, (char const *, char const *));
+
 #include <errno.h>
 #include <fcntl.h>
 #include <stdbool.h>
--- a/tests/test-linkat.c
+++ b/tests/test-linkat.c
@@ -20,6 +20,9 @@
 
 #include <unistd.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (linkat, int, (int, char const *, int, char const *, int));
+
 #include <fcntl.h>
 #include <errno.h>
 #include <stdbool.h>
--- 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 <config.h>
 
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (lseek, off_t, (int, off_t, int));
+
 #include <errno.h>
 #include <stdio.h>
-#include <unistd.h>
 
 #define ASSERT(expr) \
   do                                                                         \
--- a/tests/test-lstat.c
+++ b/tests/test-lstat.c
@@ -20,6 +20,13 @@
 
 #include <sys/stat.h>
 
+/* 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 <fcntl.h>
 #include <errno.h>
 #include <stdbool.h>
--- 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 <wchar.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (mbrtowc, size_t, (wchar_t *, char const *, size_t,
+                                   mbstate_t *));
+
 #include <locale.h>
 #include <stdio.h>
 #include <stdlib.h>
--- 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 <wchar.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (mbsinit, int, (const mbstate_t *));
+
 #include <locale.h>
 #include <stdio.h>
 #include <stdlib.h>
--- 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 <wchar.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (mbsnrtowcs, size_t, (wchar_t *, char const **, size_t, size_t,
+                                      mbstate_t *));
+
 #include <locale.h>
 #include <stdio.h>
 #include <stdlib.h>
--- 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 <wchar.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (mbsrtowcs, size_t, (wchar_t *, char const **, size_t,
+                                     mbstate_t *));
+
 #include <locale.h>
 #include <stdio.h>
 #include <stdlib.h>
--- a/tests/test-memchr.c
+++ b/tests/test-memchr.c
@@ -19,6 +19,9 @@
 
 #include <string.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (memchr, void *, (void const *, int, size_t));
+
 #include <stdio.h>
 #include <stdlib.h>
 
--- a/tests/test-memcmp.c
+++ b/tests/test-memcmp.c
@@ -19,6 +19,9 @@
 
 #include <string.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (memcmp, int, (void const *, void const *, size_t));
+
 #include <stdio.h>
 #include <stdlib.h>
 
--- a/tests/test-memmem.c
+++ b/tests/test-memmem.c
@@ -19,6 +19,9 @@
 
 #include <string.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (memmem, void *, (void const *, size_t, void const *, size_t));
+
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
--- a/tests/test-memrchr.c
+++ b/tests/test-memrchr.c
@@ -19,6 +19,9 @@
 
 #include <string.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (memrchr, void *, (void const *, int, size_t));
+
 #include <stdio.h>
 #include <stdlib.h>
 
--- a/tests/test-mkdir.c
+++ b/tests/test-mkdir.c
@@ -20,6 +20,9 @@
 
 #include <sys/stat.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (mkdir, int, (char const *, mode_t));
+
 #include <fcntl.h>
 #include <errno.h>
 #include <stdbool.h>
--- a/tests/test-mkdirat.c
+++ b/tests/test-mkdirat.c
@@ -20,6 +20,9 @@
 
 #include <sys/stat.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (mkdirat, int, (int, char const *, mode_t));
+
 #include <fcntl.h>
 #include <errno.h>
 #include <stdbool.h>
--- a/tests/test-mkfifo.c
+++ b/tests/test-mkfifo.c
@@ -20,6 +20,9 @@
 
 #include <sys/stat.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (mkfifo, int, (char const *, mode_t));
+
 #include <fcntl.h>
 #include <errno.h>
 #include <stdbool.h>
--- a/tests/test-mkfifoat.c
+++ b/tests/test-mkfifoat.c
@@ -20,6 +20,10 @@
 
 #include <sys/stat.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (mkfifoat, int, (int, char const *, mode_t));
+SIGNATURE_CHECK (mknodat, int, (int, char const *, mode_t, dev_t));
+
 #include <fcntl.h>
 #include <errno.h>
 #include <stdbool.h>
--- a/tests/test-mknod.c
+++ b/tests/test-mknod.c
@@ -20,6 +20,9 @@
 
 #include <sys/stat.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (mknod, int, (char const *, mode_t, dev_t));
+
 #include <fcntl.h>
 #include <errno.h>
 #include <stdbool.h>
--- a/tests/test-nanosleep.c
+++ b/tests/test-nanosleep.c
@@ -20,6 +20,9 @@
 
 #include <time.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (nanosleep, int, (struct timespec const *, struct timepec *));
+
 #include <errno.h>
 #include <signal.h>
 #include <stdio.h>
--- a/tests/test-nl_langinfo.c
+++ b/tests/test-nl_langinfo.c
@@ -20,6 +20,9 @@
 
 #include <langinfo.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (nl_langinfo, char *, (nl_item));
+
 #include <locale.h>
 #include <stdio.h>
 #include <stdlib.h>
--- a/tests/test-obstack-printf.c
+++ b/tests/test-obstack-printf.c
@@ -20,6 +20,11 @@
 
 #include <stdio.h>
 
+#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"
 
--- a/tests/test-open.c
+++ b/tests/test-open.c
@@ -20,6 +20,9 @@
 
 #include <fcntl.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (open, int, (char const *, int, ...));
+
 #include <errno.h>
 #include <stdbool.h>
 #include <stdio.h>
--- a/tests/test-openat.c
+++ b/tests/test-openat.c
@@ -20,6 +20,9 @@
 
 #include <fcntl.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (openat, int, (int, char const *, int, ...));
+
 #include <errno.h>
 #include <stdarg.h>
 #include <stdbool.h>
--- 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 <stdio.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (perror, void, (char const *));
+
 #include <errno.h>
 
 int
--- a/tests/test-pipe2.c
+++ b/tests/test-pipe2.c
@@ -19,6 +19,9 @@
 
 #include <unistd.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (pipe2, int, (int[2], int));
+
 #include <fcntl.h>
 #include <stdbool.h>
 
--- a/tests/test-poll.c
+++ b/tests/test-poll.c
@@ -19,12 +19,16 @@
 
 #include <config.h>
 
+#include <poll.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (poll, int, (struct pollfd[], nfds_t, int));
+
 #include <stdio.h>
 #include <string.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
-#include <poll.h>
 #include <fcntl.h>
 #include <stdlib.h>
 #include <stdbool.h>
--- a/tests/test-popen.c
+++ b/tests/test-popen.c
@@ -21,4 +21,8 @@
 /* Specification.  */
 #include <stdio.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (popen, FILE *, (char const *, char const *));
+SIGNATURE_CHECK (pclose, int, (FILE *));
+
 #include "test-popen.h"
--- a/tests/test-posix_spawn1.c
+++ b/tests/test-posix_spawn1.c
@@ -20,6 +20,28 @@
 
 #include <spawn.h>
 
+#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 <errno.h>
 #include <fcntl.h>
 #include <signal.h>
--- a/tests/test-posix_spawn3.c
+++ b/tests/test-posix_spawn3.c
@@ -23,6 +23,11 @@
 
 #include <spawn.h>
 
+#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 <errno.h>
 #include <fcntl.h>
 #include <signal.h>
--- a/tests/test-pread.c
+++ b/tests/test-pread.c
@@ -20,6 +20,9 @@
 
 #include <unistd.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (pread, ssize_t, (int, void *, size_t, off_t));
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/types.h>
--- 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 <stdio.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (printf, int, (char const *, ...));
+
 #include <stddef.h>
 #include <stdint.h>
 #include <stdlib.h>
--- a/tests/test-pty.c
+++ b/tests/test-pty.c
@@ -20,6 +20,12 @@
 
 #include <pty.h>
 
+#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 <stdio.h>
 
 int
--- a/tests/test-random_r.c
+++ b/tests/test-random_r.c
@@ -18,6 +18,13 @@
 
 #include <stdlib.h>
 
+#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 <stdio.h>
 #include <time.h>
 
--- a/tests/test-rawmemchr.c
+++ b/tests/test-rawmemchr.c
@@ -19,6 +19,9 @@
 
 #include <string.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (rawmemchr, void *, (void const *, int));
+
 #include <stdio.h>
 #include <stdlib.h>
 
--- a/tests/test-readlink.c
+++ b/tests/test-readlink.c
@@ -20,6 +20,9 @@
 
 #include <unistd.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (readlink, ssize_t, (char const *, char *, size_t));
+
 #include <fcntl.h>
 #include <errno.h>
 #include <stdbool.h>
--- a/tests/test-remove.c
+++ b/tests/test-remove.c
@@ -20,6 +20,9 @@
 
 #include <stdio.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (remove, int, (char const *));
+
 #include <fcntl.h>
 #include <errno.h>
 #include <stdlib.h>
--- a/tests/test-rename.c
+++ b/tests/test-rename.c
@@ -16,12 +16,14 @@
 
 #include <config.h>
 
-#include <unistd.h>
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (rename, int, (char const *, char const *));
 
 #include <errno.h>
 #include <fcntl.h>
 #include <stdbool.h>
-#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <sys/stat.h>
--- a/tests/test-renameat.c
+++ b/tests/test-renameat.c
@@ -20,6 +20,9 @@
 
 #include <stdio.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (renameat, int, (int, char const *, int, char const *));
+
 #include <fcntl.h>
 #include <errno.h>
 #include <stdbool.h>
--- a/tests/test-rmdir.c
+++ b/tests/test-rmdir.c
@@ -20,6 +20,9 @@
 
 #include <unistd.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (rmdir, int, (char const *));
+
 #include <fcntl.h>
 #include <errno.h>
 #include <stdbool.h>
--- 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 <math.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (round, double, (double));
+
 #include <stdio.h>
 #include <stdlib.h>
 
--- 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 <math.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (roundf, float, (float));
+
 #include <stdio.h>
 #include <stdlib.h>
 
--- a/tests/test-roundl.c
+++ b/tests/test-roundl.c
@@ -22,6 +22,9 @@
 
 #include <math.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (roundl, long double, (long double));
+
 #include <float.h>
 #include <stdio.h>
 #include <stdlib.h>
--- a/tests/test-select.c
+++ b/tests/test-select.c
@@ -20,6 +20,24 @@
 
 #include <sys/select.h>
 
+#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 <stdio.h>
 #include <string.h>
 #include <netinet/in.h>
--- a/tests/test-setenv.c
+++ b/tests/test-setenv.c
@@ -20,6 +20,9 @@
 
 #include <stdlib.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (setenv, int, (char const *, char const *, int));
+
 #include <errno.h>
 #include <stdio.h>
 #include <string.h>
--- a/tests/test-sigaction.c
+++ b/tests/test-sigaction.c
@@ -20,6 +20,10 @@
 
 #include <signal.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (sigaction, int, (int, struct sigaction const *,
+                                  struct sigaction *));
+
 #include <stdio.h>
 #include <stdlib.h>
 
--- a/tests/test-signbit.c
+++ b/tests/test-signbit.c
@@ -20,6 +20,11 @@
 
 #include <math.h>
 
+/* signbit must be a macro.  */
+#ifndef signbit
+# error missing declaration
+#endif
+
 #include <float.h>
 #include <limits.h>
 #include <stdio.h>
--- a/tests/test-sleep.c
+++ b/tests/test-sleep.c
@@ -20,6 +20,9 @@
 
 #include <unistd.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (sleep, unsigned int, (unsigned int));
+
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
--- 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 <stdio.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (snprintf, int, (char *, size_t, char const *, ...));
+
 #include <stdlib.h>
 #include <string.h>
 
--- 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 <stdio.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (sprintf, int, (char *, char const *, ...));
+
 #include <float.h>
 #include <stddef.h>
 #include <stdint.h>
--- a/tests/test-stat.c
+++ b/tests/test-stat.c
@@ -20,6 +20,13 @@
 
 #include <sys/stat.h>
 
+/* 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 <fcntl.h>
 #include <errno.h>
 #include <stdbool.h>
--- 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 <config.h>
 
 #include <string.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (stpncpy, char *, (char *, char const *, size_t));
+
 #include <stdio.h>
 
 int
--- 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 <string.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (strcasestr, char *, (char const *, char const *));
+
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
--- a/tests/test-strchrnul.c
+++ b/tests/test-strchrnul.c
@@ -19,6 +19,9 @@
 
 #include <string.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (strchrnul, char *, (char const *, int));
+
 #include <stdio.h>
 #include <stdlib.h>
 
--- a/tests/test-strerror.c
+++ b/tests/test-strerror.c
@@ -21,6 +21,9 @@
 
 #include <string.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (strerror, char *, (int));
+
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
--- a/tests/test-strsignal.c
+++ b/tests/test-strsignal.c
@@ -21,6 +21,9 @@
 
 #include <string.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (strsignal, char *, (int));
+
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
--- a/tests/test-strstr.c
+++ b/tests/test-strstr.c
@@ -19,6 +19,9 @@
 
 #include <string.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (strstr, char *, (char const *, char const *));
+
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
--- a/tests/test-strtod.c
+++ b/tests/test-strtod.c
@@ -19,6 +19,9 @@
 
 #include <stdlib.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (strtod, double, (char const *, char **));
+
 #include <errno.h>
 #include <float.h>
 #include <math.h>
--- a/tests/test-strverscmp.c
+++ b/tests/test-strverscmp.c
@@ -21,6 +21,9 @@
 
 #include <string.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (strverscmp, int, (const char *, const char *));
+
 #include <stdio.h>
 #include <stdlib.h>
 
--- a/tests/test-symlink.c
+++ b/tests/test-symlink.c
@@ -20,6 +20,9 @@
 
 #include <unistd.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (symlink, int, (char const *, char const *));
+
 #include <fcntl.h>
 #include <errno.h>
 #include <stdbool.h>
--- a/tests/test-symlinkat.c
+++ b/tests/test-symlinkat.c
@@ -20,6 +20,10 @@
 
 #include <unistd.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (symlinkat, int, (char const *, int, char const *));
+SIGNATURE_CHECK (readlinkat, ssize_t, (int, char const *, char *, size_t));
+
 #include <fcntl.h>
 #include <errno.h>
 #include <stdbool.h>
--- 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 <config.h>
 
 #include <sys/times.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (times, clock_t, (struct tms *));
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdint.h>
--- 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 <math.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (trunc, double, (double));
+
 #include <stdio.h>
 #include <stdlib.h>
 
--- 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 <math.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (truncf, float, (float));
+
 #include <stdio.h>
 #include <stdlib.h>
 
--- a/tests/test-truncl.c
+++ b/tests/test-truncl.c
@@ -20,6 +20,9 @@
 
 #include <math.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (truncl, long double, (long double));
+
 #include <float.h>
 #include <stdio.h>
 #include <stdlib.h>
--- 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 <search.h>
 
+#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 <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
--- a/tests/test-uname.c
+++ b/tests/test-uname.c
@@ -20,6 +20,9 @@
 
 #include <sys/utsname.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (uname, int, (struct utsname *));
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
--- a/tests/test-unlink.c
+++ b/tests/test-unlink.c
@@ -20,6 +20,9 @@
 
 #include <unistd.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (unlink, int, (char const *));
+
 #include <fcntl.h>
 #include <errno.h>
 #include <stdbool.h>
--- a/tests/test-unlinkat.c
+++ b/tests/test-unlinkat.c
@@ -20,6 +20,9 @@
 
 #include <unistd.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (unlinkat, int, (int, char const *, int));
+
 #include <fcntl.h>
 #include <errno.h>
 #include <stdbool.h>
--- a/tests/test-unsetenv.c
+++ b/tests/test-unsetenv.c
@@ -20,6 +20,9 @@
 
 #include <stdlib.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (unsetenv, int, (char const *));
+
 #include <errno.h>
 #include <stdio.h>
 #include <string.h>
--- a/tests/test-usleep.c
+++ b/tests/test-usleep.c
@@ -20,6 +20,9 @@
 
 #include <unistd.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (usleep, int, (useconds_t));
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <time.h>
--- a/tests/test-utimensat.c
+++ b/tests/test-utimensat.c
@@ -20,6 +20,10 @@
 
 #include <sys/stat.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (utimensat, int, (int, char const *, struct timespec const[2],
+                                  int));
+
 #include <fcntl.h>
 #include <errno.h>
 #include <stdbool.h>
--- 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 <stdio.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (asprintf, int, (char **, char const *, ...));
+SIGNATURE_CHECK (vasprintf, int, (char **, char const *, va_list));
+
 #include <stdarg.h>
 #include <stdlib.h>
 #include <string.h>
--- a/tests/test-vdprintf-posix.c
+++ b/tests/test-vdprintf-posix.c
@@ -20,6 +20,9 @@
 
 #include <stdio.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (vdprintf, int, (int, char const *, va_list));
+
 #include <stdarg.h>
 #include <stddef.h>
 #include <stdint.h>
--- 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 <stdio.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (vfprintf, int, (FILE *, char const *, va_list));
+
 #include <stdarg.h>
 #include <stddef.h>
 #include <stdint.h>
--- 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 <stdio.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (vprintf, int, (char const *, va_list));
+
 #include <stdarg.h>
 #include <stddef.h>
 #include <stdint.h>
--- 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 <stdio.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (vsnprintf, int, (char *, size_t, char const *, va_list));
+
 #include <stdarg.h>
 #include <stdlib.h>
 #include <string.h>
--- 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 <stdio.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (vsprintf, int, (char *, char const *, va_list));
+
 #include <float.h>
 #include <stdarg.h>
 #include <stddef.h>
--- 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 <wchar.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (wcrtomb, size_t, (char *, wchar_t, mbstate_t *));
+
 #include <locale.h>
 #include <stdio.h>
 #include <stdlib.h>
--- 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 <wchar.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (wcsnrtombs, size_t, (char *, wchar_t const **, size_t, size_t,
+                                      mbstate_t *));
+
 #include <locale.h>
 #include <stdio.h>
 #include <stdlib.h>
--- 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 <wchar.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (wcsrtombs, size_t, (char *, wchar_t const **, size_t,
+                                     mbstate_t *));
+
 #include <locale.h>
 #include <stdio.h>
 #include <stdlib.h>
--- 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 <wchar.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (wcwidth, int, (wchar_t));
+
 #include <locale.h>
 #include <stdio.h>
 #include <stdlib.h>