summaryrefslogtreecommitdiff
path: root/gnulib-tests
diff options
context:
space:
mode:
authorJinWang An <jinwang.an@samsung.com>2022-12-27 12:15:01 +0900
committerJinWang An <jinwang.an@samsung.com>2022-12-27 12:15:01 +0900
commit02a08acfc3145de1707c7704c566e4401ff5a8de (patch)
tree1c41a0a5565eb993984a585a0dd8ef13735ceede /gnulib-tests
parent90dfac14e6a0169336b5b7210e4a160df8b91c68 (diff)
downloaddiffutils-c848bfc2f93755e23181e01752a4148d7cb91368.tar.gz
diffutils-c848bfc2f93755e23181e01752a4148d7cb91368.tar.bz2
diffutils-c848bfc2f93755e23181e01752a4148d7cb91368.zip
Imported Upstream version 3.6upstream/3.6
Diffstat (limited to 'gnulib-tests')
-rw-r--r--gnulib-tests/Makefile.in509
-rw-r--r--gnulib-tests/_Noreturn.h10
-rw-r--r--gnulib-tests/accept.c2
-rw-r--r--gnulib-tests/arg-nonnull.h26
-rw-r--r--gnulib-tests/arpa_inet.in.h2
-rw-r--r--gnulib-tests/bind.c2
-rw-r--r--gnulib-tests/c++defs.h316
-rw-r--r--gnulib-tests/connect.c2
-rw-r--r--gnulib-tests/dtotimespec.c12
-rw-r--r--gnulib-tests/fdopen.c2
-rw-r--r--gnulib-tests/fpucw.h2
-rw-r--r--gnulib-tests/ftruncate.c15
-rw-r--r--gnulib-tests/getcwd-lgpl.c2
-rw-r--r--gnulib-tests/getpagesize.c2
-rw-r--r--gnulib-tests/gnulib.mk140
-rw-r--r--gnulib-tests/hash-pjw.c2
-rw-r--r--gnulib-tests/hash-pjw.h2
-rw-r--r--gnulib-tests/inet_pton.c2
-rw-r--r--gnulib-tests/init.sh71
-rw-r--r--gnulib-tests/ioctl.c8
-rw-r--r--gnulib-tests/listen.c2
-rw-r--r--gnulib-tests/macros.h10
-rw-r--r--gnulib-tests/nanosleep.c2
-rw-r--r--gnulib-tests/nap.h54
-rw-r--r--gnulib-tests/netinet_in.in.h2
-rw-r--r--gnulib-tests/perror.c2
-rw-r--r--gnulib-tests/pipe.c2
-rw-r--r--gnulib-tests/putenv.c2
-rw-r--r--gnulib-tests/same-inode.h18
-rw-r--r--gnulib-tests/select.c8
-rw-r--r--gnulib-tests/setlocale.c9
-rw-r--r--gnulib-tests/setsockopt.c2
-rw-r--r--gnulib-tests/signature.h2
-rw-r--r--gnulib-tests/sleep.c2
-rw-r--r--gnulib-tests/snprintf.c2
-rw-r--r--gnulib-tests/socket.c2
-rw-r--r--gnulib-tests/sockets.c8
-rw-r--r--gnulib-tests/sockets.h20
-rw-r--r--gnulib-tests/stdalign.in.h4
-rw-r--r--gnulib-tests/strerror_r.c114
-rw-r--r--gnulib-tests/symlink.c2
-rw-r--r--gnulib-tests/sys_ioctl.in.h2
-rw-r--r--gnulib-tests/sys_select.in.h2
-rw-r--r--gnulib-tests/sys_socket.in.h7
-rw-r--r--gnulib-tests/sys_uio.in.h2
-rw-r--r--gnulib-tests/test-accept.c2
-rw-r--r--gnulib-tests/test-alloca-opt.c2
-rw-r--r--gnulib-tests/test-areadlink.c2
-rw-r--r--gnulib-tests/test-areadlink.h2
-rw-r--r--gnulib-tests/test-argmatch.c5
-rw-r--r--gnulib-tests/test-arpa_inet.c2
-rw-r--r--gnulib-tests/test-binary-io.c8
-rwxr-xr-xgnulib-tests/test-binary-io.sh4
-rw-r--r--gnulib-tests/test-bind.c2
-rw-r--r--gnulib-tests/test-bitrotate.c2
-rw-r--r--gnulib-tests/test-btowc.c2
-rw-r--r--gnulib-tests/test-c-ctype.c2
-rw-r--r--gnulib-tests/test-c-stack.c5
-rw-r--r--gnulib-tests/test-c-strcasecmp.c5
-rw-r--r--gnulib-tests/test-c-strncasecmp.c5
-rw-r--r--gnulib-tests/test-close.c2
-rw-r--r--gnulib-tests/test-connect.c2
-rw-r--r--gnulib-tests/test-ctype.c2
-rw-r--r--gnulib-tests/test-dirname.c2
-rw-r--r--gnulib-tests/test-dup2.c8
-rw-r--r--gnulib-tests/test-environ.c2
-rw-r--r--gnulib-tests/test-errno.c2
-rw-r--r--gnulib-tests/test-exclude.c7
-rwxr-xr-xgnulib-tests/test-exclude1.sh2
-rwxr-xr-xgnulib-tests/test-exclude2.sh2
-rwxr-xr-xgnulib-tests/test-exclude3.sh2
-rwxr-xr-xgnulib-tests/test-exclude4.sh2
-rwxr-xr-xgnulib-tests/test-exclude5.sh2
-rwxr-xr-xgnulib-tests/test-exclude6.sh2
-rwxr-xr-xgnulib-tests/test-exclude7.sh2
-rwxr-xr-xgnulib-tests/test-exclude8.sh2
-rw-r--r--gnulib-tests/test-fcntl-h.c2
-rw-r--r--gnulib-tests/test-fcntl.c8
-rw-r--r--gnulib-tests/test-fdopen.c2
-rw-r--r--gnulib-tests/test-fgetc.c6
-rw-r--r--gnulib-tests/test-filenamecat.c5
-rw-r--r--gnulib-tests/test-float.c2
-rw-r--r--gnulib-tests/test-fnmatch.c2
-rw-r--r--gnulib-tests/test-fputc.c6
-rw-r--r--gnulib-tests/test-fread.c6
-rw-r--r--gnulib-tests/test-freopen-safer.c2
-rw-r--r--gnulib-tests/test-freopen.c6
-rw-r--r--gnulib-tests/test-fstat.c2
-rw-r--r--gnulib-tests/test-ftruncate.c2
-rw-r--r--gnulib-tests/test-fwrite.c6
-rw-r--r--gnulib-tests/test-getcwd-lgpl.c2
-rw-r--r--gnulib-tests/test-getdtablesize.c2
-rw-r--r--gnulib-tests/test-getopt-gnu.c45
-rw-r--r--gnulib-tests/test-getopt-main.h (renamed from gnulib-tests/test-getopt.c)37
-rw-r--r--gnulib-tests/test-getopt-posix.c34
-rw-r--r--gnulib-tests/test-getopt.h5
-rw-r--r--gnulib-tests/test-getopt_long.h4
-rw-r--r--gnulib-tests/test-getprogname.c58
-rw-r--r--gnulib-tests/test-gettimeofday.c2
-rw-r--r--gnulib-tests/test-hash.c2
-rw-r--r--gnulib-tests/test-iconv-h.c2
-rw-r--r--gnulib-tests/test-iconv.c17
-rw-r--r--gnulib-tests/test-ignore-value.c2
-rw-r--r--gnulib-tests/test-inet_pton.c2
-rwxr-xr-xgnulib-tests/test-init.sh5
-rw-r--r--gnulib-tests/test-intprops.c23
-rw-r--r--gnulib-tests/test-inttostr.c2
-rw-r--r--gnulib-tests/test-inttypes.c2
-rw-r--r--gnulib-tests/test-ioctl.c2
-rw-r--r--gnulib-tests/test-isblank.c2
-rw-r--r--gnulib-tests/test-iswblank.c2
-rw-r--r--gnulib-tests/test-langinfo.c2
-rw-r--r--gnulib-tests/test-limits-h.c50
-rw-r--r--gnulib-tests/test-listen.c2
-rw-r--r--gnulib-tests/test-locale.c2
-rw-r--r--gnulib-tests/test-localeconv.c6
-rw-r--r--gnulib-tests/test-lstat.c2
-rw-r--r--gnulib-tests/test-lstat.h2
-rw-r--r--gnulib-tests/test-malloca.c2
-rw-r--r--gnulib-tests/test-mbrtowc-w32.c20
-rw-r--r--gnulib-tests/test-mbrtowc.c4
-rw-r--r--gnulib-tests/test-mbscasecmp.c2
-rw-r--r--gnulib-tests/test-mbsinit.c2
-rw-r--r--gnulib-tests/test-mbsrtowcs.c2
-rw-r--r--gnulib-tests/test-mbsstr1.c2
-rw-r--r--gnulib-tests/test-mbsstr2.c2
-rw-r--r--gnulib-tests/test-mbsstr3.c2
-rw-r--r--gnulib-tests/test-memchr.c2
-rw-r--r--gnulib-tests/test-nanosleep.c2
-rw-r--r--gnulib-tests/test-netinet_in.c2
-rw-r--r--gnulib-tests/test-nl_langinfo.c2
-rw-r--r--gnulib-tests/test-open.c2
-rw-r--r--gnulib-tests/test-open.h2
-rw-r--r--gnulib-tests/test-pathmax.c2
-rw-r--r--gnulib-tests/test-perror.c2
-rwxr-xr-xgnulib-tests/test-perror.sh6
-rw-r--r--gnulib-tests/test-perror2.c2
-rw-r--r--gnulib-tests/test-pipe.c8
-rw-r--r--gnulib-tests/test-quotearg-simple.c141
-rw-r--r--gnulib-tests/test-quotearg.h30
-rw-r--r--gnulib-tests/test-raise.c2
-rw-r--r--gnulib-tests/test-rawmemchr.c2
-rw-r--r--gnulib-tests/test-readlink.c2
-rw-r--r--gnulib-tests/test-readlink.h2
-rw-r--r--gnulib-tests/test-regex.c2
-rw-r--r--gnulib-tests/test-select-fd.c2
-rw-r--r--gnulib-tests/test-select-stdin.c2
-rw-r--r--gnulib-tests/test-select.c2
-rw-r--r--gnulib-tests/test-select.h6
-rw-r--r--gnulib-tests/test-setenv.c2
-rw-r--r--gnulib-tests/test-setlocale1.c2
-rw-r--r--gnulib-tests/test-setlocale2.c2
-rw-r--r--gnulib-tests/test-setsockopt.c2
-rw-r--r--gnulib-tests/test-sh-quote.c4
-rw-r--r--gnulib-tests/test-sigaction.c2
-rw-r--r--gnulib-tests/test-signal-h.c2
-rw-r--r--gnulib-tests/test-sigprocmask.c2
-rw-r--r--gnulib-tests/test-sleep.c2
-rw-r--r--gnulib-tests/test-snprintf.c2
-rw-r--r--gnulib-tests/test-sockets.c2
-rw-r--r--gnulib-tests/test-stat-time.c60
-rw-r--r--gnulib-tests/test-stat.c2
-rw-r--r--gnulib-tests/test-stat.h2
-rw-r--r--gnulib-tests/test-stdalign.c7
-rw-r--r--gnulib-tests/test-stdbool.c2
-rw-r--r--gnulib-tests/test-stddef.c8
-rw-r--r--gnulib-tests/test-stdint.c69
-rw-r--r--gnulib-tests/test-stdio.c2
-rw-r--r--gnulib-tests/test-stdlib.c2
-rw-r--r--gnulib-tests/test-strerror.c2
-rw-r--r--gnulib-tests/test-strerror_r.c2
-rw-r--r--gnulib-tests/test-strftime.c43
-rw-r--r--gnulib-tests/test-striconv.c2
-rw-r--r--gnulib-tests/test-string.c2
-rw-r--r--gnulib-tests/test-strings.c2
-rw-r--r--gnulib-tests/test-strnlen.c2
-rw-r--r--gnulib-tests/test-strtoull.c2
-rw-r--r--gnulib-tests/test-strtoumax.c2
-rw-r--r--gnulib-tests/test-symlink.c2
-rw-r--r--gnulib-tests/test-symlink.h2
-rw-r--r--gnulib-tests/test-sys_ioctl.c2
-rw-r--r--gnulib-tests/test-sys_select.c2
-rw-r--r--gnulib-tests/test-sys_socket.c2
-rw-r--r--gnulib-tests/test-sys_stat.c2
-rw-r--r--gnulib-tests/test-sys_time.c2
-rw-r--r--gnulib-tests/test-sys_types.c2
-rw-r--r--gnulib-tests/test-sys_uio.c2
-rw-r--r--gnulib-tests/test-sys_wait.c2
-rw-r--r--gnulib-tests/test-sys_wait.h2
-rw-r--r--gnulib-tests/test-time.c2
-rw-r--r--gnulib-tests/test-timespec.c2
-rw-r--r--gnulib-tests/test-unistd.c2
-rw-r--r--gnulib-tests/test-unsetenv.c2
-rwxr-xr-xgnulib-tests/test-update-copyright.sh2
-rw-r--r--gnulib-tests/test-vasnprintf.c2
-rw-r--r--gnulib-tests/test-vasprintf.c2
-rwxr-xr-xgnulib-tests/test-vc-list-files-cvs.sh2
-rwxr-xr-xgnulib-tests/test-vc-list-files-git.sh2
-rw-r--r--gnulib-tests/test-verify-try.c21
-rw-r--r--gnulib-tests/test-verify.c2
-rwxr-xr-xgnulib-tests/test-verify.sh9
-rw-r--r--gnulib-tests/test-version-etc.c4
-rwxr-xr-xgnulib-tests/test-version-etc.sh2
-rw-r--r--gnulib-tests/test-wchar.c2
-rw-r--r--gnulib-tests/test-wcrtomb-w32.c2
-rw-r--r--gnulib-tests/test-wcrtomb.c2
-rw-r--r--gnulib-tests/test-wctype-h.c2
-rw-r--r--gnulib-tests/test-wcwidth.c5
-rw-r--r--gnulib-tests/test-xalloc-die.c4
-rwxr-xr-xgnulib-tests/test-xalloc-die.sh2
-rw-r--r--gnulib-tests/test-xstrtol.c5
-rw-r--r--gnulib-tests/test-xvasprintf.c5
-rw-r--r--gnulib-tests/timespec-add.c2
-rw-r--r--gnulib-tests/timespec-sub.c2
-rw-r--r--gnulib-tests/unistr/test-u8-mbtoucr.c2
-rw-r--r--gnulib-tests/unistr/test-u8-uctomb.c2
-rw-r--r--gnulib-tests/uniwidth/test-uc_width.c2
-rw-r--r--gnulib-tests/uniwidth/test-uc_width2.c2
-rw-r--r--gnulib-tests/unused-parameter.h36
-rw-r--r--gnulib-tests/w32sock.h8
-rw-r--r--gnulib-tests/warn-on-use.h109
-rw-r--r--gnulib-tests/wctob.c2
-rw-r--r--gnulib-tests/wctomb-impl.h2
-rw-r--r--gnulib-tests/wctomb.c2
-rw-r--r--gnulib-tests/zerosize-ptr.h2
225 files changed, 1874 insertions, 785 deletions
diff --git a/gnulib-tests/Makefile.in b/gnulib-tests/Makefile.in
index d986484..e24250b 100644
--- a/gnulib-tests/Makefile.in
+++ b/gnulib-tests/Makefile.in
@@ -14,7 +14,7 @@
@SET_MAKE@
-# Copyright (C) 2002-2016 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -128,17 +128,19 @@ TESTS = test-accept$(EXEEXT) test-alloca-opt$(EXEEXT) \
test-freopen-safer$(EXEEXT) test-freopen$(EXEEXT) \
test-fstat$(EXEEXT) test-ftruncate.sh test-fwrite$(EXEEXT) \
test-getcwd-lgpl$(EXEEXT) test-getdtablesize$(EXEEXT) \
- test-getopt$(EXEEXT) test-gettimeofday$(EXEEXT) \
+ test-getopt-gnu$(EXEEXT) test-getopt-posix$(EXEEXT) \
+ test-getprogname$(EXEEXT) test-gettimeofday$(EXEEXT) \
test-hash$(EXEEXT) test-iconv-h$(EXEEXT) test-iconv$(EXEEXT) \
test-ignore-value$(EXEEXT) test-inet_pton$(EXEEXT) \
test-intprops$(EXEEXT) test-inttostr$(EXEEXT) \
test-inttypes$(EXEEXT) test-ioctl$(EXEEXT) \
test-isblank$(EXEEXT) test-iswblank$(EXEEXT) \
- test-langinfo$(EXEEXT) test-listen$(EXEEXT) \
- test-locale$(EXEEXT) test-localeconv$(EXEEXT) \
- test-lstat$(EXEEXT) test-malloca$(EXEEXT) test-mbrtowc1.sh \
- test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh \
- test-mbrtowc5.sh test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh \
+ test-langinfo$(EXEEXT) test-limits-h$(EXEEXT) \
+ test-listen$(EXEEXT) test-locale$(EXEEXT) \
+ test-localeconv$(EXEEXT) test-lstat$(EXEEXT) \
+ test-malloca$(EXEEXT) test-mbrtowc1.sh test-mbrtowc2.sh \
+ test-mbrtowc3.sh test-mbrtowc4.sh test-mbrtowc5.sh \
+ test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh \
test-mbrtowc-w32-3.sh test-mbrtowc-w32-4.sh \
test-mbrtowc-w32-5.sh test-mbscasecmp.sh test-mbsinit.sh \
test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh \
@@ -199,22 +201,24 @@ check_PROGRAMS = test-accept$(EXEEXT) test-alloca-opt$(EXEEXT) \
test-freopen$(EXEEXT) test-fstat$(EXEEXT) \
test-ftruncate$(EXEEXT) test-fwrite$(EXEEXT) \
test-getcwd-lgpl$(EXEEXT) test-getdtablesize$(EXEEXT) \
- test-getopt$(EXEEXT) test-gettimeofday$(EXEEXT) \
+ test-getopt-gnu$(EXEEXT) test-getopt-posix$(EXEEXT) \
+ test-getprogname$(EXEEXT) test-gettimeofday$(EXEEXT) \
test-hash$(EXEEXT) test-iconv-h$(EXEEXT) test-iconv$(EXEEXT) \
test-ignore-value$(EXEEXT) test-inet_pton$(EXEEXT) \
test-intprops$(EXEEXT) test-inttostr$(EXEEXT) \
test-inttypes$(EXEEXT) test-ioctl$(EXEEXT) \
test-isblank$(EXEEXT) test-iswblank$(EXEEXT) \
- test-langinfo$(EXEEXT) test-listen$(EXEEXT) \
- test-locale$(EXEEXT) test-localeconv$(EXEEXT) \
- test-lstat$(EXEEXT) test-malloca$(EXEEXT) \
- test-mbrtowc$(EXEEXT) test-mbrtowc-w32$(EXEEXT) \
- test-mbscasecmp$(EXEEXT) test-mbsinit$(EXEEXT) \
- test-mbsrtowcs$(EXEEXT) test-mbsstr1$(EXEEXT) \
- test-mbsstr2$(EXEEXT) test-mbsstr3$(EXEEXT) \
- test-memchr$(EXEEXT) test-nanosleep$(EXEEXT) \
- test-netinet_in$(EXEEXT) test-nl_langinfo$(EXEEXT) \
- test-open$(EXEEXT) test-pathmax$(EXEEXT) test-perror$(EXEEXT) \
+ test-langinfo$(EXEEXT) test-limits-h$(EXEEXT) \
+ test-listen$(EXEEXT) test-locale$(EXEEXT) \
+ test-localeconv$(EXEEXT) test-lstat$(EXEEXT) \
+ test-malloca$(EXEEXT) test-mbrtowc$(EXEEXT) \
+ test-mbrtowc-w32$(EXEEXT) test-mbscasecmp$(EXEEXT) \
+ test-mbsinit$(EXEEXT) test-mbsrtowcs$(EXEEXT) \
+ test-mbsstr1$(EXEEXT) test-mbsstr2$(EXEEXT) \
+ test-mbsstr3$(EXEEXT) test-memchr$(EXEEXT) \
+ test-nanosleep$(EXEEXT) test-netinet_in$(EXEEXT) \
+ test-nl_langinfo$(EXEEXT) test-open$(EXEEXT) \
+ test-pathmax$(EXEEXT) test-perror$(EXEEXT) \
test-perror2$(EXEEXT) test-pipe$(EXEEXT) \
test-quotearg-simple$(EXEEXT) test-raise$(EXEEXT) \
test-rawmemchr$(EXEEXT) test-readlink$(EXEEXT) \
@@ -249,15 +253,17 @@ check_PROGRAMS = test-accept$(EXEEXT) test-alloca-opt$(EXEEXT) \
test-xalloc-die$(EXEEXT) test-xstrtol$(EXEEXT) \
test-xstrtoul$(EXEEXT) test-xstrtoumax$(EXEEXT) \
test-xvasprintf$(EXEEXT)
+EXTRA_PROGRAMS = test-verify-try$(EXEEXT)
subdir = gnulib-tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \
$(top_srcdir)/m4/arpa_inet_h.m4 $(top_srcdir)/m4/btowc.m4 \
- $(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/clock_time.m4 \
- $(top_srcdir)/m4/close.m4 $(top_srcdir)/m4/codeset.m4 \
- $(top_srcdir)/m4/config-h.m4 $(top_srcdir)/m4/configmake.m4 \
- $(top_srcdir)/m4/ctype.m4 $(top_srcdir)/m4/dirname.m4 \
+ $(top_srcdir)/m4/builtin-expect.m4 $(top_srcdir)/m4/c-stack.m4 \
+ $(top_srcdir)/m4/clock_time.m4 $(top_srcdir)/m4/close.m4 \
+ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/config-h.m4 \
+ $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/ctype.m4 \
+ $(top_srcdir)/m4/dirname.m4 \
$(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup2.m4 \
$(top_srcdir)/m4/eealloc.m4 $(top_srcdir)/m4/environ.m4 \
$(top_srcdir)/m4/errno_h.m4 $(top_srcdir)/m4/error.m4 \
@@ -270,7 +276,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/freopen.m4 $(top_srcdir)/m4/fstat.m4 \
$(top_srcdir)/m4/ftruncate.m4 $(top_srcdir)/m4/getcwd.m4 \
$(top_srcdir)/m4/getdtablesize.m4 $(top_srcdir)/m4/getopt.m4 \
- $(top_srcdir)/m4/getpagesize.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/getpagesize.m4 \
+ $(top_srcdir)/m4/getprogname.m4 $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/gettime.m4 $(top_srcdir)/m4/gettimeofday.m4 \
$(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnu-make.m4 \
$(top_srcdir)/m4/gnulib-common.m4 \
@@ -287,17 +294,19 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \
$(top_srcdir)/m4/libunistring-base.m4 \
- $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \
- $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-tr.m4 \
- $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/locale_h.m4 \
- $(top_srcdir)/m4/localeconv.m4 $(top_srcdir)/m4/longlong.m4 \
- $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \
- $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/manywarnings.m4 \
- $(top_srcdir)/m4/mbchar.m4 $(top_srcdir)/m4/mbiter.m4 \
- $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \
- $(top_srcdir)/m4/mbslen.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \
- $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \
- $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mkstemp.m4 \
+ $(top_srcdir)/m4/limits-h.m4 $(top_srcdir)/m4/localcharset.m4 \
+ $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \
+ $(top_srcdir)/m4/locale-tr.m4 $(top_srcdir)/m4/locale-zh.m4 \
+ $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \
+ $(top_srcdir)/m4/localtime-buffer.m4 \
+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \
+ $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \
+ $(top_srcdir)/m4/manywarnings.m4 $(top_srcdir)/m4/mbchar.m4 \
+ $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
+ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbslen.m4 \
+ $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \
+ $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \
+ $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkstemp.m4 \
$(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/mmap-anon.m4 \
$(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \
$(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \
@@ -339,9 +348,10 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \
$(top_srcdir)/m4/time_rz.m4 $(top_srcdir)/m4/timegm.m4 \
$(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
- $(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/unlocked-io.m4 \
- $(top_srcdir)/m4/vararrays.m4 $(top_srcdir)/m4/vasnprintf.m4 \
- $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/version-etc.m4 \
+ $(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/unistd_h.m4 \
+ $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vararrays.m4 \
+ $(top_srcdir)/m4/vasnprintf.m4 $(top_srcdir)/m4/vasprintf.m4 \
+ $(top_srcdir)/m4/version-etc.m4 \
$(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \
$(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \
$(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \
@@ -542,9 +552,17 @@ test_getdtablesize_OBJECTS = test-getdtablesize.$(OBJEXT)
test_getdtablesize_LDADD = $(LDADD)
test_getdtablesize_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
libtests.a $(am__DEPENDENCIES_1)
-test_getopt_SOURCES = test-getopt.c
-test_getopt_OBJECTS = test-getopt.$(OBJEXT)
-test_getopt_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
+test_getopt_gnu_SOURCES = test-getopt-gnu.c
+test_getopt_gnu_OBJECTS = test-getopt-gnu.$(OBJEXT)
+test_getopt_gnu_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1)
+test_getopt_posix_SOURCES = test-getopt-posix.c
+test_getopt_posix_OBJECTS = test-getopt-posix.$(OBJEXT)
+test_getopt_posix_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1)
+test_getprogname_SOURCES = test-getprogname.c
+test_getprogname_OBJECTS = test-getprogname.$(OBJEXT)
+test_getprogname_DEPENDENCIES = $(am__DEPENDENCIES_2)
test_gettimeofday_SOURCES = test-gettimeofday.c
test_gettimeofday_OBJECTS = test-gettimeofday.$(OBJEXT)
test_gettimeofday_LDADD = $(LDADD)
@@ -606,6 +624,11 @@ test_langinfo_OBJECTS = test-langinfo.$(OBJEXT)
test_langinfo_LDADD = $(LDADD)
test_langinfo_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
libtests.a $(am__DEPENDENCIES_1)
+test_limits_h_SOURCES = test-limits-h.c
+test_limits_h_OBJECTS = test-limits-h.$(OBJEXT)
+test_limits_h_LDADD = $(LDADD)
+test_limits_h_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
+ libtests.a $(am__DEPENDENCIES_1)
test_listen_SOURCES = test-listen.c
test_listen_OBJECTS = test-listen.$(OBJEXT)
test_listen_DEPENDENCIES = $(am__DEPENDENCIES_2)
@@ -965,6 +988,11 @@ test_verify_OBJECTS = test-verify.$(OBJEXT)
test_verify_LDADD = $(LDADD)
test_verify_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
$(am__DEPENDENCIES_1)
+test_verify_try_SOURCES = test-verify-try.c
+test_verify_try_OBJECTS = test-verify-try.$(OBJEXT)
+test_verify_try_LDADD = $(LDADD)
+test_verify_try_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
+ libtests.a $(am__DEPENDENCIES_1)
test_version_etc_SOURCES = test-version-etc.c
test_version_etc_OBJECTS = test-version-etc.$(OBJEXT)
test_version_etc_DEPENDENCIES = $(am__DEPENDENCIES_2)
@@ -1054,50 +1082,54 @@ am__depfiles_remade = ./$(DEPDIR)/accept.Po ./$(DEPDIR)/bind.Po \
./$(DEPDIR)/test-freopen-safer.Po ./$(DEPDIR)/test-freopen.Po \
./$(DEPDIR)/test-fstat.Po ./$(DEPDIR)/test-ftruncate.Po \
./$(DEPDIR)/test-fwrite.Po ./$(DEPDIR)/test-getcwd-lgpl.Po \
- ./$(DEPDIR)/test-getdtablesize.Po ./$(DEPDIR)/test-getopt.Po \
+ ./$(DEPDIR)/test-getdtablesize.Po \
+ ./$(DEPDIR)/test-getopt-gnu.Po \
+ ./$(DEPDIR)/test-getopt-posix.Po \
+ ./$(DEPDIR)/test-getprogname.Po \
./$(DEPDIR)/test-gettimeofday.Po ./$(DEPDIR)/test-hash.Po \
./$(DEPDIR)/test-iconv-h.Po ./$(DEPDIR)/test-iconv.Po \
./$(DEPDIR)/test-ignore-value.Po ./$(DEPDIR)/test-inet_pton.Po \
./$(DEPDIR)/test-intprops.Po ./$(DEPDIR)/test-inttostr.Po \
./$(DEPDIR)/test-inttypes.Po ./$(DEPDIR)/test-ioctl.Po \
./$(DEPDIR)/test-isblank.Po ./$(DEPDIR)/test-iswblank.Po \
- ./$(DEPDIR)/test-langinfo.Po ./$(DEPDIR)/test-listen.Po \
- ./$(DEPDIR)/test-locale.Po ./$(DEPDIR)/test-localeconv.Po \
- ./$(DEPDIR)/test-lstat.Po ./$(DEPDIR)/test-malloca.Po \
- ./$(DEPDIR)/test-mbrtowc-w32.Po ./$(DEPDIR)/test-mbrtowc.Po \
- ./$(DEPDIR)/test-mbscasecmp.Po ./$(DEPDIR)/test-mbsinit.Po \
- ./$(DEPDIR)/test-mbsrtowcs.Po ./$(DEPDIR)/test-mbsstr1.Po \
- ./$(DEPDIR)/test-mbsstr2.Po ./$(DEPDIR)/test-mbsstr3.Po \
- ./$(DEPDIR)/test-memchr.Po ./$(DEPDIR)/test-nanosleep.Po \
- ./$(DEPDIR)/test-netinet_in.Po ./$(DEPDIR)/test-nl_langinfo.Po \
- ./$(DEPDIR)/test-open.Po ./$(DEPDIR)/test-pathmax.Po \
- ./$(DEPDIR)/test-perror.Po ./$(DEPDIR)/test-perror2.Po \
- ./$(DEPDIR)/test-pipe.Po ./$(DEPDIR)/test-quotearg-simple.Po \
- ./$(DEPDIR)/test-raise.Po ./$(DEPDIR)/test-rawmemchr.Po \
- ./$(DEPDIR)/test-readlink.Po ./$(DEPDIR)/test-regex.Po \
- ./$(DEPDIR)/test-select-fd.Po ./$(DEPDIR)/test-select-stdin.Po \
- ./$(DEPDIR)/test-select.Po ./$(DEPDIR)/test-setenv.Po \
- ./$(DEPDIR)/test-setlocale1.Po ./$(DEPDIR)/test-setlocale2.Po \
- ./$(DEPDIR)/test-setsockopt.Po ./$(DEPDIR)/test-sh-quote.Po \
- ./$(DEPDIR)/test-sigaction.Po ./$(DEPDIR)/test-signal-h.Po \
- ./$(DEPDIR)/test-sigprocmask.Po ./$(DEPDIR)/test-sleep.Po \
- ./$(DEPDIR)/test-snprintf.Po ./$(DEPDIR)/test-sockets.Po \
- ./$(DEPDIR)/test-stat-time.Po ./$(DEPDIR)/test-stat.Po \
- ./$(DEPDIR)/test-stdalign.Po ./$(DEPDIR)/test-stdbool.Po \
- ./$(DEPDIR)/test-stddef.Po ./$(DEPDIR)/test-stdint.Po \
- ./$(DEPDIR)/test-stdio.Po ./$(DEPDIR)/test-stdlib.Po \
- ./$(DEPDIR)/test-strerror.Po ./$(DEPDIR)/test-strerror_r.Po \
- ./$(DEPDIR)/test-strftime.Po ./$(DEPDIR)/test-striconv.Po \
- ./$(DEPDIR)/test-string.Po ./$(DEPDIR)/test-strings.Po \
- ./$(DEPDIR)/test-strnlen.Po ./$(DEPDIR)/test-strtoull.Po \
- ./$(DEPDIR)/test-strtoumax.Po ./$(DEPDIR)/test-symlink.Po \
- ./$(DEPDIR)/test-sys_ioctl.Po ./$(DEPDIR)/test-sys_select.Po \
- ./$(DEPDIR)/test-sys_socket.Po ./$(DEPDIR)/test-sys_stat.Po \
- ./$(DEPDIR)/test-sys_time.Po ./$(DEPDIR)/test-sys_types.Po \
- ./$(DEPDIR)/test-sys_uio.Po ./$(DEPDIR)/test-sys_wait.Po \
- ./$(DEPDIR)/test-time.Po ./$(DEPDIR)/test-timespec.Po \
- ./$(DEPDIR)/test-unistd.Po ./$(DEPDIR)/test-unsetenv.Po \
- ./$(DEPDIR)/test-vasnprintf.Po ./$(DEPDIR)/test-vasprintf.Po \
+ ./$(DEPDIR)/test-langinfo.Po ./$(DEPDIR)/test-limits-h.Po \
+ ./$(DEPDIR)/test-listen.Po ./$(DEPDIR)/test-locale.Po \
+ ./$(DEPDIR)/test-localeconv.Po ./$(DEPDIR)/test-lstat.Po \
+ ./$(DEPDIR)/test-malloca.Po ./$(DEPDIR)/test-mbrtowc-w32.Po \
+ ./$(DEPDIR)/test-mbrtowc.Po ./$(DEPDIR)/test-mbscasecmp.Po \
+ ./$(DEPDIR)/test-mbsinit.Po ./$(DEPDIR)/test-mbsrtowcs.Po \
+ ./$(DEPDIR)/test-mbsstr1.Po ./$(DEPDIR)/test-mbsstr2.Po \
+ ./$(DEPDIR)/test-mbsstr3.Po ./$(DEPDIR)/test-memchr.Po \
+ ./$(DEPDIR)/test-nanosleep.Po ./$(DEPDIR)/test-netinet_in.Po \
+ ./$(DEPDIR)/test-nl_langinfo.Po ./$(DEPDIR)/test-open.Po \
+ ./$(DEPDIR)/test-pathmax.Po ./$(DEPDIR)/test-perror.Po \
+ ./$(DEPDIR)/test-perror2.Po ./$(DEPDIR)/test-pipe.Po \
+ ./$(DEPDIR)/test-quotearg-simple.Po ./$(DEPDIR)/test-raise.Po \
+ ./$(DEPDIR)/test-rawmemchr.Po ./$(DEPDIR)/test-readlink.Po \
+ ./$(DEPDIR)/test-regex.Po ./$(DEPDIR)/test-select-fd.Po \
+ ./$(DEPDIR)/test-select-stdin.Po ./$(DEPDIR)/test-select.Po \
+ ./$(DEPDIR)/test-setenv.Po ./$(DEPDIR)/test-setlocale1.Po \
+ ./$(DEPDIR)/test-setlocale2.Po ./$(DEPDIR)/test-setsockopt.Po \
+ ./$(DEPDIR)/test-sh-quote.Po ./$(DEPDIR)/test-sigaction.Po \
+ ./$(DEPDIR)/test-signal-h.Po ./$(DEPDIR)/test-sigprocmask.Po \
+ ./$(DEPDIR)/test-sleep.Po ./$(DEPDIR)/test-snprintf.Po \
+ ./$(DEPDIR)/test-sockets.Po ./$(DEPDIR)/test-stat-time.Po \
+ ./$(DEPDIR)/test-stat.Po ./$(DEPDIR)/test-stdalign.Po \
+ ./$(DEPDIR)/test-stdbool.Po ./$(DEPDIR)/test-stddef.Po \
+ ./$(DEPDIR)/test-stdint.Po ./$(DEPDIR)/test-stdio.Po \
+ ./$(DEPDIR)/test-stdlib.Po ./$(DEPDIR)/test-strerror.Po \
+ ./$(DEPDIR)/test-strerror_r.Po ./$(DEPDIR)/test-strftime.Po \
+ ./$(DEPDIR)/test-striconv.Po ./$(DEPDIR)/test-string.Po \
+ ./$(DEPDIR)/test-strings.Po ./$(DEPDIR)/test-strnlen.Po \
+ ./$(DEPDIR)/test-strtoull.Po ./$(DEPDIR)/test-strtoumax.Po \
+ ./$(DEPDIR)/test-symlink.Po ./$(DEPDIR)/test-sys_ioctl.Po \
+ ./$(DEPDIR)/test-sys_select.Po ./$(DEPDIR)/test-sys_socket.Po \
+ ./$(DEPDIR)/test-sys_stat.Po ./$(DEPDIR)/test-sys_time.Po \
+ ./$(DEPDIR)/test-sys_types.Po ./$(DEPDIR)/test-sys_uio.Po \
+ ./$(DEPDIR)/test-sys_wait.Po ./$(DEPDIR)/test-time.Po \
+ ./$(DEPDIR)/test-timespec.Po ./$(DEPDIR)/test-unistd.Po \
+ ./$(DEPDIR)/test-unsetenv.Po ./$(DEPDIR)/test-vasnprintf.Po \
+ ./$(DEPDIR)/test-vasprintf.Po ./$(DEPDIR)/test-verify-try.Po \
./$(DEPDIR)/test-verify.Po ./$(DEPDIR)/test-version-etc.Po \
./$(DEPDIR)/test-wchar.Po ./$(DEPDIR)/test-wcrtomb-w32.Po \
./$(DEPDIR)/test-wcrtomb.Po ./$(DEPDIR)/test-wctype-h.Po \
@@ -1135,17 +1167,18 @@ SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \
test-float.c test-fnmatch.c test-fputc.c test-fread.c \
test-freopen.c test-freopen-safer.c test-fstat.c \
test-ftruncate.c test-fwrite.c test-getcwd-lgpl.c \
- test-getdtablesize.c test-getopt.c test-gettimeofday.c \
- test-hash.c test-iconv.c test-iconv-h.c test-ignore-value.c \
+ test-getdtablesize.c test-getopt-gnu.c test-getopt-posix.c \
+ test-getprogname.c test-gettimeofday.c test-hash.c \
+ test-iconv.c test-iconv-h.c test-ignore-value.c \
test-inet_pton.c test-intprops.c test-inttostr.c \
test-inttypes.c test-ioctl.c test-isblank.c test-iswblank.c \
- test-langinfo.c test-listen.c test-locale.c test-localeconv.c \
- test-lstat.c test-malloca.c test-mbrtowc.c test-mbrtowc-w32.c \
- test-mbscasecmp.c test-mbsinit.c test-mbsrtowcs.c \
- test-mbsstr1.c test-mbsstr2.c test-mbsstr3.c test-memchr.c \
- test-nanosleep.c test-netinet_in.c test-nl_langinfo.c \
- test-open.c test-pathmax.c test-perror.c test-perror2.c \
- test-pipe.c test-quotearg-simple.c test-raise.c \
+ test-langinfo.c test-limits-h.c test-listen.c test-locale.c \
+ test-localeconv.c test-lstat.c test-malloca.c test-mbrtowc.c \
+ test-mbrtowc-w32.c test-mbscasecmp.c test-mbsinit.c \
+ test-mbsrtowcs.c test-mbsstr1.c test-mbsstr2.c test-mbsstr3.c \
+ test-memchr.c test-nanosleep.c test-netinet_in.c \
+ test-nl_langinfo.c test-open.c test-pathmax.c test-perror.c \
+ test-perror2.c test-pipe.c test-quotearg-simple.c test-raise.c \
test-rawmemchr.c test-readlink.c test-regex.c test-select.c \
test-select-fd.c test-select-stdin.c test-setenv.c \
test-setlocale1.c test-setlocale2.c test-setsockopt.c \
@@ -1162,10 +1195,11 @@ SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \
$(test_u8_mbtoucr_SOURCES) $(test_u8_uctomb_SOURCES) \
$(test_uc_width_SOURCES) $(test_uc_width2_SOURCES) \
test-unistd.c test-unsetenv.c test-vasnprintf.c \
- test-vasprintf.c test-verify.c test-version-etc.c test-wchar.c \
- test-wcrtomb.c test-wcrtomb-w32.c test-wctype-h.c \
- test-wcwidth.c test-xalloc-die.c test-xstrtol.c \
- test-xstrtoul.c test-xstrtoumax.c test-xvasprintf.c
+ test-vasprintf.c test-verify.c test-verify-try.c \
+ test-version-etc.c test-wchar.c test-wcrtomb.c \
+ test-wcrtomb-w32.c test-wctype-h.c test-wcwidth.c \
+ test-xalloc-die.c test-xstrtol.c test-xstrtoul.c \
+ test-xstrtoumax.c test-xvasprintf.c
DIST_SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \
test-accept.c test-alloca-opt.c test-areadlink.c \
test-argmatch.c test-arpa_inet.c test-binary-io.c test-bind.c \
@@ -1177,17 +1211,18 @@ DIST_SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \
test-float.c test-fnmatch.c test-fputc.c test-fread.c \
test-freopen.c test-freopen-safer.c test-fstat.c \
test-ftruncate.c test-fwrite.c test-getcwd-lgpl.c \
- test-getdtablesize.c test-getopt.c test-gettimeofday.c \
- test-hash.c test-iconv.c test-iconv-h.c test-ignore-value.c \
+ test-getdtablesize.c test-getopt-gnu.c test-getopt-posix.c \
+ test-getprogname.c test-gettimeofday.c test-hash.c \
+ test-iconv.c test-iconv-h.c test-ignore-value.c \
test-inet_pton.c test-intprops.c test-inttostr.c \
test-inttypes.c test-ioctl.c test-isblank.c test-iswblank.c \
- test-langinfo.c test-listen.c test-locale.c test-localeconv.c \
- test-lstat.c test-malloca.c test-mbrtowc.c test-mbrtowc-w32.c \
- test-mbscasecmp.c test-mbsinit.c test-mbsrtowcs.c \
- test-mbsstr1.c test-mbsstr2.c test-mbsstr3.c test-memchr.c \
- test-nanosleep.c test-netinet_in.c test-nl_langinfo.c \
- test-open.c test-pathmax.c test-perror.c test-perror2.c \
- test-pipe.c test-quotearg-simple.c test-raise.c \
+ test-langinfo.c test-limits-h.c test-listen.c test-locale.c \
+ test-localeconv.c test-lstat.c test-malloca.c test-mbrtowc.c \
+ test-mbrtowc-w32.c test-mbscasecmp.c test-mbsinit.c \
+ test-mbsrtowcs.c test-mbsstr1.c test-mbsstr2.c test-mbsstr3.c \
+ test-memchr.c test-nanosleep.c test-netinet_in.c \
+ test-nl_langinfo.c test-open.c test-pathmax.c test-perror.c \
+ test-perror2.c test-pipe.c test-quotearg-simple.c test-raise.c \
test-rawmemchr.c test-readlink.c test-regex.c test-select.c \
test-select-fd.c test-select-stdin.c test-setenv.c \
test-setlocale1.c test-setlocale2.c test-setsockopt.c \
@@ -1204,10 +1239,11 @@ DIST_SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \
$(test_u8_mbtoucr_SOURCES) $(test_u8_uctomb_SOURCES) \
$(test_uc_width_SOURCES) $(test_uc_width2_SOURCES) \
test-unistd.c test-unsetenv.c test-vasnprintf.c \
- test-vasprintf.c test-verify.c test-version-etc.c test-wchar.c \
- test-wcrtomb.c test-wcrtomb-w32.c test-wctype-h.c \
- test-wcwidth.c test-xalloc-die.c test-xstrtol.c \
- test-xstrtoul.c test-xstrtoumax.c test-xvasprintf.c
+ test-vasprintf.c test-verify.c test-verify-try.c \
+ test-version-etc.c test-wchar.c test-wcrtomb.c \
+ test-wcrtomb-w32.c test-wctype-h.c test-wcwidth.c \
+ test-xalloc-die.c test-xstrtol.c test-xstrtoul.c \
+ test-xstrtoumax.c test-xvasprintf.c
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
ctags-recursive dvi-recursive html-recursive info-recursive \
install-data-recursive install-dvi-recursive \
@@ -1507,7 +1543,7 @@ CONFIG_INCLUDE = @CONFIG_INCLUDE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
+DEFS = @DEFS@ -DEXEEXT=\"@EXEEXT@\"
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
@@ -1523,6 +1559,7 @@ ERRNO_H = @ERRNO_H@
EXEEXT = @EXEEXT@
FLOAT_H = @FLOAT_H@
FNMATCH_H = @FNMATCH_H@
+GETOPT_CDEFS_H = @GETOPT_CDEFS_H@
GETOPT_H = @GETOPT_H@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GLIBC21 = @GLIBC21@
@@ -1539,6 +1576,7 @@ GNULIB_CHDIR = @GNULIB_CHDIR@
GNULIB_CHOWN = @GNULIB_CHOWN@
GNULIB_CLOSE = @GNULIB_CLOSE@
GNULIB_CONNECT = @GNULIB_CONNECT@
+GNULIB_CTIME = @GNULIB_CTIME@
GNULIB_DPRINTF = @GNULIB_DPRINTF@
GNULIB_DUP = @GNULIB_DUP@
GNULIB_DUP2 = @GNULIB_DUP2@
@@ -1617,6 +1655,7 @@ GNULIB_LINK = @GNULIB_LINK@
GNULIB_LINKAT = @GNULIB_LINKAT@
GNULIB_LISTEN = @GNULIB_LISTEN@
GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
+GNULIB_LOCALTIME = @GNULIB_LOCALTIME@
GNULIB_LSEEK = @GNULIB_LSEEK@
GNULIB_LSTAT = @GNULIB_LSTAT@
GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
@@ -1662,6 +1701,8 @@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
GNULIB_OPEN = @GNULIB_OPEN@
GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@
+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@
GNULIB_PCLOSE = @GNULIB_PCLOSE@
GNULIB_PERROR = @GNULIB_PERROR@
GNULIB_PIPE = @GNULIB_PIPE@
@@ -1724,6 +1765,7 @@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
GNULIB_STRDUP = @GNULIB_STRDUP@
GNULIB_STRERROR = @GNULIB_STRERROR@
GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
+GNULIB_STRFTIME = @GNULIB_STRFTIME@
GNULIB_STRNCAT = @GNULIB_STRNCAT@
GNULIB_STRNDUP = @GNULIB_STRNDUP@
GNULIB_STRNLEN = @GNULIB_STRNLEN@
@@ -1747,7 +1789,9 @@ GNULIB_TIME_R = @GNULIB_TIME_R@
GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
GNULIB_TMPFILE = @GNULIB_TMPFILE@
GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
+GNULIB_TRUNCATE = @GNULIB_TRUNCATE@
GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
+GNULIB_TZSET = @GNULIB_TZSET@
GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
GNULIB_UNLINK = @GNULIB_UNLINK@
@@ -1779,6 +1823,7 @@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@
GNULIB_WCSCPY = @GNULIB_WCSCPY@
GNULIB_WCSCSPN = @GNULIB_WCSCSPN@
GNULIB_WCSDUP = @GNULIB_WCSDUP@
+GNULIB_WCSFTIME = @GNULIB_WCSFTIME@
GNULIB_WCSLEN = @GNULIB_WCSLEN@
GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@
GNULIB_WCSNCAT = @GNULIB_WCSNCAT@
@@ -1811,8 +1856,10 @@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@
HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@
HAVE_ATOLL = @HAVE_ATOLL@
HAVE_BTOWC = @HAVE_BTOWC@
+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@
HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
HAVE_CHOWN = @HAVE_CHOWN@
+HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@
HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
@@ -1823,6 +1870,7 @@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
@@ -1935,6 +1983,7 @@ HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@
HAVE_PTSNAME = @HAVE_PTSNAME@
HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_QSORT_R = @HAVE_QSORT_R@
HAVE_RAISE = @HAVE_RAISE@
HAVE_RANDOM = @HAVE_RANDOM@
HAVE_RANDOM_H = @HAVE_RANDOM_H@
@@ -1979,6 +2028,7 @@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
HAVE_SYMLINK = @HAVE_SYMLINK@
HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_H@
HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@
HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
@@ -1990,7 +2040,9 @@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@
HAVE_TIMEGM = @HAVE_TIMEGM@
HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
+HAVE_TRUNCATE = @HAVE_TRUNCATE@
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
+HAVE_TZSET = @HAVE_TZSET@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
HAVE_UNLINKAT = @HAVE_UNLINKAT@
HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
@@ -2012,6 +2064,7 @@ HAVE_WCSCOLL = @HAVE_WCSCOLL@
HAVE_WCSCPY = @HAVE_WCSCPY@
HAVE_WCSCSPN = @HAVE_WCSCSPN@
HAVE_WCSDUP = @HAVE_WCSDUP@
+HAVE_WCSFTIME = @HAVE_WCSFTIME@
HAVE_WCSLEN = @HAVE_WCSLEN@
HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@
HAVE_WCSNCAT = @HAVE_WCSNCAT@
@@ -2074,6 +2127,7 @@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
LIB_SELECT = @LIB_SELECT@
+LIMITS_H = @LIMITS_H@
LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
LOCALE_FR = @LOCALE_FR@
LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
@@ -2101,6 +2155,7 @@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@
NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@
NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@
NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@
@@ -2131,6 +2186,7 @@ NEXT_GETOPT_H = @NEXT_GETOPT_H@
NEXT_ICONV_H = @NEXT_ICONV_H@
NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_LIMITS_H = @NEXT_LIMITS_H@
NEXT_LOCALE_H = @NEXT_LOCALE_H@
NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
NEXT_SIGNAL_H = @NEXT_SIGNAL_H@
@@ -2176,6 +2232,7 @@ REPLACE_CALLOC = @REPLACE_CALLOC@
REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_CTIME = @REPLACE_CTIME@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
@@ -2283,6 +2340,7 @@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
REPLACE_STRDUP = @REPLACE_STRDUP@
REPLACE_STRERROR = @REPLACE_STRERROR@
REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
+REPLACE_STRFTIME = @REPLACE_STRFTIME@
REPLACE_STRNCAT = @REPLACE_STRNCAT@
REPLACE_STRNDUP = @REPLACE_STRNDUP@
REPLACE_STRNLEN = @REPLACE_STRNLEN@
@@ -2299,7 +2357,9 @@ REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
REPLACE_TIMEGM = @REPLACE_TIMEGM@
REPLACE_TMPFILE = @REPLACE_TMPFILE@
REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
+REPLACE_TRUNCATE = @REPLACE_TRUNCATE@
REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
+REPLACE_TZSET = @REPLACE_TZSET@
REPLACE_UNLINK = @REPLACE_UNLINK@
REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
REPLACE_UNSETENV = @REPLACE_UNSETENV@
@@ -2312,6 +2372,7 @@ REPLACE_VPRINTF = @REPLACE_VPRINTF@
REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
+REPLACE_WCSFTIME = @REPLACE_WCSFTIME@
REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
@@ -2348,6 +2409,8 @@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
WERROR_CFLAGS = @WERROR_CFLAGS@
WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@
+WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@
+WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@
WINT_T_SUFFIX = @WINT_T_SUFFIX@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
@@ -2357,7 +2420,6 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
am__include = @am__include@
am__quote = @am__quote@
@@ -2458,20 +2520,23 @@ EXTRA_DIST = accept.c w32sock.h test-accept.c signature.h macros.h \
test-ftruncate.c test-ftruncate.sh signature.h macros.h \
test-fwrite.c signature.h macros.h getcwd-lgpl.c \
test-getcwd-lgpl.c signature.h macros.h test-getdtablesize.c \
- signature.h macros.h macros.h signature.h test-getopt.c \
- test-getopt.h test-getopt_long.h getpagesize.c signature.h \
+ signature.h macros.h macros.h signature.h test-getopt-gnu.c \
+ test-getopt-main.h test-getopt.h test-getopt_long.h macros.h \
+ signature.h test-getopt-posix.c test-getopt-main.h \
+ test-getopt.h getpagesize.c test-getprogname.c signature.h \
test-gettimeofday.c test-hash.c macros.h test-iconv-h.c \
test-iconv.c signature.h macros.h test-ignore-value.c \
inet_pton.c test-inet_pton.c signature.h macros.h \
test-intprops.c macros.h macros.h test-inttostr.c \
test-inttypes.c ioctl.c w32sock.h test-ioctl.c signature.h \
macros.h test-isblank.c signature.h macros.h test-iswblank.c \
- macros.h test-langinfo.c listen.c w32sock.h test-listen.c \
- signature.h macros.h test-locale.c test-localeconv.c \
- signature.h macros.h test-lstat.h test-lstat.c signature.h \
- macros.h test-malloca.c test-mbrtowc1.sh test-mbrtowc2.sh \
- test-mbrtowc3.sh test-mbrtowc4.sh test-mbrtowc5.sh \
- test-mbrtowc.c test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh \
+ macros.h test-langinfo.c test-limits-h.c listen.c w32sock.h \
+ test-listen.c signature.h macros.h test-locale.c \
+ test-localeconv.c signature.h macros.h test-lstat.h \
+ test-lstat.c signature.h macros.h test-malloca.c \
+ test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh \
+ test-mbrtowc4.sh test-mbrtowc5.sh test-mbrtowc.c \
+ test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh \
test-mbrtowc-w32-3.sh test-mbrtowc-w32-4.sh \
test-mbrtowc-w32-5.sh test-mbrtowc-w32.c signature.h macros.h \
test-mbscasecmp.sh test-mbscasecmp.c macros.h test-mbsinit.sh \
@@ -2499,25 +2564,21 @@ EXTRA_DIST = accept.c w32sock.h test-accept.c signature.h macros.h \
test-setsockopt.c signature.h macros.h test-sh-quote.c \
test-sigaction.c signature.h macros.h test-signal-h.c \
test-sigprocmask.c signature.h macros.h sleep.c test-sleep.c \
- signature.h macros.h \
- $(top_srcdir)/build-aux/snippet/_Noreturn.h \
- $(top_srcdir)/build-aux/snippet/arg-nonnull.h \
- $(top_srcdir)/build-aux/snippet/c++defs.h \
- $(top_srcdir)/build-aux/snippet/unused-parameter.h \
- $(top_srcdir)/build-aux/snippet/warn-on-use.h snprintf.c \
- test-snprintf.c signature.h macros.h socket.c w32sock.h \
- w32sock.h test-sockets.c test-stat.h test-stat.c signature.h \
- macros.h test-stat-time.c macros.h nap.h stdalign.in.h \
- test-stdalign.c macros.h test-stdbool.c test-stddef.c \
- test-stdint.c test-stdio.c test-stdlib.c test-sys_wait.h \
- test-strerror.c signature.h macros.h strerror_r.c \
- test-strerror_r.c signature.h macros.h test-strftime.c \
- macros.h test-striconv.c macros.h test-string.c test-strings.c \
- test-strnlen.c zerosize-ptr.h signature.h macros.h \
- test-strtoull.c signature.h macros.h test-strtoumax.c \
- signature.h macros.h symlink.c test-symlink.h test-symlink.c \
- signature.h macros.h sys_ioctl.in.h test-sys_ioctl.c \
- sys_select.in.h test-sys_select.c signature.h sys_socket.in.h \
+ signature.h macros.h _Noreturn.h arg-nonnull.h c++defs.h \
+ unused-parameter.h warn-on-use.h snprintf.c test-snprintf.c \
+ signature.h macros.h socket.c w32sock.h w32sock.h \
+ test-sockets.c test-stat.h test-stat.c signature.h macros.h \
+ test-stat-time.c macros.h nap.h stdalign.in.h test-stdalign.c \
+ macros.h test-stdbool.c test-stddef.c test-stdint.c \
+ test-stdio.c test-stdlib.c test-sys_wait.h test-strerror.c \
+ signature.h macros.h strerror_r.c test-strerror_r.c \
+ signature.h macros.h test-strftime.c macros.h test-striconv.c \
+ macros.h test-string.c test-strings.c test-strnlen.c \
+ zerosize-ptr.h signature.h macros.h test-strtoull.c \
+ signature.h macros.h test-strtoumax.c signature.h macros.h \
+ symlink.c test-symlink.h test-symlink.c signature.h macros.h \
+ sys_ioctl.in.h test-sys_ioctl.c sys_select.in.h \
+ test-sys_select.c signature.h sys_socket.in.h \
test-sys_socket.c test-sys_stat.c test-sys_time.c \
test-sys_types.c sys_uio.in.h test-sys_uio.c test-sys_wait.c \
test-sys_wait.h init.sh test-init.sh test-time.c \
@@ -2528,46 +2589,28 @@ EXTRA_DIST = accept.c w32sock.h test-accept.c signature.h macros.h \
signature.h macros.h test-update-copyright.sh \
test-vasnprintf.c macros.h test-vasprintf.c signature.h \
macros.h test-vc-list-files-git.sh test-vc-list-files-cvs.sh \
- test-verify.c test-verify.sh test-version-etc.c \
- test-version-etc.sh test-wchar.c test-wcrtomb.sh \
- test-wcrtomb.c test-wcrtomb-w32-1.sh test-wcrtomb-w32-2.sh \
- test-wcrtomb-w32-3.sh test-wcrtomb-w32-4.sh \
- test-wcrtomb-w32-5.sh test-wcrtomb-w32.c signature.h macros.h \
- wctob.c wctomb-impl.h wctomb.c test-wctype-h.c macros.h \
- test-wcwidth.c signature.h macros.h test-xalloc-die.c \
- test-xalloc-die.sh test-xstrtol.c test-xstrtoul.c \
- test-xstrtol.sh test-xstrtoumax.c test-xstrtoumax.sh \
- test-xvasprintf.c macros.h
-
-# The BUILT_SOURCES created by this Makefile snippet are not used via #include
-# statements but through direct file reference. Therefore this snippet must be
-# present in all Makefile.am that need it. This is ensured by the applicability
-# 'all' defined above.
-
-# The BUILT_SOURCES created by this Makefile snippet are not used via #include
-# statements but through direct file reference. Therefore this snippet must be
-# present in all Makefile.am that need it. This is ensured by the applicability
-# 'all' defined above.
-
-# The BUILT_SOURCES created by this Makefile snippet are not used via #include
-# statements but through direct file reference. Therefore this snippet must be
-# present in all Makefile.am that need it. This is ensured by the applicability
-# 'all' defined above.
-BUILT_SOURCES = arpa/inet.h $(NETINET_IN_H) arg-nonnull.h c++defs.h \
- unused-parameter.h warn-on-use.h $(STDALIGN_H) sys/ioctl.h \
+ test-verify.c test-verify-try.c test-verify.sh \
+ test-version-etc.c test-version-etc.sh test-wchar.c \
+ test-wcrtomb.sh test-wcrtomb.c test-wcrtomb-w32-1.sh \
+ test-wcrtomb-w32-2.sh test-wcrtomb-w32-3.sh \
+ test-wcrtomb-w32-4.sh test-wcrtomb-w32-5.sh test-wcrtomb-w32.c \
+ signature.h macros.h wctob.c wctomb-impl.h wctomb.c \
+ test-wctype-h.c macros.h test-wcwidth.c signature.h macros.h \
+ test-xalloc-die.c test-xalloc-die.sh test-xstrtol.c \
+ test-xstrtoul.c test-xstrtol.sh test-xstrtoumax.c \
+ test-xstrtoumax.sh test-xvasprintf.c macros.h
+BUILT_SOURCES = arpa/inet.h $(NETINET_IN_H) $(STDALIGN_H) sys/ioctl.h \
sys/select.h sys/socket.h sys/uio.h
SUFFIXES =
-# This test expects compilation of test-verify.c to fail, and
+# This test expects compilation of test-verify-try.c to fail, and
# each time it fails, the makefile rule does not perform the usual
# "mv -f $name.Tpo $name.po, so tell make clean to remove that file.
MOSTLYCLEANFILES = core *.stackdump arpa/inet.h arpa/inet.h-t \
t-c-stack.tmp t-c-stack2.tmp netinet/in.h netinet/in.h-t \
- arg-nonnull.h arg-nonnull.h-t c++defs.h c++defs.h-t \
- unused-parameter.h unused-parameter.h-t warn-on-use.h \
- warn-on-use.h-t stdalign.h stdalign.h-t sys/ioctl.h \
- sys/ioctl.h-t sys/select.h sys/select.h-t sys/socket.h \
- sys/socket.h-t sys/uio.h sys/uio.h-t .deps/test-verify.Tpo
+ stdalign.h stdalign.h-t sys/ioctl.h sys/ioctl.h-t sys/select.h \
+ sys/select.h-t sys/socket.h sys/socket.h-t sys/uio.h \
+ sys/uio.h-t .deps/test-verify-try.Tpo
MOSTLYCLEANDIRS = arpa netinet sys sys sys sys
CLEANFILES =
DISTCLEANFILES =
@@ -2598,7 +2641,9 @@ test_dirname_LDADD = $(LDADD) @LIBINTL@
test_exclude_LDADD = $(LDADD) @LIBINTL@ $(LIBTHREAD)
test_filenamecat_LDADD = $(LDADD) @LIBINTL@
test_getcwd_lgpl_LDADD = $(LDADD) $(LIBINTL)
-test_getopt_LDADD = $(LDADD) $(LIBINTL)
+test_getopt_gnu_LDADD = $(LDADD) $(LIBINTL)
+test_getopt_posix_LDADD = $(LDADD) $(LIBINTL)
+test_getprogname_LDADD = $(LDADD)
test_iconv_LDADD = $(LDADD) @LIBICONV@
test_inet_pton_LDADD = $(LDADD) @INET_PTON_LIB@
test_listen_LDADD = $(LDADD) @LIBSOCKET@
@@ -2612,13 +2657,29 @@ test_setsockopt_LDADD = $(LDADD) @LIBSOCKET@
test_sh_quote_LDADD = $(LDADD) @LIBINTL@
# Because this Makefile snippet defines a variable used by other
-# gnulib Makefile snippets, it must be present in all Makefile.am that
+# gnulib Makefile snippets, it must be present in all makefiles that
+# need it. This is ensured by the applicability 'all' defined above.
+_NORETURN_H = $(srcdir)/_Noreturn.h
+
+# Because this Makefile snippet defines a variable used by other
+# gnulib Makefile snippets, it must be present in all makefiles that
+# need it. This is ensured by the applicability 'all' defined above.
+ARG_NONNULL_H = $(srcdir)/arg-nonnull.h
+
+# Because this Makefile snippet defines a variable used by other
+# gnulib Makefile snippets, it must be present in all makefiles that
+# need it. This is ensured by the applicability 'all' defined above.
+CXXDEFS_H = $(srcdir)/c++defs.h
+
+# Because this Makefile snippet defines a variable used by other
+# gnulib Makefile snippets, it must be present in all makefiles that
# need it. This is ensured by the applicability 'all' defined above.
-_NORETURN_H = $(top_srcdir)/build-aux/snippet/_Noreturn.h
-ARG_NONNULL_H = arg-nonnull.h
-CXXDEFS_H = c++defs.h
-UNUSED_PARAMETER_H = unused-parameter.h
-WARN_ON_USE_H = warn-on-use.h
+UNUSED_PARAMETER_H = $(srcdir)/unused-parameter.h
+
+# Because this Makefile snippet defines a variable used by other
+# gnulib Makefile snippets, it must be present in all makefiles that
+# need it. This is ensured by the applicability 'all' defined above.
+WARN_ON_USE_H = $(srcdir)/warn-on-use.h
test_sockets_LDADD = $(LDADD) @LIBSOCKET@
test_stat_LDADD = $(LDADD) $(LIBINTL)
test_stat_time_LDADD = $(LDADD) $(LIB_NANOSLEEP)
@@ -2838,9 +2899,17 @@ test-getdtablesize$(EXEEXT): $(test_getdtablesize_OBJECTS) $(test_getdtablesize_
@rm -f test-getdtablesize$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_getdtablesize_OBJECTS) $(test_getdtablesize_LDADD) $(LIBS)
-test-getopt$(EXEEXT): $(test_getopt_OBJECTS) $(test_getopt_DEPENDENCIES) $(EXTRA_test_getopt_DEPENDENCIES)
- @rm -f test-getopt$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(test_getopt_OBJECTS) $(test_getopt_LDADD) $(LIBS)
+test-getopt-gnu$(EXEEXT): $(test_getopt_gnu_OBJECTS) $(test_getopt_gnu_DEPENDENCIES) $(EXTRA_test_getopt_gnu_DEPENDENCIES)
+ @rm -f test-getopt-gnu$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_getopt_gnu_OBJECTS) $(test_getopt_gnu_LDADD) $(LIBS)
+
+test-getopt-posix$(EXEEXT): $(test_getopt_posix_OBJECTS) $(test_getopt_posix_DEPENDENCIES) $(EXTRA_test_getopt_posix_DEPENDENCIES)
+ @rm -f test-getopt-posix$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_getopt_posix_OBJECTS) $(test_getopt_posix_LDADD) $(LIBS)
+
+test-getprogname$(EXEEXT): $(test_getprogname_OBJECTS) $(test_getprogname_DEPENDENCIES) $(EXTRA_test_getprogname_DEPENDENCIES)
+ @rm -f test-getprogname$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_getprogname_OBJECTS) $(test_getprogname_LDADD) $(LIBS)
test-gettimeofday$(EXEEXT): $(test_gettimeofday_OBJECTS) $(test_gettimeofday_DEPENDENCIES) $(EXTRA_test_gettimeofday_DEPENDENCIES)
@rm -f test-gettimeofday$(EXEEXT)
@@ -2894,6 +2963,10 @@ test-langinfo$(EXEEXT): $(test_langinfo_OBJECTS) $(test_langinfo_DEPENDENCIES) $
@rm -f test-langinfo$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_langinfo_OBJECTS) $(test_langinfo_LDADD) $(LIBS)
+test-limits-h$(EXEEXT): $(test_limits_h_OBJECTS) $(test_limits_h_DEPENDENCIES) $(EXTRA_test_limits_h_DEPENDENCIES)
+ @rm -f test-limits-h$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_limits_h_OBJECTS) $(test_limits_h_LDADD) $(LIBS)
+
test-listen$(EXEEXT): $(test_listen_OBJECTS) $(test_listen_DEPENDENCIES) $(EXTRA_test_listen_DEPENDENCIES)
@rm -f test-listen$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_listen_OBJECTS) $(test_listen_LDADD) $(LIBS)
@@ -3226,6 +3299,10 @@ test-verify$(EXEEXT): $(test_verify_OBJECTS) $(test_verify_DEPENDENCIES) $(EXTRA
@rm -f test-verify$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_verify_OBJECTS) $(test_verify_LDADD) $(LIBS)
+test-verify-try$(EXEEXT): $(test_verify_try_OBJECTS) $(test_verify_try_DEPENDENCIES) $(EXTRA_test_verify_try_DEPENDENCIES)
+ @rm -f test-verify-try$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_verify_try_OBJECTS) $(test_verify_try_LDADD) $(LIBS)
+
test-version-etc$(EXEEXT): $(test_version_etc_OBJECTS) $(test_version_etc_DEPENDENCIES) $(EXTRA_test_version_etc_DEPENDENCIES)
@rm -f test-version-etc$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_version_etc_OBJECTS) $(test_version_etc_LDADD) $(LIBS)
@@ -3341,7 +3418,9 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fwrite.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getcwd-lgpl.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getdtablesize.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getopt.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getopt-gnu.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getopt-posix.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getprogname.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-gettimeofday.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-hash.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-iconv-h.Po@am__quote@ # am--include-marker
@@ -3355,6 +3434,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isblank.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-iswblank.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-langinfo.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-limits-h.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-listen.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-locale.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-localeconv.Po@am__quote@ # am--include-marker
@@ -3428,6 +3508,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unsetenv.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-vasnprintf.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-vasprintf.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-verify-try.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-verify.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-version-etc.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wchar.Po@am__quote@ # am--include-marker
@@ -4028,9 +4109,23 @@ test-getdtablesize.log: test-getdtablesize$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
-test-getopt.log: test-getopt$(EXEEXT)
- @p='test-getopt$(EXEEXT)'; \
- b='test-getopt'; \
+test-getopt-gnu.log: test-getopt-gnu$(EXEEXT)
+ @p='test-getopt-gnu$(EXEEXT)'; \
+ b='test-getopt-gnu'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-getopt-posix.log: test-getopt-posix$(EXEEXT)
+ @p='test-getopt-posix$(EXEEXT)'; \
+ b='test-getopt-posix'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-getprogname.log: test-getprogname$(EXEEXT)
+ @p='test-getprogname$(EXEEXT)'; \
+ b='test-getprogname'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
@@ -4126,6 +4221,13 @@ test-langinfo.log: test-langinfo$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-limits-h.log: test-limits-h$(EXEEXT)
+ @p='test-limits-h$(EXEEXT)'; \
+ b='test-limits-h'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-listen.log: test-listen$(EXEEXT)
@p='test-listen$(EXEEXT)'; \
b='test-listen'; \
@@ -5073,7 +5175,9 @@ distclean: distclean-recursive
-rm -f ./$(DEPDIR)/test-fwrite.Po
-rm -f ./$(DEPDIR)/test-getcwd-lgpl.Po
-rm -f ./$(DEPDIR)/test-getdtablesize.Po
- -rm -f ./$(DEPDIR)/test-getopt.Po
+ -rm -f ./$(DEPDIR)/test-getopt-gnu.Po
+ -rm -f ./$(DEPDIR)/test-getopt-posix.Po
+ -rm -f ./$(DEPDIR)/test-getprogname.Po
-rm -f ./$(DEPDIR)/test-gettimeofday.Po
-rm -f ./$(DEPDIR)/test-hash.Po
-rm -f ./$(DEPDIR)/test-iconv-h.Po
@@ -5087,6 +5191,7 @@ distclean: distclean-recursive
-rm -f ./$(DEPDIR)/test-isblank.Po
-rm -f ./$(DEPDIR)/test-iswblank.Po
-rm -f ./$(DEPDIR)/test-langinfo.Po
+ -rm -f ./$(DEPDIR)/test-limits-h.Po
-rm -f ./$(DEPDIR)/test-listen.Po
-rm -f ./$(DEPDIR)/test-locale.Po
-rm -f ./$(DEPDIR)/test-localeconv.Po
@@ -5160,6 +5265,7 @@ distclean: distclean-recursive
-rm -f ./$(DEPDIR)/test-unsetenv.Po
-rm -f ./$(DEPDIR)/test-vasnprintf.Po
-rm -f ./$(DEPDIR)/test-vasprintf.Po
+ -rm -f ./$(DEPDIR)/test-verify-try.Po
-rm -f ./$(DEPDIR)/test-verify.Po
-rm -f ./$(DEPDIR)/test-version-etc.Po
-rm -f ./$(DEPDIR)/test-wchar.Po
@@ -5288,7 +5394,9 @@ maintainer-clean: maintainer-clean-recursive
-rm -f ./$(DEPDIR)/test-fwrite.Po
-rm -f ./$(DEPDIR)/test-getcwd-lgpl.Po
-rm -f ./$(DEPDIR)/test-getdtablesize.Po
- -rm -f ./$(DEPDIR)/test-getopt.Po
+ -rm -f ./$(DEPDIR)/test-getopt-gnu.Po
+ -rm -f ./$(DEPDIR)/test-getopt-posix.Po
+ -rm -f ./$(DEPDIR)/test-getprogname.Po
-rm -f ./$(DEPDIR)/test-gettimeofday.Po
-rm -f ./$(DEPDIR)/test-hash.Po
-rm -f ./$(DEPDIR)/test-iconv-h.Po
@@ -5302,6 +5410,7 @@ maintainer-clean: maintainer-clean-recursive
-rm -f ./$(DEPDIR)/test-isblank.Po
-rm -f ./$(DEPDIR)/test-iswblank.Po
-rm -f ./$(DEPDIR)/test-langinfo.Po
+ -rm -f ./$(DEPDIR)/test-limits-h.Po
-rm -f ./$(DEPDIR)/test-listen.Po
-rm -f ./$(DEPDIR)/test-locale.Po
-rm -f ./$(DEPDIR)/test-localeconv.Po
@@ -5375,6 +5484,7 @@ maintainer-clean: maintainer-clean-recursive
-rm -f ./$(DEPDIR)/test-unsetenv.Po
-rm -f ./$(DEPDIR)/test-vasnprintf.Po
-rm -f ./$(DEPDIR)/test-vasprintf.Po
+ -rm -f ./$(DEPDIR)/test-verify-try.Po
-rm -f ./$(DEPDIR)/test-verify.Po
-rm -f ./$(DEPDIR)/test-version-etc.Po
-rm -f ./$(DEPDIR)/test-wchar.Po
@@ -5478,41 +5588,6 @@ arpa/inet.h: arpa_inet.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON
@GL_GENERATE_NETINET_IN_H_TRUE@ mv $@-t $@
@GL_GENERATE_NETINET_IN_H_FALSE@netinet/in.h: $(top_builddir)/config.status
@GL_GENERATE_NETINET_IN_H_FALSE@ rm -f $@
-# The arg-nonnull.h that gets inserted into generated .h files is the same as
-# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut
-# off.
-arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/GL_ARG_NONNULL/,$$p' \
- < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \
- > $@-t && \
- mv $@-t $@
-# The c++defs.h that gets inserted into generated .h files is the same as
-# build-aux/snippet/c++defs.h, except that it has the copyright header cut off.
-c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/_GL_CXXDEFS/,$$p' \
- < $(top_srcdir)/build-aux/snippet/c++defs.h \
- > $@-t && \
- mv $@-t $@
-# The unused-parameter.h that gets inserted into generated .h files is the same
-# as build-aux/snippet/unused-parameter.h, except that it has the copyright
-# header cut off.
-unused-parameter.h: $(top_srcdir)/build-aux/snippet/unused-parameter.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \
- < $(top_srcdir)/build-aux/snippet/unused-parameter.h \
- > $@-t && \
- mv $@-t $@
-# The warn-on-use.h that gets inserted into generated .h files is the same as
-# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut
-# off.
-warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/^.ifndef/,$$p' \
- < $(top_srcdir)/build-aux/snippet/warn-on-use.h \
- > $@-t && \
- mv $@-t $@
# We need the following in order to create <stdalign.h> when the system
# doesn't have one that works.
diff --git a/gnulib-tests/_Noreturn.h b/gnulib-tests/_Noreturn.h
new file mode 100644
index 0000000..c44ad89
--- /dev/null
+++ b/gnulib-tests/_Noreturn.h
@@ -0,0 +1,10 @@
+#if !defined _Noreturn && __STDC_VERSION__ < 201112
+# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
+ || 0x5110 <= __SUNPRO_C)
+# define _Noreturn __attribute__ ((__noreturn__))
+# elif 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn
+# endif
+#endif
diff --git a/gnulib-tests/accept.c b/gnulib-tests/accept.c
index bd0605e..08bb4d9 100644
--- a/gnulib-tests/accept.c
+++ b/gnulib-tests/accept.c
@@ -1,6 +1,6 @@
/* accept.c --- wrappers for Windows accept function
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
diff --git a/gnulib-tests/arg-nonnull.h b/gnulib-tests/arg-nonnull.h
new file mode 100644
index 0000000..1e62cc8
--- /dev/null
+++ b/gnulib-tests/arg-nonnull.h
@@ -0,0 +1,26 @@
+/* A C macro for declaring that specific arguments must not be NULL.
+ Copyright (C) 2009-2017 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/>. */
+
+/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
+ that the values passed as arguments n, ..., m must be non-NULL pointers.
+ n = 1 stands for the first argument, n = 2 for the second argument etc. */
+#ifndef _GL_ARG_NONNULL
+# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
+# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
+# else
+# define _GL_ARG_NONNULL(params)
+# endif
+#endif
diff --git a/gnulib-tests/arpa_inet.in.h b/gnulib-tests/arpa_inet.in.h
index 026c4dc..dc3d2bd 100644
--- a/gnulib-tests/arpa_inet.in.h
+++ b/gnulib-tests/arpa_inet.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <arpa/inet.h>.
- Copyright (C) 2005-2006, 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2008-2017 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
diff --git a/gnulib-tests/bind.c b/gnulib-tests/bind.c
index 7f526e2..bde82d3 100644
--- a/gnulib-tests/bind.c
+++ b/gnulib-tests/bind.c
@@ -1,6 +1,6 @@
/* bind.c --- wrappers for Windows bind function
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
diff --git a/gnulib-tests/c++defs.h b/gnulib-tests/c++defs.h
new file mode 100644
index 0000000..f03f359
--- /dev/null
+++ b/gnulib-tests/c++defs.h
@@ -0,0 +1,316 @@
+/* C++ compatible function declaration macros.
+ Copyright (C) 2010-2017 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 _GL_CXXDEFS_H
+#define _GL_CXXDEFS_H
+
+/* Begin/end the GNULIB_NAMESPACE namespace. */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE {
+# define _GL_END_NAMESPACE }
+#else
+# define _GL_BEGIN_NAMESPACE
+# define _GL_END_NAMESPACE
+#endif
+
+/* The three most frequent use cases of these macros are:
+
+ * For providing a substitute for a function that is missing on some
+ platforms, but is declared and works fine on the platforms on which
+ it exists:
+
+ #if @GNULIB_FOO@
+ # if !@HAVE_FOO@
+ _GL_FUNCDECL_SYS (foo, ...);
+ # endif
+ _GL_CXXALIAS_SYS (foo, ...);
+ _GL_CXXALIASWARN (foo);
+ #elif defined GNULIB_POSIXCHECK
+ ...
+ #endif
+
+ * For providing a replacement for a function that exists on all platforms,
+ but is broken/insufficient and needs to be replaced on some platforms:
+
+ #if @GNULIB_FOO@
+ # if @REPLACE_FOO@
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+ # undef foo
+ # define foo rpl_foo
+ # endif
+ _GL_FUNCDECL_RPL (foo, ...);
+ _GL_CXXALIAS_RPL (foo, ...);
+ # else
+ _GL_CXXALIAS_SYS (foo, ...);
+ # endif
+ _GL_CXXALIASWARN (foo);
+ #elif defined GNULIB_POSIXCHECK
+ ...
+ #endif
+
+ * For providing a replacement for a function that exists on some platforms
+ but is broken/insufficient and needs to be replaced on some of them and
+ is additionally either missing or undeclared on some other platforms:
+
+ #if @GNULIB_FOO@
+ # if @REPLACE_FOO@
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+ # undef foo
+ # define foo rpl_foo
+ # endif
+ _GL_FUNCDECL_RPL (foo, ...);
+ _GL_CXXALIAS_RPL (foo, ...);
+ # else
+ # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
+ _GL_FUNCDECL_SYS (foo, ...);
+ # endif
+ _GL_CXXALIAS_SYS (foo, ...);
+ # endif
+ _GL_CXXALIASWARN (foo);
+ #elif defined GNULIB_POSIXCHECK
+ ...
+ #endif
+*/
+
+/* _GL_EXTERN_C declaration;
+ performs the declaration with C linkage. */
+#if defined __cplusplus
+# define _GL_EXTERN_C extern "C"
+#else
+# define _GL_EXTERN_C extern
+#endif
+
+/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
+ declares a replacement function, named rpl_func, with the given prototype,
+ consisting of return type, parameters, and attributes.
+ Example:
+ _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
+ _GL_ARG_NONNULL ((1)));
+ */
+#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
+ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
+#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
+ _GL_EXTERN_C rettype rpl_func parameters_and_attributes
+
+/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
+ declares the system function, named func, with the given prototype,
+ consisting of return type, parameters, and attributes.
+ Example:
+ _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
+ _GL_ARG_NONNULL ((1)));
+ */
+#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
+ _GL_EXTERN_C rettype func parameters_and_attributes
+
+/* _GL_CXXALIAS_RPL (func, rettype, parameters);
+ declares a C++ alias called GNULIB_NAMESPACE::func
+ that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
+ Example:
+ _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
+
+ Wrapping rpl_func in an object with an inline conversion operator
+ avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is
+ actually used in the program. */
+#define _GL_CXXALIAS_RPL(func,rettype,parameters) \
+ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
+ namespace GNULIB_NAMESPACE \
+ { \
+ static const struct _gl_ ## func ## _wrapper \
+ { \
+ typedef rettype (*type) parameters; \
+ \
+ inline operator type () const \
+ { \
+ return ::rpl_func; \
+ } \
+ } func = {}; \
+ } \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+#else
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
+ is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
+ except that the C function rpl_func may have a slightly different
+ declaration. A cast is used to silence the "invalid conversion" error
+ that would otherwise occur. */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
+ namespace GNULIB_NAMESPACE \
+ { \
+ static const struct _gl_ ## func ## _wrapper \
+ { \
+ typedef rettype (*type) parameters; \
+ \
+ inline operator type () const \
+ { \
+ return reinterpret_cast<type>(::rpl_func); \
+ } \
+ } func = {}; \
+ } \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+#else
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+/* _GL_CXXALIAS_SYS (func, rettype, parameters);
+ declares a C++ alias called GNULIB_NAMESPACE::func
+ that redirects to the system provided function func, if GNULIB_NAMESPACE
+ is defined.
+ Example:
+ _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
+
+ Wrapping func in an object with an inline conversion operator
+ avoids a reference to func unless GNULIB_NAMESPACE::func is
+ actually used in the program. */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
+ namespace GNULIB_NAMESPACE \
+ { \
+ static const struct _gl_ ## func ## _wrapper \
+ { \
+ typedef rettype (*type) parameters; \
+ \
+ inline operator type () const \
+ { \
+ return ::func; \
+ } \
+ } func = {}; \
+ } \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+#else
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters);
+ except that the C function func may have a slightly different declaration.
+ A cast is used to silence the "invalid conversion" error that would
+ otherwise occur. */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
+ namespace GNULIB_NAMESPACE \
+ { \
+ static const struct _gl_ ## func ## _wrapper \
+ { \
+ typedef rettype (*type) parameters; \
+ \
+ inline operator type () const \
+ { \
+ return reinterpret_cast<type>(::func); \
+ } \
+ } func = {}; \
+ } \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+#else
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters);
+ except that the C function is picked among a set of overloaded functions,
+ namely the one with rettype2 and parameters2. Two consecutive casts
+ are used to silence the "cannot find a match" and "invalid conversion"
+ errors that would otherwise occur. */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+ /* The outer cast must be a reinterpret_cast.
+ The inner cast: When the function is defined as a set of overloaded
+ functions, it works as a static_cast<>, choosing the designated variant.
+ When the function is defined as a single variant, it works as a
+ reinterpret_cast<>. The parenthesized cast syntax works both ways. */
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
+ namespace GNULIB_NAMESPACE \
+ { \
+ static const struct _gl_ ## func ## _wrapper \
+ { \
+ typedef rettype (*type) parameters; \
+ \
+ inline operator type () const \
+ { \
+ return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \
+ } \
+ } func = {}; \
+ } \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+#else
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+/* _GL_CXXALIASWARN (func);
+ causes a warning to be emitted when ::func is used but not when
+ GNULIB_NAMESPACE::func is used. func must be defined without overloaded
+ variants. */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_CXXALIASWARN(func) \
+ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
+# define _GL_CXXALIASWARN_1(func,namespace) \
+ _GL_CXXALIASWARN_2 (func, namespace)
+/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
+ we enable the warning only when not optimizing. */
+# if !__OPTIMIZE__
+# define _GL_CXXALIASWARN_2(func,namespace) \
+ _GL_WARN_ON_USE (func, \
+ "The symbol ::" #func " refers to the system function. " \
+ "Use " #namespace "::" #func " instead.")
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
+# define _GL_CXXALIASWARN_2(func,namespace) \
+ extern __typeof__ (func) func
+# else
+# define _GL_CXXALIASWARN_2(func,namespace) \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+# endif
+#else
+# define _GL_CXXALIASWARN(func) \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
+ causes a warning to be emitted when the given overloaded variant of ::func
+ is used but not when GNULIB_NAMESPACE::func is used. */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
+ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
+ GNULIB_NAMESPACE)
+# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
+ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
+/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
+ we enable the warning only when not optimizing. */
+# if !__OPTIMIZE__
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
+ _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
+ "The symbol ::" #func " refers to the system function. " \
+ "Use " #namespace "::" #func " instead.")
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
+ extern __typeof__ (func) func
+# else
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+# endif
+#else
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+#endif /* _GL_CXXDEFS_H */
diff --git a/gnulib-tests/connect.c b/gnulib-tests/connect.c
index 1d42317..9e2a36e 100644
--- a/gnulib-tests/connect.c
+++ b/gnulib-tests/connect.c
@@ -1,6 +1,6 @@
/* connect.c --- wrappers for Windows connect function
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
diff --git a/gnulib-tests/dtotimespec.c b/gnulib-tests/dtotimespec.c
index 9028044..3ca5a9c 100644
--- a/gnulib-tests/dtotimespec.c
+++ b/gnulib-tests/dtotimespec.c
@@ -1,6 +1,6 @@
/* Convert double to timespec.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
@@ -29,15 +29,9 @@
struct timespec
dtotimespec (double sec)
{
- double min_representable = TYPE_MINIMUM (time_t);
- double max_representable =
- ((TYPE_MAXIMUM (time_t) * (double) TIMESPEC_RESOLUTION
- + (TIMESPEC_RESOLUTION - 1))
- / TIMESPEC_RESOLUTION);
-
- if (! (min_representable < sec))
+ if (! (TYPE_MINIMUM (time_t) < sec))
return make_timespec (TYPE_MINIMUM (time_t), 0);
- else if (! (sec < max_representable))
+ else if (! (sec < 1.0 + TYPE_MAXIMUM (time_t)))
return make_timespec (TYPE_MAXIMUM (time_t), TIMESPEC_RESOLUTION - 1);
else
{
diff --git a/gnulib-tests/fdopen.c b/gnulib-tests/fdopen.c
index 61fbfdf..2ee87eb 100644
--- a/gnulib-tests/fdopen.c
+++ b/gnulib-tests/fdopen.c
@@ -1,5 +1,5 @@
/* Open a stream with a given file descriptor.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/fpucw.h b/gnulib-tests/fpucw.h
index 05ee0ca..dc30dd6 100644
--- a/gnulib-tests/fpucw.h
+++ b/gnulib-tests/fpucw.h
@@ -1,5 +1,5 @@
/* Manipulating the FPU control word. -*- coding: utf-8 -*-
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/ftruncate.c b/gnulib-tests/ftruncate.c
index 1b39c87..3dac017 100644
--- a/gnulib-tests/ftruncate.c
+++ b/gnulib-tests/ftruncate.c
@@ -1,5 +1,5 @@
/* ftruncate emulations for native Windows.
- Copyright (C) 1992-2016 Free Software Foundation, Inc.
+ Copyright (C) 1992-2017 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
@@ -31,14 +31,18 @@
/* Ensure that <windows.h> declares GetFileSizeEx. */
# undef _WIN32_WINNT
-# define _WIN32_WINNT 0x500
+# define _WIN32_WINNT _WIN32_WINNT_WIN2K
/* Get declarations of the native Windows API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
/* Get _get_osfhandle. */
-# include "msvc-nothrow.h"
+# if GNULIB_MSVC_NOTHROW
+# include "msvc-nothrow.h"
+# else
+# include <io.h>
+# endif
static BOOL
SetFileSize (HANDLE h, LONGLONG size)
@@ -175,13 +179,14 @@ chsize_nothrow (int fd, long length)
return result;
}
-# define chsize chsize_nothrow
+# else
+# define chsize_nothrow chsize
# endif
int
ftruncate (int fd, off_t length)
{
- return chsize (fd, length);
+ return chsize_nothrow (fd, length);
}
# endif
diff --git a/gnulib-tests/getcwd-lgpl.c b/gnulib-tests/getcwd-lgpl.c
index c553f7b..34603c1 100644
--- a/gnulib-tests/getcwd-lgpl.c
+++ b/gnulib-tests/getcwd-lgpl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
This file is part of gnulib.
This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/getpagesize.c b/gnulib-tests/getpagesize.c
index dc4a200..9e91315 100644
--- a/gnulib-tests/getpagesize.c
+++ b/gnulib-tests/getpagesize.c
@@ -1,6 +1,6 @@
/* getpagesize emulation for systems where it cannot be done in a C macro.
- Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2017 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
diff --git a/gnulib-tests/gnulib.mk b/gnulib-tests/gnulib.mk
index 76bf8d1..73326aa 100644
--- a/gnulib-tests/gnulib.mk
+++ b/gnulib-tests/gnulib.mk
@@ -1,6 +1,6 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2002-2016 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -30,6 +30,7 @@ XFAIL_TESTS =
TESTS_ENVIRONMENT =
noinst_PROGRAMS =
check_PROGRAMS =
+EXTRA_PROGRAMS =
noinst_HEADERS =
noinst_LIBRARIES =
check_LIBRARIES = libtests.a
@@ -478,12 +479,21 @@ EXTRA_DIST += test-getdtablesize.c signature.h macros.h
## end gnulib module getdtablesize-tests
+## begin gnulib module getopt-gnu-tests
+
+TESTS += test-getopt-gnu
+check_PROGRAMS += test-getopt-gnu
+test_getopt_gnu_LDADD = $(LDADD) $(LIBINTL)
+EXTRA_DIST += macros.h signature.h test-getopt-gnu.c test-getopt-main.h test-getopt.h test-getopt_long.h
+
+## end gnulib module getopt-gnu-tests
+
## begin gnulib module getopt-posix-tests
-TESTS += test-getopt
-check_PROGRAMS += test-getopt
-test_getopt_LDADD = $(LDADD) $(LIBINTL)
-EXTRA_DIST += macros.h signature.h test-getopt.c test-getopt.h test-getopt_long.h
+TESTS += test-getopt-posix
+check_PROGRAMS += test-getopt-posix
+test_getopt_posix_LDADD = $(LDADD) $(LIBINTL)
+EXTRA_DIST += macros.h signature.h test-getopt-posix.c test-getopt-main.h test-getopt.h
## end gnulib module getopt-posix-tests
@@ -496,6 +506,16 @@ EXTRA_libtests_a_SOURCES += getpagesize.c
## end gnulib module getpagesize
+## begin gnulib module getprogname-tests
+
+DEFS += -DEXEEXT=\"@EXEEXT@\"
+TESTS += test-getprogname
+check_PROGRAMS += test-getprogname
+test_getprogname_LDADD = $(LDADD)
+EXTRA_DIST += test-getprogname.c
+
+## end gnulib module getprogname-tests
+
## begin gnulib module gettimeofday-tests
TESTS += test-gettimeofday
@@ -628,6 +648,14 @@ EXTRA_DIST += test-langinfo.c
## end gnulib module langinfo-tests
+## begin gnulib module limits-h-tests
+
+TESTS += test-limits-h
+check_PROGRAMS += test-limits-h
+EXTRA_DIST += test-limits-h.c
+
+## end gnulib module limits-h-tests
+
## begin gnulib module listen
@@ -1044,106 +1072,60 @@ EXTRA_DIST += test-sleep.c signature.h macros.h
## begin gnulib module snippet/_Noreturn
# Because this Makefile snippet defines a variable used by other
-# gnulib Makefile snippets, it must be present in all Makefile.am that
+# gnulib Makefile snippets, it must be present in all makefiles that
# need it. This is ensured by the applicability 'all' defined above.
-_NORETURN_H=$(top_srcdir)/build-aux/snippet/_Noreturn.h
+_NORETURN_H=$(srcdir)/_Noreturn.h
-EXTRA_DIST += $(top_srcdir)/build-aux/snippet/_Noreturn.h
+EXTRA_DIST += _Noreturn.h
## end gnulib module snippet/_Noreturn
## begin gnulib module snippet/arg-nonnull
-# The BUILT_SOURCES created by this Makefile snippet are not used via #include
-# statements but through direct file reference. Therefore this snippet must be
-# present in all Makefile.am that need it. This is ensured by the applicability
-# 'all' defined above.
-
-BUILT_SOURCES += arg-nonnull.h
-# The arg-nonnull.h that gets inserted into generated .h files is the same as
-# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut
-# off.
-arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/GL_ARG_NONNULL/,$$p' \
- < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \
- > $@-t && \
- mv $@-t $@
-MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
+# Because this Makefile snippet defines a variable used by other
+# gnulib Makefile snippets, it must be present in all makefiles that
+# need it. This is ensured by the applicability 'all' defined above.
-ARG_NONNULL_H=arg-nonnull.h
+ARG_NONNULL_H=$(srcdir)/arg-nonnull.h
-EXTRA_DIST += $(top_srcdir)/build-aux/snippet/arg-nonnull.h
+EXTRA_DIST += arg-nonnull.h
## end gnulib module snippet/arg-nonnull
## begin gnulib module snippet/c++defs
-# The BUILT_SOURCES created by this Makefile snippet are not used via #include
-# statements but through direct file reference. Therefore this snippet must be
-# present in all Makefile.am that need it. This is ensured by the applicability
-# 'all' defined above.
-
-BUILT_SOURCES += c++defs.h
-# The c++defs.h that gets inserted into generated .h files is the same as
-# build-aux/snippet/c++defs.h, except that it has the copyright header cut off.
-c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/_GL_CXXDEFS/,$$p' \
- < $(top_srcdir)/build-aux/snippet/c++defs.h \
- > $@-t && \
- mv $@-t $@
-MOSTLYCLEANFILES += c++defs.h c++defs.h-t
+# Because this Makefile snippet defines a variable used by other
+# gnulib Makefile snippets, it must be present in all makefiles that
+# need it. This is ensured by the applicability 'all' defined above.
-CXXDEFS_H=c++defs.h
+CXXDEFS_H=$(srcdir)/c++defs.h
-EXTRA_DIST += $(top_srcdir)/build-aux/snippet/c++defs.h
+EXTRA_DIST += c++defs.h
## end gnulib module snippet/c++defs
## begin gnulib module snippet/unused-parameter
-# The BUILT_SOURCES created by this Makefile snippet are not used via #include
-# statements but through direct file reference. Therefore this snippet must be
-# present in all Makefile.am that need it. This is ensured by the applicability
-# 'all' defined above.
-
-BUILT_SOURCES += unused-parameter.h
-# The unused-parameter.h that gets inserted into generated .h files is the same
-# as build-aux/snippet/unused-parameter.h, except that it has the copyright
-# header cut off.
-unused-parameter.h: $(top_srcdir)/build-aux/snippet/unused-parameter.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \
- < $(top_srcdir)/build-aux/snippet/unused-parameter.h \
- > $@-t && \
- mv $@-t $@
-MOSTLYCLEANFILES += unused-parameter.h unused-parameter.h-t
+# Because this Makefile snippet defines a variable used by other
+# gnulib Makefile snippets, it must be present in all makefiles that
+# need it. This is ensured by the applicability 'all' defined above.
-UNUSED_PARAMETER_H=unused-parameter.h
+UNUSED_PARAMETER_H=$(srcdir)/unused-parameter.h
-EXTRA_DIST += $(top_srcdir)/build-aux/snippet/unused-parameter.h
+EXTRA_DIST += unused-parameter.h
## end gnulib module snippet/unused-parameter
## begin gnulib module snippet/warn-on-use
-BUILT_SOURCES += warn-on-use.h
-# The warn-on-use.h that gets inserted into generated .h files is the same as
-# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut
-# off.
-warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/^.ifndef/,$$p' \
- < $(top_srcdir)/build-aux/snippet/warn-on-use.h \
- > $@-t && \
- mv $@-t $@
-MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
+# Because this Makefile snippet defines a variable used by other
+# gnulib Makefile snippets, it must be present in all makefiles that
+# need it. This is ensured by the applicability 'all' defined above.
-WARN_ON_USE_H=warn-on-use.h
+WARN_ON_USE_H=$(srcdir)/warn-on-use.h
-EXTRA_DIST += $(top_srcdir)/build-aux/snippet/warn-on-use.h
+EXTRA_DIST += warn-on-use.h
## end gnulib module snippet/warn-on-use
@@ -1712,12 +1694,15 @@ EXTRA_DIST += test-vc-list-files-git.sh test-vc-list-files-cvs.sh
TESTS_ENVIRONMENT += MAKE='$(MAKE)'
TESTS += test-verify test-verify.sh
check_PROGRAMS += test-verify
+# test-verify-try is never built, but test-verify.sh needs a rule to
+# build test-verify-try.o.
+EXTRA_PROGRAMS += test-verify-try
-# This test expects compilation of test-verify.c to fail, and
+# This test expects compilation of test-verify-try.c to fail, and
# each time it fails, the makefile rule does not perform the usual
# "mv -f $name.Tpo $name.po, so tell make clean to remove that file.
-MOSTLYCLEANFILES += .deps/test-verify.Tpo
-EXTRA_DIST += test-verify.c test-verify.sh
+MOSTLYCLEANFILES += .deps/test-verify-try.Tpo
+EXTRA_DIST += test-verify.c test-verify-try.c test-verify.sh
## end gnulib module verify-tests
@@ -1785,7 +1770,6 @@ EXTRA_DIST += test-wctype-h.c macros.h
TESTS += test-wcwidth
check_PROGRAMS += test-wcwidth
-
EXTRA_DIST += test-wcwidth.c signature.h macros.h
## end gnulib module wcwidth-tests
diff --git a/gnulib-tests/hash-pjw.c b/gnulib-tests/hash-pjw.c
index 7796238..a886b49 100644
--- a/gnulib-tests/hash-pjw.c
+++ b/gnulib-tests/hash-pjw.c
@@ -1,6 +1,6 @@
/* hash-pjw.c -- compute a hash value from a NUL-terminated string.
- Copyright (C) 2001, 2003, 2006, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2006, 2009-2017 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
diff --git a/gnulib-tests/hash-pjw.h b/gnulib-tests/hash-pjw.h
index ae537d1..2e7d230 100644
--- a/gnulib-tests/hash-pjw.h
+++ b/gnulib-tests/hash-pjw.h
@@ -1,5 +1,5 @@
/* hash-pjw.h -- declaration for a simple hash function
- Copyright (C) 2001, 2003, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2009-2017 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
diff --git a/gnulib-tests/inet_pton.c b/gnulib-tests/inet_pton.c
index 3cddfb1..f730d84 100644
--- a/gnulib-tests/inet_pton.c
+++ b/gnulib-tests/inet_pton.c
@@ -1,6 +1,6 @@
/* inet_pton.c -- convert IPv4 and IPv6 addresses from text to binary form
- Copyright (C) 2006, 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008-2017 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
diff --git a/gnulib-tests/init.sh b/gnulib-tests/init.sh
index 09b0739..584194f 100644
--- a/gnulib-tests/init.sh
+++ b/gnulib-tests/init.sh
@@ -1,6 +1,6 @@
# source this file; set up for tests
-# Copyright (C) 2009-2016 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -45,6 +45,9 @@
# Running a single test, with verbose output:
# $ make check TESTS=test-foo.sh VERBOSE=yes
#
+# Running a single test, keeping the temporary directory:
+# $ make check TESTS=test-foo.sh KEEP=yes
+#
# Running a single test, with single-stepping:
# 1. Go into a sub-shell:
# $ bash
@@ -295,50 +298,24 @@ compare_dev_null_ ()
return 2
}
-if diff_out_=`exec 2>/dev/null; diff -u "$0" "$0" < /dev/null` \
- && diff -u Makefile "$0" 2>/dev/null | grep '^[+]#!' >/dev/null; then
- # diff accepts the -u option and does not (like AIX 7 'diff') produce an
- # extra space on column 1 of every content line.
- if test -z "$diff_out_"; then
- compare_ () { diff -u "$@"; }
- else
- compare_ ()
- {
- if diff -u "$@" > diff.out; then
- # No differences were found, but Solaris 'diff' produces output
- # "No differences encountered". Hide this output.
- rm -f diff.out
- true
- else
- cat diff.out
- rm -f diff.out
- false
- fi
- }
- fi
-elif
- for diff_opt_ in -U3 -c '' no; do
- test "$diff_opt_" = no && break
- diff_out_=`exec 2>/dev/null; diff $diff_opt_ "$0" "$0" </dev/null` && break
- done
- test "$diff_opt_" != no
-then
+for diff_opt_ in -u -U3 -c '' no; do
+ test "$diff_opt_" != no &&
+ diff_out_=`exec 2>/dev/null; diff $diff_opt_ "$0" "$0" < /dev/null` &&
+ break
+done
+if test "$diff_opt_" != no; then
if test -z "$diff_out_"; then
compare_ () { diff $diff_opt_ "$@"; }
else
compare_ ()
{
- if diff $diff_opt_ "$@" > diff.out; then
- # No differences were found, but AIX and HP-UX 'diff' produce output
- # "No differences encountered" or "There are no differences between the
- # files.". Hide this output.
- rm -f diff.out
- true
- else
- cat diff.out
- rm -f diff.out
- false
- fi
+ # If no differences were found, AIX and HP-UX 'diff' produce output
+ # like "No differences encountered". Hide this output.
+ diff $diff_opt_ "$@" > diff.out
+ diff_status_=$?
+ test $diff_status_ -eq 0 || cat diff.out || diff_status_=2
+ rm -f diff.out || diff_status_=2
+ return $diff_status_
}
fi
elif cmp -s /dev/null /dev/null 2>/dev/null; then
@@ -375,11 +352,15 @@ remove_tmp_ ()
{
__st=$?
cleanup_
- # cd out of the directory we're about to remove
- cd "$initial_cwd_" || cd / || cd /tmp
- chmod -R u+rwx "$test_dir_"
- # If removal fails and exit status was to be 0, then change it to 1.
- rm -rf "$test_dir_" || { test $__st = 0 && __st=1; }
+ if test "$KEEP" = yes; then
+ echo "Not removing temporary directory $test_dir_"
+ else
+ # cd out of the directory we're about to remove
+ cd "$initial_cwd_" || cd / || cd /tmp
+ chmod -R u+rwx "$test_dir_"
+ # If removal fails and exit status was to be 0, then change it to 1.
+ rm -rf "$test_dir_" || { test $__st = 0 && __st=1; }
+ fi
exit $__st
}
diff --git a/gnulib-tests/ioctl.c b/gnulib-tests/ioctl.c
index bd3a198..f142558 100644
--- a/gnulib-tests/ioctl.c
+++ b/gnulib-tests/ioctl.c
@@ -1,6 +1,6 @@
/* ioctl.c --- wrappers for Windows ioctl function
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
@@ -52,7 +52,11 @@ rpl_ioctl (int fd, int request, ... /* {void *,char *} arg */)
# include "fd-hook.h"
/* Get _get_osfhandle. */
-# include "msvc-nothrow.h"
+# if GNULIB_MSVC_NOTHROW
+# include "msvc-nothrow.h"
+# else
+# include <io.h>
+# endif
static int
primary_ioctl (int fd, int request, void *arg)
diff --git a/gnulib-tests/listen.c b/gnulib-tests/listen.c
index fd59f75..81936f0 100644
--- a/gnulib-tests/listen.c
+++ b/gnulib-tests/listen.c
@@ -1,6 +1,6 @@
/* listen.c --- wrappers for Windows listen function
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
diff --git a/gnulib-tests/macros.h b/gnulib-tests/macros.h
index 578bfe7..0423d06 100644
--- a/gnulib-tests/macros.h
+++ b/gnulib-tests/macros.h
@@ -1,5 +1,5 @@
/* Common macros used by gnulib tests.
- Copyright (C) 2006-2016 Free Software Foundation, Inc.
+ Copyright (C) 2006-2017 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
@@ -21,6 +21,14 @@
#include <stdio.h>
#include <stdlib.h>
+#ifndef FALLTHROUGH
+# if __GNUC__ < 7
+# define FALLTHROUGH ((void) 0)
+# else
+# define FALLTHROUGH __attribute__ ((__fallthrough__))
+# endif
+#endif
+
/* Define ASSERT_STREAM before including this file if ASSERT must
target a stream other than stderr. */
#ifndef ASSERT_STREAM
diff --git a/gnulib-tests/nanosleep.c b/gnulib-tests/nanosleep.c
index a3116c2..4f65802 100644
--- a/gnulib-tests/nanosleep.c
+++ b/gnulib-tests/nanosleep.c
@@ -1,6 +1,6 @@
/* Provide a replacement for the POSIX nanosleep function.
- Copyright (C) 1999-2000, 2002, 2004-2016 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2002, 2004-2017 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
diff --git a/gnulib-tests/nap.h b/gnulib-tests/nap.h
index 6d46a36..a49befc 100644
--- a/gnulib-tests/nap.h
+++ b/gnulib-tests/nap.h
@@ -1,5 +1,5 @@
/* Assist in file system timestamp tests.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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 <limits.h>
# include <stdbool.h>
+/* Name of the witness file. */
+#define TEMPFILE BASE "nap.tmp"
+
/* File descriptor used for the witness file. */
static int nap_fd = -1;
@@ -48,36 +51,46 @@ diff_timespec (struct timespec a, struct timespec b)
return INT_MAX;
}
+/* If DO_WRITE, bump the modification time of the file designated by NAP_FD.
+ Then fetch the new STAT information of NAP_FD. */
static void
-get_stat (int fd, struct stat *st, int do_write)
+nap_get_stat (struct stat *st, int do_write)
{
if (do_write)
- ASSERT (write (fd, "\n", 1) == 1);
- ASSERT (fstat (fd, st) == 0);
+ {
+ ASSERT (write (nap_fd, "\n", 1) == 1);
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* On native Windows, the modification times are not changed until NAP_FD
+ is closed. See
+ https://msdn.microsoft.com/en-us/library/windows/desktop/aa365747(v=vs.85).aspx */
+ close (nap_fd);
+ nap_fd = open (TEMPFILE, O_RDWR, 0600);
+ ASSERT (nap_fd != -1);
+ lseek (nap_fd, 0, SEEK_END);
+#endif
+ }
+ ASSERT (fstat (nap_fd, st) == 0);
}
/* Given a file whose descriptor is FD, see whether delaying by DELAY
- nanoseconds causes a change in a file's ctime and mtime.
+ nanoseconds causes a change in a file's mtime.
OLD_ST is the file's status, recently gotten. */
static bool
-nap_works (int fd, int delay, struct stat old_st)
+nap_works (int delay, struct stat old_st)
{
struct stat st;
struct timespec delay_spec;
delay_spec.tv_sec = delay / 1000000000;
delay_spec.tv_nsec = delay % 1000000000;
ASSERT (nanosleep (&delay_spec, 0) == 0);
- get_stat (fd, &st, 1);
+ nap_get_stat (&st, 1);
- if ( diff_timespec (get_stat_ctime (&st), get_stat_ctime (&old_st))
- && diff_timespec (get_stat_mtime (&st), get_stat_mtime (&old_st)))
+ if (diff_timespec (get_stat_mtime (&st), get_stat_mtime (&old_st)))
return true;
return false;
}
-#define TEMPFILE BASE "nap.tmp"
-
static void
clear_temp_file (void)
{
@@ -105,21 +118,30 @@ nap (void)
{
atexit (clear_temp_file);
ASSERT ((nap_fd = creat (TEMPFILE, 0600)) != -1);
- get_stat (nap_fd, &old_st, 0);
+ nap_get_stat (&old_st, 0);
}
else
{
ASSERT (0 <= nap_fd);
- get_stat (nap_fd, &old_st, 1);
+ nap_get_stat (&old_st, 1);
}
if (1 < delay)
delay = delay / 2; /* Try half of the previous delay. */
ASSERT (0 < delay);
- for ( ; delay <= 2147483647; delay = delay * 2)
- if (nap_works (nap_fd, delay, old_st))
- return;
+ for (;;)
+ {
+ if (nap_works (delay, old_st))
+ return;
+ if (delay <= (2147483647 - 1) / 2)
+ {
+ delay = delay * 2 + 1;
+ continue;
+ }
+ else
+ break;
+ }
/* Bummer: even the highest nap delay didn't work. */
ASSERT (0);
diff --git a/gnulib-tests/netinet_in.in.h b/gnulib-tests/netinet_in.in.h
index 54e1ec0..9411b9f 100644
--- a/gnulib-tests/netinet_in.in.h
+++ b/gnulib-tests/netinet_in.in.h
@@ -1,5 +1,5 @@
/* Substitute for <netinet/in.h>.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
diff --git a/gnulib-tests/perror.c b/gnulib-tests/perror.c
index 09dafb6..6f1e744 100644
--- a/gnulib-tests/perror.c
+++ b/gnulib-tests/perror.c
@@ -1,5 +1,5 @@
/* Print a message describing error code.
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 Free Software Foundation, Inc.
Written by Bruno Haible and Simon Josefsson.
This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/pipe.c b/gnulib-tests/pipe.c
index cc8e184..2a6e38f 100644
--- a/gnulib-tests/pipe.c
+++ b/gnulib-tests/pipe.c
@@ -1,5 +1,5 @@
/* Create a pipe.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gnulib-tests/putenv.c b/gnulib-tests/putenv.c
index e67712d..b55e262 100644
--- a/gnulib-tests/putenv.c
+++ b/gnulib-tests/putenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2016 Free Software
+/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2017 Free Software
Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C
diff --git a/gnulib-tests/same-inode.h b/gnulib-tests/same-inode.h
index bf45635..a08bc4e 100644
--- a/gnulib-tests/same-inode.h
+++ b/gnulib-tests/same-inode.h
@@ -1,6 +1,6 @@
-/* Determine whether two stat buffers refer to the same file.
+/* Determine whether two stat buffers are known to refer to the same file.
- Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2017 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,12 +18,26 @@
#ifndef SAME_INODE_H
# define SAME_INODE_H 1
+# include <sys/types.h>
+
# ifdef __VMS
# define SAME_INODE(a, b) \
((a).st_ino[0] == (b).st_ino[0] \
&& (a).st_ino[1] == (b).st_ino[1] \
&& (a).st_ino[2] == (b).st_ino[2] \
&& (a).st_dev == (b).st_dev)
+# elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* Native Windows. */
+# if _GL_WINDOWS_STAT_INODES
+ /* stat() and fstat() set st_dev and st_ino to 0 if information about
+ the inode is not available. */
+# define SAME_INODE(a, b) \
+ (!((a).st_ino == 0 && (a).st_dev == 0) \
+ && (a).st_ino == (b).st_ino && (a).st_dev == (b).st_dev)
+# else
+ /* stat() and fstat() set st_ino to 0 always. */
+# define SAME_INODE(a, b) 0
+# endif
# else
# define SAME_INODE(a, b) \
((a).st_ino == (b).st_ino \
diff --git a/gnulib-tests/select.c b/gnulib-tests/select.c
index 73abcf3..cba802d 100644
--- a/gnulib-tests/select.c
+++ b/gnulib-tests/select.c
@@ -1,7 +1,7 @@
/* Emulation for select(2)
Contributed by Paolo Bonzini.
- Copyright 2008-2016 Free Software Foundation, Inc.
+ Copyright 2008-2017 Free Software Foundation, Inc.
This file is part of gnulib.
@@ -39,7 +39,11 @@
/* Get the overridden 'struct timeval'. */
#include <sys/time.h>
-#include "msvc-nothrow.h"
+#if GNULIB_MSVC_NOTHROW
+# include "msvc-nothrow.h"
+#else
+# include <io.h>
+#endif
#undef select
diff --git a/gnulib-tests/setlocale.c b/gnulib-tests/setlocale.c
index 7d366ed..d2f203e 100644
--- a/gnulib-tests/setlocale.c
+++ b/gnulib-tests/setlocale.c
@@ -1,5 +1,5 @@
/* Set the current locale. -*- coding: utf-8 -*-
- Copyright (C) 2009, 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2011-2017 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
@@ -633,6 +633,13 @@ setlocale_unixlike (int category, const char *locale)
char ll_buf[64];
char CC_buf[64];
+ /* The native Windows implementation of setlocale understands the special
+ locale name "C", but not "POSIX". Therefore map "POSIX" to "C". */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+ if (locale != NULL && strcmp (locale, "POSIX") == 0)
+ locale = "C";
+#endif
+
/* First, try setlocale with the original argument unchanged. */
result = setlocale (category, locale);
if (result != NULL)
diff --git a/gnulib-tests/setsockopt.c b/gnulib-tests/setsockopt.c
index af09f32..157e4b6 100644
--- a/gnulib-tests/setsockopt.c
+++ b/gnulib-tests/setsockopt.c
@@ -1,6 +1,6 @@
/* setsockopt.c --- wrappers for Windows setsockopt function
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
diff --git a/gnulib-tests/signature.h b/gnulib-tests/signature.h
index 2df8067..0fdfc11 100644
--- a/gnulib-tests/signature.h
+++ b/gnulib-tests/signature.h
@@ -1,5 +1,5 @@
/* Macro for checking that a function declaration is compliant.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gnulib-tests/sleep.c b/gnulib-tests/sleep.c
index 997285e..8a8fe7c 100644
--- a/gnulib-tests/sleep.c
+++ b/gnulib-tests/sleep.c
@@ -1,5 +1,5 @@
/* Pausing execution of the current thread.
- Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/snprintf.c b/gnulib-tests/snprintf.c
index 7cd89af..d66302f 100644
--- a/gnulib-tests/snprintf.c
+++ b/gnulib-tests/snprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 2004, 2006-2016 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006-2017 Free Software Foundation, Inc.
Written by Simon Josefsson and Paul Eggert.
This program is free software; you can redistribute it and/or modify
diff --git a/gnulib-tests/socket.c b/gnulib-tests/socket.c
index 4ccec4b..47aa557 100644
--- a/gnulib-tests/socket.c
+++ b/gnulib-tests/socket.c
@@ -1,6 +1,6 @@
/* socket.c --- wrappers for Windows socket function
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
diff --git a/gnulib-tests/sockets.c b/gnulib-tests/sockets.c
index abfab02..028e20e 100644
--- a/gnulib-tests/sockets.c
+++ b/gnulib-tests/sockets.c
@@ -1,6 +1,6 @@
/* sockets.c --- wrappers for Windows socket functions
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
@@ -28,7 +28,11 @@
# include <sys/socket.h>
# include "fd-hook.h"
-# include "msvc-nothrow.h"
+# if GNULIB_MSVC_NOTHROW
+# include "msvc-nothrow.h"
+# else
+# include <io.h>
+# endif
/* Get set_winsock_errno, FD_TO_SOCKET etc. */
# include "w32sock.h"
diff --git a/gnulib-tests/sockets.h b/gnulib-tests/sockets.h
index 01a68d0..23ad74d 100644
--- a/gnulib-tests/sockets.h
+++ b/gnulib-tests/sockets.h
@@ -1,6 +1,6 @@
/* sockets.h - wrappers for Windows socket functions
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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,7 +18,7 @@
/* Written by Simon Josefsson */
#ifndef SOCKETS_H
-# define SOCKETS_H 1
+#define SOCKETS_H 1
#define SOCKETS_1_0 0x0001
#define SOCKETS_1_1 0x0101
@@ -27,13 +27,13 @@
#define SOCKETS_2_2 0x0202
int gl_sockets_startup (int version)
-#if !WINDOWS_SOCKETS
+#ifndef WINDOWS_SOCKETS
_GL_ATTRIBUTE_CONST
#endif
;
int gl_sockets_cleanup (void)
-#if !WINDOWS_SOCKETS
+#ifndef WINDOWS_SOCKETS
_GL_ATTRIBUTE_CONST
#endif
;
@@ -41,11 +41,15 @@ int gl_sockets_cleanup (void)
/* This function is useful it you create a socket using gnulib's
Winsock wrappers but needs to pass on the socket handle to some
other library that only accepts sockets. */
-#if WINDOWS_SOCKETS
+#ifdef WINDOWS_SOCKETS
-#include <sys/socket.h>
+# include <sys/socket.h>
-#include "msvc-nothrow.h"
+# if GNULIB_MSVC_NOTHROW
+# include "msvc-nothrow.h"
+# else
+# include <io.h>
+# endif
static inline SOCKET
gl_fd_to_handle (int fd)
@@ -55,7 +59,7 @@ gl_fd_to_handle (int fd)
#else
-#define gl_fd_to_handle(x) (x)
+# define gl_fd_to_handle(x) (x)
#endif /* WINDOWS_SOCKETS */
diff --git a/gnulib-tests/stdalign.in.h b/gnulib-tests/stdalign.in.h
index 12f8a15..ea24823 100644
--- a/gnulib-tests/stdalign.in.h
+++ b/gnulib-tests/stdalign.in.h
@@ -1,6 +1,6 @@
/* A substitute for ISO C11 <stdalign.h>.
- Copyright 2011-2016 Free Software Foundation, Inc.
+ Copyright 2011-2017 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
@@ -103,7 +103,7 @@
# elif ((defined __APPLE__ && defined __MACH__ \
? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
: __GNUC__) \
- || 061200 <= __HP_cc || 061200 <= __HP_aCC \
+ || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
|| __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__)
# define _Alignas(a) __attribute__ ((__aligned__ (a)))
# elif 1300 <= _MSC_VER
diff --git a/gnulib-tests/strerror_r.c b/gnulib-tests/strerror_r.c
index 07a00cf..650751f 100644
--- a/gnulib-tests/strerror_r.c
+++ b/gnulib-tests/strerror_r.c
@@ -1,6 +1,6 @@
/* strerror_r.c --- POSIX compatible system error routine
- Copyright (C) 2010-2016 Free Software Foundation, Inc.
+ Copyright (C) 2010-2017 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
@@ -28,6 +28,9 @@
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
+#if !HAVE_SNPRINTF
+# include <stdarg.h>
+#endif
#include "strerror-override.h"
@@ -329,6 +332,115 @@ strerror_r (int errnum, char *buf, size_t buflen)
#endif
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+ /* MSVC 14 defines names for many error codes in the range 100..140,
+ but _sys_errlist contains strings only for the error codes
+ < _sys_nerr = 43. */
+ if (ret == EINVAL)
+ {
+ const char *errmsg;
+
+ switch (errnum)
+ {
+ case 100 /* EADDRINUSE */:
+ errmsg = "Address already in use";
+ break;
+ case 101 /* EADDRNOTAVAIL */:
+ errmsg = "Cannot assign requested address";
+ break;
+ case 102 /* EAFNOSUPPORT */:
+ errmsg = "Address family not supported by protocol";
+ break;
+ case 103 /* EALREADY */:
+ errmsg = "Operation already in progress";
+ break;
+ case 105 /* ECANCELED */:
+ errmsg = "Operation canceled";
+ break;
+ case 106 /* ECONNABORTED */:
+ errmsg = "Software caused connection abort";
+ break;
+ case 107 /* ECONNREFUSED */:
+ errmsg = "Connection refused";
+ break;
+ case 108 /* ECONNRESET */:
+ errmsg = "Connection reset by peer";
+ break;
+ case 109 /* EDESTADDRREQ */:
+ errmsg = "Destination address required";
+ break;
+ case 110 /* EHOSTUNREACH */:
+ errmsg = "No route to host";
+ break;
+ case 112 /* EINPROGRESS */:
+ errmsg = "Operation now in progress";
+ break;
+ case 113 /* EISCONN */:
+ errmsg = "Transport endpoint is already connected";
+ break;
+ case 114 /* ELOOP */:
+ errmsg = "Too many levels of symbolic links";
+ break;
+ case 115 /* EMSGSIZE */:
+ errmsg = "Message too long";
+ break;
+ case 116 /* ENETDOWN */:
+ errmsg = "Network is down";
+ break;
+ case 117 /* ENETRESET */:
+ errmsg = "Network dropped connection on reset";
+ break;
+ case 118 /* ENETUNREACH */:
+ errmsg = "Network is unreachable";
+ break;
+ case 119 /* ENOBUFS */:
+ errmsg = "No buffer space available";
+ break;
+ case 123 /* ENOPROTOOPT */:
+ errmsg = "Protocol not available";
+ break;
+ case 126 /* ENOTCONN */:
+ errmsg = "Transport endpoint is not connected";
+ break;
+ case 128 /* ENOTSOCK */:
+ errmsg = "Socket operation on non-socket";
+ break;
+ case 129 /* ENOTSUP */:
+ errmsg = "Not supported";
+ break;
+ case 130 /* EOPNOTSUPP */:
+ errmsg = "Operation not supported";
+ break;
+ case 132 /* EOVERFLOW */:
+ errmsg = "Value too large for defined data type";
+ break;
+ case 133 /* EOWNERDEAD */:
+ errmsg = "Owner died";
+ break;
+ case 134 /* EPROTO */:
+ errmsg = "Protocol error";
+ break;
+ case 135 /* EPROTONOSUPPORT */:
+ errmsg = "Protocol not supported";
+ break;
+ case 136 /* EPROTOTYPE */:
+ errmsg = "Protocol wrong type for socket";
+ break;
+ case 138 /* ETIMEDOUT */:
+ errmsg = "Connection timed out";
+ break;
+ case 140 /* EWOULDBLOCK */:
+ errmsg = "Operation would block";
+ break;
+ default:
+ errmsg = NULL;
+ break;
+ }
+ if (errmsg != NULL)
+ ret = safe_copy (buf, buflen, errmsg);
+ }
+#endif
+
if (ret == EINVAL && !*buf)
snprintf (buf, buflen, "Unknown error %d", errnum);
diff --git a/gnulib-tests/symlink.c b/gnulib-tests/symlink.c
index d8684b6..60d4c14 100644
--- a/gnulib-tests/symlink.c
+++ b/gnulib-tests/symlink.c
@@ -1,5 +1,5 @@
/* Stub for symlink().
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gnulib-tests/sys_ioctl.in.h b/gnulib-tests/sys_ioctl.in.h
index a07dc97..7d410cd 100644
--- a/gnulib-tests/sys_ioctl.in.h
+++ b/gnulib-tests/sys_ioctl.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <sys/ioctl.h>.
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
diff --git a/gnulib-tests/sys_select.in.h b/gnulib-tests/sys_select.in.h
index 9a2622f..616e77d 100644
--- a/gnulib-tests/sys_select.in.h
+++ b/gnulib-tests/sys_select.in.h
@@ -1,5 +1,5 @@
/* Substitute for <sys/select.h>.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
diff --git a/gnulib-tests/sys_socket.in.h b/gnulib-tests/sys_socket.in.h
index a627dd4..cf4f7bc 100644
--- a/gnulib-tests/sys_socket.in.h
+++ b/gnulib-tests/sys_socket.in.h
@@ -1,6 +1,6 @@
/* Provide a sys/socket header file for systems lacking it (read: MinGW)
and for systems where it is incomplete.
- Copyright (C) 2005-2016 Free Software Foundation, Inc.
+ Copyright (C) 2005-2017 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
@@ -79,7 +79,12 @@ _GL_INLINE_HEADER_BEGIN
#if !@HAVE_SA_FAMILY_T@
# if !GNULIB_defined_sa_family_t
+/* On OS/2 kLIBC, sa_family_t is unsigned char unless TCPV40HDRS is defined. */
+# if !defined __KLIBC__ || defined TCPV40HDRS
typedef unsigned short sa_family_t;
+# else
+typedef unsigned char sa_family_t;
+# endif
# define GNULIB_defined_sa_family_t 1
# endif
#endif
diff --git a/gnulib-tests/sys_uio.in.h b/gnulib-tests/sys_uio.in.h
index e70663f..d45d846 100644
--- a/gnulib-tests/sys_uio.in.h
+++ b/gnulib-tests/sys_uio.in.h
@@ -1,5 +1,5 @@
/* Substitute for <sys/uio.h>.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/test-accept.c b/gnulib-tests/test-accept.c
index 9d510a6..5e4081b 100644
--- a/gnulib-tests/test-accept.c
+++ b/gnulib-tests/test-accept.c
@@ -1,5 +1,5 @@
/* Test accepting a connection to a server socket.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/test-alloca-opt.c b/gnulib-tests/test-alloca-opt.c
index b9aaa4a..4c5b3bd 100644
--- a/gnulib-tests/test-alloca-opt.c
+++ b/gnulib-tests/test-alloca-opt.c
@@ -1,5 +1,5 @@
/* Test of optional automatic memory allocation.
- Copyright (C) 2005, 2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007, 2009-2017 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
diff --git a/gnulib-tests/test-areadlink.c b/gnulib-tests/test-areadlink.c
index 738a498..2a826c4 100644
--- a/gnulib-tests/test-areadlink.c
+++ b/gnulib-tests/test-areadlink.c
@@ -1,5 +1,5 @@
/* Tests of areadlink.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gnulib-tests/test-areadlink.h b/gnulib-tests/test-areadlink.h
index 3251ca2..efaf07b 100644
--- a/gnulib-tests/test-areadlink.h
+++ b/gnulib-tests/test-areadlink.h
@@ -1,5 +1,5 @@
/* Tests of areadlink and friends.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gnulib-tests/test-argmatch.c b/gnulib-tests/test-argmatch.c
index 9a3a4a9..5fe0df7 100644
--- a/gnulib-tests/test-argmatch.c
+++ b/gnulib-tests/test-argmatch.c
@@ -1,5 +1,5 @@
/* Test of exact or abbreviated match search.
- Copyright (C) 1990, 1998-1999, 2001-2016 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1998-1999, 2001-2017 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
@@ -23,7 +23,6 @@
#include <stdlib.h>
-#include "progname.h"
#include "macros.h"
/* Some packages define ARGMATCH_DIE and ARGMATCH_DIE_DECL in <config.h>, and
@@ -63,8 +62,6 @@ static const enum backup_type backup_vals[] =
int
main (int argc, char *argv[])
{
- set_program_name (argv[0]);
-
/* Not found. */
ASSERT (ARGMATCH ("klingon", backup_args, backup_vals) == -1);
diff --git a/gnulib-tests/test-arpa_inet.c b/gnulib-tests/test-arpa_inet.c
index 5fc6cdd..8e37a41 100644
--- a/gnulib-tests/test-arpa_inet.c
+++ b/gnulib-tests/test-arpa_inet.c
@@ -1,5 +1,5 @@
/* Test of <arpa/inet.h> substitute.
- Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2017 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
diff --git a/gnulib-tests/test-binary-io.c b/gnulib-tests/test-binary-io.c
index 6801e96..46ccce5 100644
--- a/gnulib-tests/test-binary-io.c
+++ b/gnulib-tests/test-binary-io.c
@@ -1,5 +1,5 @@
/* Test of binary mode I/O.
- Copyright (C) 2005, 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007-2017 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
@@ -55,12 +55,6 @@ main (int argc, char *argv[])
fputs ("Hello\n", stdout);
break;
- case '2':
- /* Test the SET_BINARY macro. */
- SET_BINARY (1);
- fputs ("Hello\n", stdout);
- break;
-
default:
break;
}
diff --git a/gnulib-tests/test-binary-io.sh b/gnulib-tests/test-binary-io.sh
index c4dd6e9..38af099 100755
--- a/gnulib-tests/test-binary-io.sh
+++ b/gnulib-tests/test-binary-io.sh
@@ -3,11 +3,9 @@
tmpfiles=""
trap 'rm -fr $tmpfiles' 1 2 3 15
-tmpfiles="$tmpfiles t-bin-out0.tmp t-bin-out1.tmp t-bin-out2.tmp"
+tmpfiles="$tmpfiles t-bin-out0.tmp t-bin-out1.tmp"
./test-binary-io${EXEEXT} 1 > t-bin-out1.tmp || exit 1
cmp t-bin-out0.tmp t-bin-out1.tmp > /dev/null || exit 1
-./test-binary-io${EXEEXT} 2 > t-bin-out2.tmp || exit 1
-cmp t-bin-out0.tmp t-bin-out2.tmp > /dev/null || exit 1
rm -fr $tmpfiles
diff --git a/gnulib-tests/test-bind.c b/gnulib-tests/test-bind.c
index 4885519..9ee4977 100644
--- a/gnulib-tests/test-bind.c
+++ b/gnulib-tests/test-bind.c
@@ -1,5 +1,5 @@
/* Test binding a server socket to a port.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/test-bitrotate.c b/gnulib-tests/test-bitrotate.c
index f3df469..c87e56c 100644
--- a/gnulib-tests/test-bitrotate.c
+++ b/gnulib-tests/test-bitrotate.c
@@ -1,5 +1,5 @@
/* Test of <bitrotate.h> substitute.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
diff --git a/gnulib-tests/test-btowc.c b/gnulib-tests/test-btowc.c
index 9953ac4..7d3a7b6 100644
--- a/gnulib-tests/test-btowc.c
+++ b/gnulib-tests/test-btowc.c
@@ -1,5 +1,5 @@
/* Test of conversion of unibyte character to wide character.
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
diff --git a/gnulib-tests/test-c-ctype.c b/gnulib-tests/test-c-ctype.c
index 184cdec..d978035 100644
--- a/gnulib-tests/test-c-ctype.c
+++ b/gnulib-tests/test-c-ctype.c
@@ -1,5 +1,5 @@
/* Test of character handling in C locale.
- Copyright (C) 2005, 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007-2017 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
diff --git a/gnulib-tests/test-c-stack.c b/gnulib-tests/test-c-stack.c
index 073f1c6..7da4e4f 100644
--- a/gnulib-tests/test-c-stack.c
+++ b/gnulib-tests/test-c-stack.c
@@ -1,5 +1,5 @@
/* Test of c-stack module.
- Copyright (C) 2002, 2004, 2006, 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2006, 2008-2017 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
@@ -30,8 +30,6 @@
#include "macros.h"
-char *program_name;
-
static volatile int *
recurse_1 (volatile int n, volatile int *p)
{
@@ -60,7 +58,6 @@ main (int argc, char **argv)
setrlimit (RLIMIT_STACK, &rl);
#endif
- program_name = argv[0];
if (c_stack_action (NULL) == 0)
{
if (1 < argc)
diff --git a/gnulib-tests/test-c-strcasecmp.c b/gnulib-tests/test-c-strcasecmp.c
index 37f9431..8eb5fd5 100644
--- a/gnulib-tests/test-c-strcasecmp.c
+++ b/gnulib-tests/test-c-strcasecmp.c
@@ -1,5 +1,5 @@
/* Test of case-insensitive string comparison function.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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,7 @@
#include <config.h>
#include "c-strcase.h"
+#include "c-ctype.h"
#include <locale.h>
#include <string.h>
@@ -57,9 +58,11 @@ main (int argc, char *argv[])
ASSERT (c_strcasecmp ("\303\266zg\303\274r", "\303\226ZG\303\234R") > 0); /* özgür */
ASSERT (c_strcasecmp ("\303\226ZG\303\234R", "\303\266zg\303\274r") < 0); /* özgür */
+#if C_CTYPE_ASCII
/* This test shows how strings of different size cannot compare equal. */
ASSERT (c_strcasecmp ("turkish", "TURK\304\260SH") < 0);
ASSERT (c_strcasecmp ("TURK\304\260SH", "turkish") > 0);
+#endif
return 0;
}
diff --git a/gnulib-tests/test-c-strncasecmp.c b/gnulib-tests/test-c-strncasecmp.c
index 1ca42d8..6aea06c 100644
--- a/gnulib-tests/test-c-strncasecmp.c
+++ b/gnulib-tests/test-c-strncasecmp.c
@@ -1,5 +1,5 @@
/* Test of case-insensitive string comparison function.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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,7 @@
#include <config.h>
#include "c-strcase.h"
+#include "c-ctype.h"
#include <locale.h>
#include <string.h>
@@ -71,9 +72,11 @@ main (int argc, char *argv[])
ASSERT (c_strncasecmp ("\303\266zg\303\274r", "\303\226ZG\303\234R", 99) > 0); /* özgür */
ASSERT (c_strncasecmp ("\303\226ZG\303\234R", "\303\266zg\303\274r", 99) < 0); /* özgür */
+#if C_CTYPE_ASCII
/* This test shows how strings of different size cannot compare equal. */
ASSERT (c_strncasecmp ("turkish", "TURK\304\260SH", 7) < 0);
ASSERT (c_strncasecmp ("TURK\304\260SH", "turkish", 7) > 0);
+#endif
return 0;
}
diff --git a/gnulib-tests/test-close.c b/gnulib-tests/test-close.c
index a0428e0..c8565aa 100644
--- a/gnulib-tests/test-close.c
+++ b/gnulib-tests/test-close.c
@@ -1,5 +1,5 @@
/* Test closing a file or socket.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/test-connect.c b/gnulib-tests/test-connect.c
index efe419e..46e2f7e 100644
--- a/gnulib-tests/test-connect.c
+++ b/gnulib-tests/test-connect.c
@@ -1,5 +1,5 @@
/* Test connecting a client socket.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/test-ctype.c b/gnulib-tests/test-ctype.c
index 570fbdb..66e1026 100644
--- a/gnulib-tests/test-ctype.c
+++ b/gnulib-tests/test-ctype.c
@@ -1,5 +1,5 @@
/* Test of <ctype.h> substitute.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gnulib-tests/test-dirname.c b/gnulib-tests/test-dirname.c
index b9b876a..bbd135e 100644
--- a/gnulib-tests/test-dirname.c
+++ b/gnulib-tests/test-dirname.c
@@ -1,5 +1,5 @@
/* Test the gnulib dirname module.
- Copyright (C) 2005-2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2017 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
diff --git a/gnulib-tests/test-dup2.c b/gnulib-tests/test-dup2.c
index 5da6812..f98486a 100644
--- a/gnulib-tests/test-dup2.c
+++ b/gnulib-tests/test-dup2.c
@@ -1,5 +1,5 @@
/* Test duplicating file descriptors.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
@@ -41,7 +41,11 @@ SIGNATURE_CHECK (dup2, int, (int, int));
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
/* Get _get_osfhandle. */
-# include "msvc-nothrow.h"
+# if GNULIB_MSVC_NOTHROW
+# include "msvc-nothrow.h"
+# else
+# include <io.h>
+# endif
#endif
#include "macros.h"
diff --git a/gnulib-tests/test-environ.c b/gnulib-tests/test-environ.c
index 0047246..97a268a 100644
--- a/gnulib-tests/test-environ.c
+++ b/gnulib-tests/test-environ.c
@@ -1,5 +1,5 @@
/* Test of environ variable.
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
diff --git a/gnulib-tests/test-errno.c b/gnulib-tests/test-errno.c
index 1e0bb6d..8accfda 100644
--- a/gnulib-tests/test-errno.c
+++ b/gnulib-tests/test-errno.c
@@ -1,5 +1,5 @@
/* Test of <errno.h> substitute.
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
diff --git a/gnulib-tests/test-exclude.c b/gnulib-tests/test-exclude.c
index 9b20ba5..cfeb647 100644
--- a/gnulib-tests/test-exclude.c
+++ b/gnulib-tests/test-exclude.c
@@ -1,5 +1,5 @@
/* Test suite for exclude.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 Free Software Foundation, Inc.
This file is part of the GNUlib Library.
This program is free software: you can redistribute it and/or modify
@@ -24,7 +24,6 @@
#include <fnmatch.h>
#include "exclude.h"
-#include "progname.h"
#include "error.h"
#include "argmatch.h"
@@ -75,8 +74,6 @@ main (int argc, char **argv)
int exclude_options = 0;
struct exclude *exclude = new_exclude ();
- set_program_name (argv[0]);
-
if (argc == 1)
error (1, 0, "usage: %s file -- words...", argv[0]);
@@ -125,5 +122,7 @@ main (int argc, char **argv)
printf ("%s: %d\n", word, excluded_file_name (exclude, word));
}
+
+ free_exclude (exclude);
return 0;
}
diff --git a/gnulib-tests/test-exclude1.sh b/gnulib-tests/test-exclude1.sh
index 6f6252e..fba7153 100755
--- a/gnulib-tests/test-exclude1.sh
+++ b/gnulib-tests/test-exclude1.sh
@@ -1,6 +1,6 @@
#! /bin/sh
# Test suite for exclude.
-# Copyright (C) 2009-2016 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-exclude2.sh b/gnulib-tests/test-exclude2.sh
index c488109..e626c62 100755
--- a/gnulib-tests/test-exclude2.sh
+++ b/gnulib-tests/test-exclude2.sh
@@ -1,6 +1,6 @@
#! /bin/sh
# Test suite for exclude.
-# Copyright (C) 2009-2016 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-exclude3.sh b/gnulib-tests/test-exclude3.sh
index c2376cc..38c8b64 100755
--- a/gnulib-tests/test-exclude3.sh
+++ b/gnulib-tests/test-exclude3.sh
@@ -1,6 +1,6 @@
#! /bin/sh
# Test suite for exclude.
-# Copyright (C) 2009-2016 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-exclude4.sh b/gnulib-tests/test-exclude4.sh
index 4c22db4..42fa633 100755
--- a/gnulib-tests/test-exclude4.sh
+++ b/gnulib-tests/test-exclude4.sh
@@ -1,6 +1,6 @@
#! /bin/sh
# Test suite for exclude.
-# Copyright (C) 2009-2016 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-exclude5.sh b/gnulib-tests/test-exclude5.sh
index ba53a43..7552179 100755
--- a/gnulib-tests/test-exclude5.sh
+++ b/gnulib-tests/test-exclude5.sh
@@ -1,6 +1,6 @@
#! /bin/sh
# Test suite for exclude.
-# Copyright (C) 2009-2016 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-exclude6.sh b/gnulib-tests/test-exclude6.sh
index 53368dc..11016c4 100755
--- a/gnulib-tests/test-exclude6.sh
+++ b/gnulib-tests/test-exclude6.sh
@@ -1,6 +1,6 @@
#! /bin/sh
# Test suite for exclude.
-# Copyright (C) 2009-2016 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-exclude7.sh b/gnulib-tests/test-exclude7.sh
index 4a92ff5..6b9de77 100755
--- a/gnulib-tests/test-exclude7.sh
+++ b/gnulib-tests/test-exclude7.sh
@@ -1,6 +1,6 @@
#! /bin/sh
# Test suite for exclude.
-# Copyright (C) 2009-2016 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-exclude8.sh b/gnulib-tests/test-exclude8.sh
index 91644ea..6585a4e 100755
--- a/gnulib-tests/test-exclude8.sh
+++ b/gnulib-tests/test-exclude8.sh
@@ -1,6 +1,6 @@
#! /bin/sh
# Test suite for exclude.
-# Copyright (C) 2010-2016 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-fcntl-h.c b/gnulib-tests/test-fcntl-h.c
index aef1661..4c17fdf 100644
--- a/gnulib-tests/test-fcntl-h.c
+++ b/gnulib-tests/test-fcntl-h.c
@@ -1,5 +1,5 @@
/* Test of <fcntl.h> substitute.
- Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2017 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
diff --git a/gnulib-tests/test-fcntl.c b/gnulib-tests/test-fcntl.c
index 974ee33..a249f9a 100644
--- a/gnulib-tests/test-fcntl.c
+++ b/gnulib-tests/test-fcntl.c
@@ -1,5 +1,5 @@
/* Test of fcntl(2).
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
@@ -35,7 +35,11 @@ SIGNATURE_CHECK (fcntl, int, (int, int, ...));
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
/* Get _get_osfhandle. */
-# include "msvc-nothrow.h"
+# if GNULIB_MSVC_NOTHROW
+# include "msvc-nothrow.h"
+# else
+# include <io.h>
+# endif
#endif
#include "binary-io.h"
diff --git a/gnulib-tests/test-fdopen.c b/gnulib-tests/test-fdopen.c
index 55b49a6..c4ce344 100644
--- a/gnulib-tests/test-fdopen.c
+++ b/gnulib-tests/test-fdopen.c
@@ -1,5 +1,5 @@
/* Test opening a stream with a file descriptor.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/test-fgetc.c b/gnulib-tests/test-fgetc.c
index c62e70c..17edf13 100644
--- a/gnulib-tests/test-fgetc.c
+++ b/gnulib-tests/test-fgetc.c
@@ -1,5 +1,5 @@
/* Test of fgetc() function.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
@@ -25,7 +25,9 @@ SIGNATURE_CHECK (fgetc, int, (FILE *));
#include <fcntl.h>
#include <unistd.h>
-#include "msvc-inval.h"
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+# include "msvc-inval.h"
+#endif
#include "macros.h"
diff --git a/gnulib-tests/test-filenamecat.c b/gnulib-tests/test-filenamecat.c
index 79f752f..b4d6581 100644
--- a/gnulib-tests/test-filenamecat.c
+++ b/gnulib-tests/test-filenamecat.c
@@ -1,6 +1,6 @@
/* Test of concatenation of two arbitrary file names.
- Copyright (C) 1996-2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2007, 2009-2017 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
@@ -26,7 +26,6 @@
#include <stdlib.h>
#include <string.h>
-#include "progname.h"
int
main (int argc _GL_UNUSED, char *argv[])
@@ -49,8 +48,6 @@ main (int argc _GL_UNUSED, char *argv[])
unsigned int i;
bool fail = false;
- set_program_name (argv[0]);
-
for (i = 0; i < sizeof tests / sizeof tests[0]; i++)
{
char *base_in_result;
diff --git a/gnulib-tests/test-float.c b/gnulib-tests/test-float.c
index a5f33b6..71df845 100644
--- a/gnulib-tests/test-float.c
+++ b/gnulib-tests/test-float.c
@@ -1,5 +1,5 @@
/* Test of <float.h> substitute.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/test-fnmatch.c b/gnulib-tests/test-fnmatch.c
index c110409..e5eb3e9 100644
--- a/gnulib-tests/test-fnmatch.c
+++ b/gnulib-tests/test-fnmatch.c
@@ -1,5 +1,5 @@
/* Test of fnmatch string matching function.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gnulib-tests/test-fputc.c b/gnulib-tests/test-fputc.c
index 95a1cb6..448e5f2 100644
--- a/gnulib-tests/test-fputc.c
+++ b/gnulib-tests/test-fputc.c
@@ -1,5 +1,5 @@
/* Test of fputc() function.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
@@ -25,7 +25,9 @@ SIGNATURE_CHECK (fputc, int, (int, FILE *));
#include <fcntl.h>
#include <unistd.h>
-#include "msvc-inval.h"
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+# include "msvc-inval.h"
+#endif
#include "macros.h"
diff --git a/gnulib-tests/test-fread.c b/gnulib-tests/test-fread.c
index b9fc72a..751774d 100644
--- a/gnulib-tests/test-fread.c
+++ b/gnulib-tests/test-fread.c
@@ -1,5 +1,5 @@
/* Test of fread() function.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
@@ -25,7 +25,9 @@ SIGNATURE_CHECK (fread, size_t, (void *, size_t, size_t, FILE *));
#include <fcntl.h>
#include <unistd.h>
-#include "msvc-inval.h"
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+# include "msvc-inval.h"
+#endif
#include "macros.h"
diff --git a/gnulib-tests/test-freopen-safer.c b/gnulib-tests/test-freopen-safer.c
index 980f19b..5e46e91 100644
--- a/gnulib-tests/test-freopen-safer.c
+++ b/gnulib-tests/test-freopen-safer.c
@@ -1,5 +1,5 @@
/* Test of reopening a stream.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gnulib-tests/test-freopen.c b/gnulib-tests/test-freopen.c
index 80453bf..717502e 100644
--- a/gnulib-tests/test-freopen.c
+++ b/gnulib-tests/test-freopen.c
@@ -1,5 +1,5 @@
/* Test of opening a file stream.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
@@ -33,7 +33,11 @@ main ()
{
const char *filename = "test-freopen.txt";
+ close (STDIN_FILENO);
ASSERT (freopen ("/dev/null", "r", stdin) != NULL);
+ ASSERT (getchar () == EOF);
+ ASSERT (!ferror (stdin));
+ ASSERT (feof (stdin));
#if 0 /* freopen (NULL, ...) is unsupported on most platforms. */
/* Test that freopen() sets errno if someone else closes the stream
diff --git a/gnulib-tests/test-fstat.c b/gnulib-tests/test-fstat.c
index c9ac749..35479fa 100644
--- a/gnulib-tests/test-fstat.c
+++ b/gnulib-tests/test-fstat.c
@@ -1,5 +1,5 @@
/* Tests of fstat() function.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/test-ftruncate.c b/gnulib-tests/test-ftruncate.c
index 09f175e..47b6070 100644
--- a/gnulib-tests/test-ftruncate.c
+++ b/gnulib-tests/test-ftruncate.c
@@ -1,5 +1,5 @@
/* Test truncating a file.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/test-fwrite.c b/gnulib-tests/test-fwrite.c
index bc285f3..0dfb15b 100644
--- a/gnulib-tests/test-fwrite.c
+++ b/gnulib-tests/test-fwrite.c
@@ -1,5 +1,5 @@
/* Test of fwrite() function.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
@@ -25,7 +25,9 @@ SIGNATURE_CHECK (fwrite, size_t, (const void *, size_t, size_t, FILE *));
#include <fcntl.h>
#include <unistd.h>
-#include "msvc-inval.h"
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+# include "msvc-inval.h"
+#endif
#include "macros.h"
diff --git a/gnulib-tests/test-getcwd-lgpl.c b/gnulib-tests/test-getcwd-lgpl.c
index 6bea7b7..7c0688c 100644
--- a/gnulib-tests/test-getcwd-lgpl.c
+++ b/gnulib-tests/test-getcwd-lgpl.c
@@ -1,5 +1,5 @@
/* Test of getcwd() function.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gnulib-tests/test-getdtablesize.c b/gnulib-tests/test-getdtablesize.c
index 54efa04..885010f 100644
--- a/gnulib-tests/test-getdtablesize.c
+++ b/gnulib-tests/test-getdtablesize.c
@@ -1,5 +1,5 @@
/* Test of getdtablesize() function.
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
diff --git a/gnulib-tests/test-getopt-gnu.c b/gnulib-tests/test-getopt-gnu.c
new file mode 100644
index 0000000..c26e7f1
--- /dev/null
+++ b/gnulib-tests/test-getopt-gnu.c
@@ -0,0 +1,45 @@
+/* Test of command line argument processing.
+ Copyright (C) 2009-2017 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/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+ ftell link warning if we are not using the gnulib ftell module. */
+#define _GL_NO_LARGE_FILES
+
+/* POSIX and glibc provide the getopt() function in <unistd.h>, see
+ http://pubs.opengroup.org/onlinepubs/9699919799/functions/getopt.html
+ https://www.gnu.org/software/libc/manual/html_node/Using-Getopt.html
+ But gnulib provides the getopt() function in <getopt.h>, not in <unistd.h>.
+ This is what we are testing here. */
+#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 *));
+
+#define TEST_GETOPT_GNU 1
+#define TEST_GETOPT_TMP_NAME "test-getopt-gnu.tmp"
+#include "test-getopt-main.h"
diff --git a/gnulib-tests/test-getopt.c b/gnulib-tests/test-getopt-main.h
index 505cb2a..4e3cd2d 100644
--- a/gnulib-tests/test-getopt.c
+++ b/gnulib-tests/test-getopt-main.h
@@ -1,5 +1,5 @@
/* Test of command line argument processing.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
@@ -16,36 +16,13 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
-#include <config.h>
-
-/* None of the files accessed by this test are large, so disable the
- ftell link warning if we are not using the gnulib ftell module. */
-#define _GL_NO_LARGE_FILES
-
-#if GNULIB_TEST_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>
+#include <unistd.h>
/* This test intentionally remaps stderr. So, we arrange to have fd 10
(outside the range of interesting fd's during the test) set up to
@@ -58,7 +35,7 @@ SIGNATURE_CHECK (getopt, int, (int, char * const[], char const *));
static FILE *myerr;
#include "test-getopt.h"
-#if GNULIB_TEST_GETOPT_GNU
+#if TEST_GETOPT_GNU
# include "test-getopt_long.h"
#endif
@@ -71,7 +48,7 @@ main (void)
|| (myerr = fdopen (BACKUP_STDERR_FILENO, "w")) == NULL)
return 2;
- ASSERT (freopen ("test-getopt.tmp", "w", stderr) == stderr);
+ ASSERT (freopen (TEST_GETOPT_TMP_NAME, "w", stderr) == stderr);
/* These default values are required by POSIX. */
ASSERT (optind == 1);
@@ -80,20 +57,20 @@ main (void)
setenv ("POSIXLY_CORRECT", "1", 1);
test_getopt ();
-#if GNULIB_TEST_GETOPT_GNU
+#if TEST_GETOPT_GNU
test_getopt_long_posix ();
#endif
unsetenv ("POSIXLY_CORRECT");
test_getopt ();
-#if GNULIB_TEST_GETOPT_GNU
+#if TEST_GETOPT_GNU
test_getopt_long ();
test_getopt_long_only ();
#endif
ASSERT (fclose (stderr) == 0);
- ASSERT (remove ("test-getopt.tmp") == 0);
+ ASSERT (remove (TEST_GETOPT_TMP_NAME) == 0);
return 0;
}
diff --git a/gnulib-tests/test-getopt-posix.c b/gnulib-tests/test-getopt-posix.c
new file mode 100644
index 0000000..216912d
--- /dev/null
+++ b/gnulib-tests/test-getopt-posix.c
@@ -0,0 +1,34 @@
+/* Test of command line argument processing.
+ Copyright (C) 2009-2017 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/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+ ftell link warning if we are not using the gnulib ftell module. */
+#define _GL_NO_LARGE_FILES
+
+/* POSIX and glibc provide the getopt() function in <unistd.h>, see
+ http://pubs.opengroup.org/onlinepubs/9699919799/functions/getopt.html
+ https://www.gnu.org/software/libc/manual/html_node/Using-Getopt.html
+ But gnulib provides the getopt() function in <getopt.h>, not in <unistd.h>.
+ Nevertheless the getopt() function should also be found in <unistd.h>. */
+#include <unistd.h>
+
+#define TEST_GETOPT_GNU 0
+#define TEST_GETOPT_TMP_NAME "test-getopt-posix.tmp"
+#include "test-getopt-main.h"
diff --git a/gnulib-tests/test-getopt.h b/gnulib-tests/test-getopt.h
index 8e61eb2..5c0e5b5 100644
--- a/gnulib-tests/test-getopt.h
+++ b/gnulib-tests/test-getopt.h
@@ -1,5 +1,5 @@
/* Test of command line argument processing.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
#include <stdbool.h>
+#include "macros.h"
/* The glibc/gnulib implementation of getopt supports setting optind =
0, but not all other implementations do. This matters for getopt.
@@ -66,7 +67,7 @@ getopt_loop (int argc, const char **argv,
ASSERT (options[0] == ':'
|| ((options[0] == '-' || options[0] == '+')
&& options[1] == ':'));
- /* fall through */
+ FALLTHROUGH;
case '?':
*unrecognized = optopt;
break;
diff --git a/gnulib-tests/test-getopt_long.h b/gnulib-tests/test-getopt_long.h
index 0f83f47..e90ebed 100644
--- a/gnulib-tests/test-getopt_long.h
+++ b/gnulib-tests/test-getopt_long.h
@@ -1,5 +1,5 @@
/* Test of command line argument processing.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
@@ -87,7 +87,7 @@ getopt_long_loop (int argc, const char **argv,
ASSERT (options[0] == ':'
|| ((options[0] == '-' || options[0] == '+')
&& options[1] == ':'));
- /* fall through */
+ FALLTHROUGH;
case '?':
*unrecognized = optopt;
break;
diff --git a/gnulib-tests/test-getprogname.c b/gnulib-tests/test-getprogname.c
new file mode 100644
index 0000000..299ca3d
--- /dev/null
+++ b/gnulib-tests/test-getprogname.c
@@ -0,0 +1,58 @@
+/* Test the gnulib getprogname module.
+ Copyright (C) 2016-2017 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/>. */
+
+#include <config.h>
+
+#include "getprogname.h"
+#include <string.h>
+#include <assert.h>
+
+#ifdef __hpux
+# define STREQ(a, b) (strncmp (a, b, 14) == 0)
+#else
+# define STREQ(a, b) (strcmp (a, b) == 0)
+#endif
+
+int
+main (void)
+{
+ char const *p = getprogname ();
+
+ /* libtool creates a temporary executable whose name is sometimes prefixed
+ with "lt-" (depends on the platform). But the name of the temporary
+ executable is a detail that should not be visible to the end user and to
+ the test suite. Remove this "lt-" prefix here. */
+ if (strncmp (p, "lt-", 3) == 0)
+ p += 3;
+
+ /* Note: You can make this test fail
+ a) by running it on a case-insensitive file system (such as on Windows,
+ Cygwin, or on Mac OS X with a case-insensitive HFS+ file system),
+ with an invocation that contains upper case characters, e.g.
+ test-GETPROGNAME,
+ b) by hardlinking or symlinking it to a different name (e.g. test-foo)
+ and invoking it through that name.
+ That's not the intended use. The Makefile always invokes it as
+ 'test-getprogname${EXEEXT}'. */
+#if defined __CYGWIN__
+ /* The Cygwin getprogname() function strips the ".exe" suffix. */
+ assert (STREQ (p, "test-getprogname"));
+#else
+ assert (STREQ (p, "test-getprogname" EXEEXT));
+#endif
+
+ return 0;
+}
diff --git a/gnulib-tests/test-gettimeofday.c b/gnulib-tests/test-gettimeofday.c
index 7a44d71..124d991 100644
--- a/gnulib-tests/test-gettimeofday.c
+++ b/gnulib-tests/test-gettimeofday.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2007, 2009-2016 Free Software Foundation, Inc.
+ * Copyright (C) 2005, 2007, 2009-2017 Free Software Foundation, Inc.
* Written by Jim Meyering.
*
* This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-hash.c b/gnulib-tests/test-hash.c
index 7bb53f0..9792627 100644
--- a/gnulib-tests/test-hash.c
+++ b/gnulib-tests/test-hash.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ * Copyright (C) 2009-2017 Free Software Foundation, Inc.
* Written by Jim Meyering
*
* This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-iconv-h.c b/gnulib-tests/test-iconv-h.c
index fbb0548..fb121f3 100644
--- a/gnulib-tests/test-iconv-h.c
+++ b/gnulib-tests/test-iconv-h.c
@@ -1,5 +1,5 @@
/* Test of <iconv.h> substitute.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
diff --git a/gnulib-tests/test-iconv.c b/gnulib-tests/test-iconv.c
index 3e4c4ff..dcb5b3d 100644
--- a/gnulib-tests/test-iconv.c
+++ b/gnulib-tests/test-iconv.c
@@ -1,5 +1,5 @@
/* Test of character set conversion.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
@@ -44,8 +44,14 @@ main ()
#if HAVE_ICONV
/* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1,
and UTF-8. */
- iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
- iconv_t cd_utf8_to_88591 = iconv_open ("ISO-8859-1", "UTF-8");
+ iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO8859-1");
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+
+#if defined __MVS__ && defined __IBMC__
+ /* String literals below are in ASCII, not EBCDIC. */
+# pragma convert("ISO8859-1")
+# define CONVERT_ENABLED
+#endif
ASSERT (cd_88591_to_utf8 != (iconv_t)(-1));
ASSERT (cd_utf8_to_88591 != (iconv_t)(-1));
@@ -142,7 +148,12 @@ main ()
iconv_close (cd_88591_to_utf8);
iconv_close (cd_utf8_to_88591);
+
+#ifdef CONVERT_ENABLED
+# pragma convert(pop)
#endif
+#endif /* HAVE_ICONV */
+
return 0;
}
diff --git a/gnulib-tests/test-ignore-value.c b/gnulib-tests/test-ignore-value.c
index 7c4b2de..ca77294 100644
--- a/gnulib-tests/test-ignore-value.c
+++ b/gnulib-tests/test-ignore-value.c
@@ -1,6 +1,6 @@
/* Test the "ignore-value" module.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/test-inet_pton.c b/gnulib-tests/test-inet_pton.c
index 3d12556..fea261e 100644
--- a/gnulib-tests/test-inet_pton.c
+++ b/gnulib-tests/test-inet_pton.c
@@ -1,5 +1,5 @@
/* Test of inet_pton function.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gnulib-tests/test-init.sh b/gnulib-tests/test-init.sh
index 1dd05f4..98fe2c0 100755
--- a/gnulib-tests/test-init.sh
+++ b/gnulib-tests/test-init.sh
@@ -1,6 +1,6 @@
#!/bin/sh
# Unit tests for init.sh
-# Copyright (C) 2011-2016 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
@@ -57,7 +57,8 @@ EOF
# Also remove the @@ line, since Solaris 5.10 and GNU diff formats differ:
# -@@ -0,0 +1 @@
# +@@ -1,0 +1,1 @@
- sed 's/ .*//;/^@@/d' out > k && mv k out
+ # Also, remove space after leading '+', since AIX 7.1 diff outputs a space.
+ sed 's/ .*//;/^@@/d;s/^+ /+/' out > k && mv k out
cat <<\EOF > exp
--- empty
+++ in
diff --git a/gnulib-tests/test-intprops.c b/gnulib-tests/test-intprops.c
index 0a8ddcd..a030e73 100644
--- a/gnulib-tests/test-intprops.c
+++ b/gnulib-tests/test-intprops.c
@@ -1,5 +1,5 @@
/* Test intprops.h.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
@@ -113,11 +113,32 @@ main (void)
VERIFY (TYPE_MAXIMUM (long int) == LONG_MAX);
VERIFY (TYPE_MINIMUM (unsigned long int) == 0);
VERIFY (TYPE_MAXIMUM (unsigned long int) == ULONG_MAX);
+ #ifdef LLONG_MAX
+ verify (TYPE_MINIMUM (long long int) == LLONG_MIN);
+ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+ #endif
VERIFY (TYPE_MINIMUM (intmax_t) == INTMAX_MIN);
VERIFY (TYPE_MAXIMUM (intmax_t) == INTMAX_MAX);
VERIFY (TYPE_MINIMUM (uintmax_t) == 0);
VERIFY (TYPE_MAXIMUM (uintmax_t) == UINTMAX_MAX);
+ /* TYPE_WIDTH. */
+ #ifdef CHAR_WIDTH
+ verify (TYPE_WIDTH (char) == CHAR_WIDTH);
+ verify (TYPE_WIDTH (signed char) == SCHAR_WIDTH);
+ verify (TYPE_WIDTH (unsigned char) == UCHAR_WIDTH);
+ verify (TYPE_WIDTH (short int) == SHRT_WIDTH);
+ verify (TYPE_WIDTH (unsigned short int) == USHRT_WIDTH);
+ verify (TYPE_WIDTH (int) == INT_WIDTH);
+ verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH);
+ verify (TYPE_WIDTH (long int) == LONG_WIDTH);
+ verify (TYPE_WIDTH (unsigned long int) == ULONG_WIDTH);
+ #ifdef LLONG_WIDTH
+ verify (TYPE_WIDTH (long long int) == LLONG_WIDTH);
+ verify (TYPE_WIDTH (unsigned long long int) == ULLONG_WIDTH);
+ #endif
+ #endif
+
/* INT_BITS_STRLEN_BOUND. */
VERIFY (INT_BITS_STRLEN_BOUND (1) == 1);
VERIFY (INT_BITS_STRLEN_BOUND (2620) == 789);
diff --git a/gnulib-tests/test-inttostr.c b/gnulib-tests/test-inttostr.c
index 18ff4a2..19c6d8a 100644
--- a/gnulib-tests/test-inttostr.c
+++ b/gnulib-tests/test-inttostr.c
@@ -1,5 +1,5 @@
/* Test inttostr functions, and incidentally, INT_BUFSIZE_BOUND
- Copyright (C) 2010-2016 Free Software Foundation, Inc.
+ Copyright (C) 2010-2017 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
diff --git a/gnulib-tests/test-inttypes.c b/gnulib-tests/test-inttypes.c
index 9a3193c..d6524c7 100644
--- a/gnulib-tests/test-inttypes.c
+++ b/gnulib-tests/test-inttypes.c
@@ -1,5 +1,5 @@
/* Test of <inttypes.h> substitute.
- Copyright (C) 2006-2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2017 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
diff --git a/gnulib-tests/test-ioctl.c b/gnulib-tests/test-ioctl.c
index db7ab9e..8709104 100644
--- a/gnulib-tests/test-ioctl.c
+++ b/gnulib-tests/test-ioctl.c
@@ -1,5 +1,5 @@
/* Test of ioctl() function.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/test-isblank.c b/gnulib-tests/test-isblank.c
index 2f6f676..54769dd 100644
--- a/gnulib-tests/test-isblank.c
+++ b/gnulib-tests/test-isblank.c
@@ -1,5 +1,5 @@
/* Test of isblank() function.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gnulib-tests/test-iswblank.c b/gnulib-tests/test-iswblank.c
index 175718f..9175f0c 100644
--- a/gnulib-tests/test-iswblank.c
+++ b/gnulib-tests/test-iswblank.c
@@ -1,5 +1,5 @@
/* Test of iswblank() function.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
diff --git a/gnulib-tests/test-langinfo.c b/gnulib-tests/test-langinfo.c
index 30b0007..f1c9429 100644
--- a/gnulib-tests/test-langinfo.c
+++ b/gnulib-tests/test-langinfo.c
@@ -1,5 +1,5 @@
/* Test of <langinfo.h> substitute.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gnulib-tests/test-limits-h.c b/gnulib-tests/test-limits-h.c
new file mode 100644
index 0000000..15a291f
--- /dev/null
+++ b/gnulib-tests/test-limits-h.c
@@ -0,0 +1,50 @@
+/* Test of <limits.h> substitute.
+ Copyright 2016-2017 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/>. */
+
+/* Written by Paul Eggert. */
+
+#include <config.h>
+
+#include <limits.h>
+
+#include "verify.h"
+
+#if 4 < __GNUC__ + (3 <= __GNUC_MINOR__)
+# pragma GCC diagnostic ignored "-Woverlength-strings"
+#endif
+
+/* Macros specified by ISO/IEC TS 18661-1:2014. */
+
+#define verify_width(width, min, max) \
+ verify ((max) >> ((width) - 1 - ((min) < 0)) == 1)
+
+verify_width (CHAR_WIDTH, CHAR_MIN, CHAR_MAX);
+verify_width (SCHAR_WIDTH, SCHAR_MIN, SCHAR_MAX);
+verify_width (UCHAR_WIDTH, 0, UCHAR_MAX);
+verify_width (SHRT_WIDTH, SHRT_MIN, SHRT_MAX);
+verify_width (USHRT_WIDTH, 0, USHRT_MAX);
+verify_width (INT_WIDTH, INT_MIN, INT_MAX);
+verify_width (UINT_WIDTH, 0, UINT_MAX);
+verify_width (LONG_WIDTH, LONG_MIN, LONG_MAX);
+verify_width (ULONG_WIDTH, 0, ULONG_MAX);
+verify_width (LLONG_WIDTH, LLONG_MIN, LLONG_MAX);
+verify_width (ULLONG_WIDTH, 0, ULLONG_MAX);
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gnulib-tests/test-listen.c b/gnulib-tests/test-listen.c
index 4bc66fc..e67b3b6 100644
--- a/gnulib-tests/test-listen.c
+++ b/gnulib-tests/test-listen.c
@@ -1,5 +1,5 @@
/* Test listen() function.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/test-locale.c b/gnulib-tests/test-locale.c
index c1811af..749adf3 100644
--- a/gnulib-tests/test-locale.c
+++ b/gnulib-tests/test-locale.c
@@ -1,5 +1,5 @@
/* Test of <locale.h> substitute.
- Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2017 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
diff --git a/gnulib-tests/test-localeconv.c b/gnulib-tests/test-localeconv.c
index 9e83f2d..2fb5c41 100644
--- a/gnulib-tests/test-localeconv.c
+++ b/gnulib-tests/test-localeconv.c
@@ -1,5 +1,5 @@
/* Test of localeconv() function.
- Copyright (C) 2012-2016 Free Software Foundation, Inc.
+ Copyright (C) 2012-2017 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
@@ -37,13 +37,13 @@ main ()
ASSERT (STREQ (l->decimal_point, "."));
ASSERT (STREQ (l->thousands_sep, ""));
-#if !(defined __FreeBSD__ || defined __sun)
+#if !((defined __FreeBSD__ || defined __DragonFly__) || defined __sun)
ASSERT (STREQ (l->grouping, ""));
#endif
ASSERT (STREQ (l->mon_decimal_point, ""));
ASSERT (STREQ (l->mon_thousands_sep, ""));
-#if !(defined __FreeBSD__ || defined __sun)
+#if !((defined __FreeBSD__ || defined __DragonFly__) || defined __sun)
ASSERT (STREQ (l->mon_grouping, ""));
#endif
ASSERT (STREQ (l->positive_sign, ""));
diff --git a/gnulib-tests/test-lstat.c b/gnulib-tests/test-lstat.c
index 86ff465..20e83a6 100644
--- a/gnulib-tests/test-lstat.c
+++ b/gnulib-tests/test-lstat.c
@@ -1,5 +1,5 @@
/* Test of lstat() function.
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
diff --git a/gnulib-tests/test-lstat.h b/gnulib-tests/test-lstat.h
index 4eb9036..b5815f6 100644
--- a/gnulib-tests/test-lstat.h
+++ b/gnulib-tests/test-lstat.h
@@ -1,5 +1,5 @@
/* Test of lstat() function.
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
diff --git a/gnulib-tests/test-malloca.c b/gnulib-tests/test-malloca.c
index e9ab83d..11f0f79 100644
--- a/gnulib-tests/test-malloca.c
+++ b/gnulib-tests/test-malloca.c
@@ -1,5 +1,5 @@
/* Test of safe automatic memory allocation.
- Copyright (C) 2005, 2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007, 2009-2017 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
diff --git a/gnulib-tests/test-mbrtowc-w32.c b/gnulib-tests/test-mbrtowc-w32.c
index f637330..70afc87 100644
--- a/gnulib-tests/test-mbrtowc-w32.c
+++ b/gnulib-tests/test-mbrtowc-w32.c
@@ -1,5 +1,5 @@
/* Test of conversion of multibyte character to wide character.
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
@@ -325,14 +325,12 @@ test_one_locale (const char *name, int codepage)
memset (&state, '\0', sizeof (mbstate_t));
wc = (wchar_t) 0xBADFACE;
ret = mbrtowc (&wc, "\377", 1, &state); /* 0xFF */
- ASSERT (ret == (size_t)-1);
- ASSERT (errno == EILSEQ);
+ ASSERT ((ret == (size_t)-1 && errno == EILSEQ) || ret == (size_t)-2);
memset (&state, '\0', sizeof (mbstate_t));
wc = (wchar_t) 0xBADFACE;
ret = mbrtowc (&wc, "\225\377", 2, &state); /* 0x95 0xFF */
- ASSERT (ret == (size_t)-1);
- ASSERT (errno == EILSEQ);
+ ASSERT ((ret == (size_t)-1 && errno == EILSEQ) || (ret == 2 && wc == 0x30FB));
}
return 0;
@@ -397,14 +395,12 @@ test_one_locale (const char *name, int codepage)
memset (&state, '\0', sizeof (mbstate_t));
wc = (wchar_t) 0xBADFACE;
ret = mbrtowc (&wc, "\377", 1, &state); /* 0xFF */
- ASSERT (ret == (size_t)-1);
- ASSERT (errno == EILSEQ);
+ ASSERT ((ret == (size_t)-1 && errno == EILSEQ) || ret == (size_t)-2);
memset (&state, '\0', sizeof (mbstate_t));
wc = (wchar_t) 0xBADFACE;
ret = mbrtowc (&wc, "\225\377", 2, &state); /* 0x95 0xFF */
- ASSERT (ret == (size_t)-1);
- ASSERT (errno == EILSEQ);
+ ASSERT ((ret == (size_t)-1 && errno == EILSEQ) || (ret == 2 && wc == '?'));
}
return 0;
@@ -469,14 +465,12 @@ test_one_locale (const char *name, int codepage)
memset (&state, '\0', sizeof (mbstate_t));
wc = (wchar_t) 0xBADFACE;
ret = mbrtowc (&wc, "\377", 1, &state); /* 0xFF */
- ASSERT (ret == (size_t)-1);
- ASSERT (errno == EILSEQ);
+ ASSERT ((ret == (size_t)-1 && errno == EILSEQ) || ret == (size_t)-2);
memset (&state, '\0', sizeof (mbstate_t));
wc = (wchar_t) 0xBADFACE;
ret = mbrtowc (&wc, "\225\377", 2, &state); /* 0x95 0xFF */
- ASSERT (ret == (size_t)-1);
- ASSERT (errno == EILSEQ);
+ ASSERT ((ret == (size_t)-1 && errno == EILSEQ) || (ret == 2 && wc == '?'));
}
return 0;
diff --git a/gnulib-tests/test-mbrtowc.c b/gnulib-tests/test-mbrtowc.c
index f7fed6a..70c8a2a 100644
--- a/gnulib-tests/test-mbrtowc.c
+++ b/gnulib-tests/test-mbrtowc.c
@@ -1,5 +1,5 @@
/* Test of conversion of multibyte character to wide character.
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
@@ -75,7 +75,7 @@ main (int argc, char *argv[])
default:
if (! (c && 1 < argc && argv[1][0] == '5'))
break;
- /* Fall through. */
+ FALLTHROUGH;
case '\t': case '\v': case '\f':
case ' ': case '!': case '"': case '#': case '%':
case '&': case '\'': case '(': case ')': case '*':
diff --git a/gnulib-tests/test-mbscasecmp.c b/gnulib-tests/test-mbscasecmp.c
index 76b6772..4b15726 100644
--- a/gnulib-tests/test-mbscasecmp.c
+++ b/gnulib-tests/test-mbscasecmp.c
@@ -1,5 +1,5 @@
/* Test of case-insensitive string comparison function.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
diff --git a/gnulib-tests/test-mbsinit.c b/gnulib-tests/test-mbsinit.c
index 8cd1c4d..315937c 100644
--- a/gnulib-tests/test-mbsinit.c
+++ b/gnulib-tests/test-mbsinit.c
@@ -1,5 +1,5 @@
/* Test of test for initial conversion state.
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
diff --git a/gnulib-tests/test-mbsrtowcs.c b/gnulib-tests/test-mbsrtowcs.c
index aef88a3..4a47a3f 100644
--- a/gnulib-tests/test-mbsrtowcs.c
+++ b/gnulib-tests/test-mbsrtowcs.c
@@ -1,5 +1,5 @@
/* Test of conversion of string to wide string.
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
diff --git a/gnulib-tests/test-mbsstr1.c b/gnulib-tests/test-mbsstr1.c
index 8b1ac0a..eb1b90e 100644
--- a/gnulib-tests/test-mbsstr1.c
+++ b/gnulib-tests/test-mbsstr1.c
@@ -1,5 +1,5 @@
/* Test of searching in a string.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
diff --git a/gnulib-tests/test-mbsstr2.c b/gnulib-tests/test-mbsstr2.c
index 919e47c..96078fe 100644
--- a/gnulib-tests/test-mbsstr2.c
+++ b/gnulib-tests/test-mbsstr2.c
@@ -1,5 +1,5 @@
/* Test of searching in a string.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
diff --git a/gnulib-tests/test-mbsstr3.c b/gnulib-tests/test-mbsstr3.c
index 622f0ec..ffa24dc 100644
--- a/gnulib-tests/test-mbsstr3.c
+++ b/gnulib-tests/test-mbsstr3.c
@@ -1,5 +1,5 @@
/* Test of searching in a string.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
diff --git a/gnulib-tests/test-memchr.c b/gnulib-tests/test-memchr.c
index 1526ed2..f31bf8c 100644
--- a/gnulib-tests/test-memchr.c
+++ b/gnulib-tests/test-memchr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2017 Free Software Foundation, Inc.
* Written by Eric Blake and Bruno Haible
*
* This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-nanosleep.c b/gnulib-tests/test-nanosleep.c
index 26ca73b..04b3229 100644
--- a/gnulib-tests/test-nanosleep.c
+++ b/gnulib-tests/test-nanosleep.c
@@ -1,5 +1,5 @@
/* Test of nanosleep() function.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gnulib-tests/test-netinet_in.c b/gnulib-tests/test-netinet_in.c
index 8a603da..20710d7 100644
--- a/gnulib-tests/test-netinet_in.c
+++ b/gnulib-tests/test-netinet_in.c
@@ -1,5 +1,5 @@
/* Test of <netinet/in.h> substitute.
- Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2017 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
diff --git a/gnulib-tests/test-nl_langinfo.c b/gnulib-tests/test-nl_langinfo.c
index 3a8fa8f..69a0885 100644
--- a/gnulib-tests/test-nl_langinfo.c
+++ b/gnulib-tests/test-nl_langinfo.c
@@ -1,5 +1,5 @@
/* Test of nl_langinfo replacement.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gnulib-tests/test-open.c b/gnulib-tests/test-open.c
index d9e2e27..cfcad6a 100644
--- a/gnulib-tests/test-open.c
+++ b/gnulib-tests/test-open.c
@@ -1,5 +1,5 @@
/* Test of opening a file descriptor.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
diff --git a/gnulib-tests/test-open.h b/gnulib-tests/test-open.h
index faaff0f..6d01dd9 100644
--- a/gnulib-tests/test-open.h
+++ b/gnulib-tests/test-open.h
@@ -1,5 +1,5 @@
/* Test of opening a file descriptor.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
diff --git a/gnulib-tests/test-pathmax.c b/gnulib-tests/test-pathmax.c
index ac4a393..7b3510c 100644
--- a/gnulib-tests/test-pathmax.c
+++ b/gnulib-tests/test-pathmax.c
@@ -1,5 +1,5 @@
/* Test of "pathmax.h".
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/test-perror.c b/gnulib-tests/test-perror.c
index 164a79c..140e05b 100644
--- a/gnulib-tests/test-perror.c
+++ b/gnulib-tests/test-perror.c
@@ -1,5 +1,5 @@
/* Test of perror() function.
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
diff --git a/gnulib-tests/test-perror.sh b/gnulib-tests/test-perror.sh
index 7274d32..40a3034 100755
--- a/gnulib-tests/test-perror.sh
+++ b/gnulib-tests/test-perror.sh
@@ -2,9 +2,11 @@
: ${srcdir=.}
. "$srcdir/init.sh"; path_prepend_ .
-# Test NULL prefix. Result should not contain a number.
+# Test NULL prefix. Result should not contain a number, except in lines that
+# start with 'EDC' (IBM z/OS libc produces an error identifier before the
+# error message).
test-perror 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror.tmp
-grep '[0-9]' t-perror.tmp > /dev/null \
+grep -v '^EDC' t-perror.tmp | grep '[0-9]' > /dev/null \
&& fail_ "result should not contain a number"
# Test empty prefix. Result should be the same.
diff --git a/gnulib-tests/test-perror2.c b/gnulib-tests/test-perror2.c
index e295576..125961e 100644
--- a/gnulib-tests/test-perror2.c
+++ b/gnulib-tests/test-perror2.c
@@ -1,5 +1,5 @@
/* Test of perror() function.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/test-pipe.c b/gnulib-tests/test-pipe.c
index 4282c05..08cfe92 100644
--- a/gnulib-tests/test-pipe.c
+++ b/gnulib-tests/test-pipe.c
@@ -1,5 +1,5 @@
/* Test of pipe.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
@@ -29,7 +29,11 @@ SIGNATURE_CHECK (pipe, int, (int[2]));
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
/* Get _get_osfhandle. */
-# include "msvc-nothrow.h"
+# if GNULIB_MSVC_NOTHROW
+# include "msvc-nothrow.h"
+# else
+# include <io.h>
+# endif
#endif
#include "binary-io.h"
diff --git a/gnulib-tests/test-quotearg-simple.c b/gnulib-tests/test-quotearg-simple.c
index 6bb4b35..4bd2312 100644
--- a/gnulib-tests/test-quotearg-simple.c
+++ b/gnulib-tests/test-quotearg-simple.c
@@ -1,5 +1,5 @@
/* Test of quotearg family of functions.
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
@@ -27,7 +27,6 @@
#include <string.h>
#include "localcharset.h"
-#include "progname.h"
#include "macros.h"
#include "zerosize-ptr.h"
@@ -36,124 +35,125 @@
static struct result_groups results_g[] = {
/* literal_quoting_style */
{ { "", "\0""1\0", 3, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
- LQ RQ, LQ RQ },
+ "a' b", LQ RQ, LQ RQ },
{ "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
- LQ RQ, LQ RQ },
+ "a' b", LQ RQ, LQ RQ },
{ "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
- LQ RQ, LQ RQ } },
+ "a' b", LQ RQ, LQ RQ } },
/* shell_quoting_style */
{ { "''", "\0""1\0", 3, "simple", "' \t\n'\\''\"\033?""?/\\'", "a:b",
- "'a\\b'", LQ RQ, LQ RQ },
+ "'a\\b'", "\"a' b\"", LQ RQ, LQ RQ },
{ "''", "1", 1, "simple", "' \t\n'\\''\"\033?""?/\\'", "a:b",
- "'a\\b'", LQ RQ, LQ RQ },
+ "'a\\b'", "\"a' b\"", LQ RQ, LQ RQ },
{ "''", "1", 1, "simple", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
- "'a\\b'", LQ RQ, LQ RQ } },
+ "'a\\b'", "\"a' b\"", LQ RQ, LQ RQ } },
/* shell_always_quoting_style */
{ { "''", "'\0""1\0'", 5, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
- "'a\\b'", "'" LQ RQ "'", "'" LQ RQ "'" },
+ "'a\\b'", "\"a' b\"", "'" LQ RQ "'", "'" LQ RQ "'" },
{ "''", "'1'", 3, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
- "'a\\b'", "'" LQ RQ "'", "'" LQ RQ "'" },
+ "'a\\b'", "\"a' b\"", "'" LQ RQ "'", "'" LQ RQ "'" },
{ "''", "'1'", 3, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
- "'a\\b'", "'" LQ RQ "'", "'" LQ RQ "'" } },
+ "'a\\b'", "\"a' b\"", "'" LQ RQ "'", "'" LQ RQ "'" } },
/* shell_escape_quoting_style */
{ { "''", "''$'\\0''1'$'\\0'", 15, "simple",
"' '$'\\t\\n'\\''\"'$'\\033''?""?/\\'", "a:b",
- "'a\\b'", "''$'" LQ_ENC RQ_ENC "'", LQ RQ },
+ "'a\\b'", "\"a' b\"", "''$'" LQ_ENC RQ_ENC "'", LQ RQ },
{ "''", "''$'\\0''1'$'\\0'", 15, "simple",
"' '$'\\t\\n'\\''\"'$'\\033''?""?/\\'", "a:b",
- "'a\\b'", "''$'" LQ_ENC RQ_ENC "'", LQ RQ },
+ "'a\\b'", "\"a' b\"", "''$'" LQ_ENC RQ_ENC "'", LQ RQ },
{ "''", "''$'\\0''1'$'\\0'", 15, "simple",
"' '$'\\t\\n'\\''\"'$'\\033''?""?/\\'", "'a:b'",
- "'a\\b'", "''$'" LQ_ENC RQ_ENC "'", LQ RQ } },
+ "'a\\b'", "\"a' b\"", "''$'" LQ_ENC RQ_ENC "'", LQ RQ } },
/* shell_escape_always_quoting_style */
{ { "''", "''$'\\0''1'$'\\0'", 15, "'simple'",
"' '$'\\t\\n'\\''\"'$'\\033''?""?/\\'", "'a:b'",
- "'a\\b'", "''$'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
+ "'a\\b'", "\"a' b\"", "''$'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
{ "''", "''$'\\0''1'$'\\0'", 15, "'simple'",
"' '$'\\t\\n'\\''\"'$'\\033''?""?/\\'", "'a:b'",
- "'a\\b'", "''$'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
+ "'a\\b'", "\"a' b\"", "''$'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
{ "''", "''$'\\0''1'$'\\0'", 15, "'simple'",
"' '$'\\t\\n'\\''\"'$'\\033''?""?/\\'", "'a:b'",
- "'a\\b'", "''$'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" } },
+ "'a\\b'", "\"a' b\"", "''$'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" } },
/* c_quoting_style */
{ { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
"\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
- "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+ "\"a' b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
{ "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
"\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
- "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+ "\"a' b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
{ "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
"\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a\\:b\"", "\"a\\\\b\"",
- "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } },
+ "\"a' b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } },
/* c_maybe_quoting_style */
{ { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
- "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
+ "a:b", "a\\b", "a' b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
{ "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
- "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
+ "a:b", "a\\b", "a' b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
{ "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
- "\"a:b\"", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ } },
+ "\"a:b\"", "a\\b", "a' b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ } },
/* escape_quoting_style */
{ { "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a:b",
- "a\\\\b", LQ_ENC RQ_ENC, LQ RQ },
+ "a\\\\b", "a' b", LQ_ENC RQ_ENC, LQ RQ },
{ "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a:b",
- "a\\\\b", LQ_ENC RQ_ENC, LQ RQ },
+ "a\\\\b", "a' b", LQ_ENC RQ_ENC, LQ RQ },
{ "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a\\:b",
- "a\\\\b", LQ_ENC RQ_ENC, LQ RQ } },
+ "a\\\\b", "a' b", LQ_ENC RQ_ENC, LQ RQ } },
/* locale_quoting_style */
{ { "''", "'\\0001\\0'", 9, "'simple'", "' \\t\\n\\'\"\\033?""?/\\\\'",
- "'a:b'", "'a\\\\b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
+ "'a:b'", "'a\\\\b'", "'a\\' b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
{ "''", "'\\0001\\0'", 9, "'simple'", "' \\t\\n\\'\"\\033?""?/\\\\'",
- "'a:b'", "'a\\\\b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
+ "'a:b'", "'a\\\\b'", "'a\\' b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
{ "''", "'\\0001\\0'", 9, "'simple'", "' \\t\\n\\'\"\\033?""?/\\\\'",
- "'a\\:b'", "'a\\\\b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" } },
+ "'a\\:b'", "'a\\\\b'", "'a\\' b'",
+ "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" } },
/* clocale_quoting_style */
{ { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
"\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
- "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+ "\"a' b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
{ "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
"\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
- "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+ "\"a' b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
{ "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
"\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a\\:b\"", "\"a\\\\b\"",
- "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } }
+ "\"a' b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } }
};
static struct result_groups flag_results[] = {
/* literal_quoting_style and QA_ELIDE_NULL_BYTES */
- { { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ,
- LQ RQ },
- { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ,
- LQ RQ },
- { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ,
- LQ RQ } },
+ { { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", "a' b",
+ LQ RQ, LQ RQ },
+ { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", "a' b",
+ LQ RQ, LQ RQ },
+ { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", "a' b",
+ LQ RQ, LQ RQ } },
/* c_quoting_style and QA_ELIDE_OUTER_QUOTES */
{ { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
- "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
+ "a:b", "a\\b", "a' b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
{ "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
- "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
+ "a:b", "a\\b", "a' b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
{ "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
- "\"a:b\"", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ } },
+ "\"a:b\"", "a\\b", "a' b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ } },
/* c_quoting_style and QA_SPLIT_TRIGRAPHS */
{ { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
"\" \\t\\n'\\\"\\033?\"\"?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
- "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+ "\"a' b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
{ "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
"\" \\t\\n'\\\"\\033?\"\"?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
- "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+ "\"a' b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
{ "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
"\" \\t\\n'\\\"\\033?\"\"?/\\\\\"", "\"a\\:b\"", "\"a\\\\b\"",
- "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } }
+ "\"a' b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } }
};
static char const *custom_quotes[][2] = {
@@ -170,89 +170,96 @@ static struct result_groups custom_results[] = {
/* left_quote = right_quote = "" */
{ { "", "\\0001\\0", 7, "simple",
" \\t\\n'\"\\033?""?/\\\\", "a:b", "a\\\\b",
- LQ_ENC RQ_ENC, LQ RQ },
+ "a' b", LQ_ENC RQ_ENC, LQ RQ },
{ "", "\\0001\\0", 7, "simple",
" \\t\\n'\"\\033?""?/\\\\", "a:b", "a\\\\b",
- LQ_ENC RQ_ENC, LQ RQ },
+ "a' b", LQ_ENC RQ_ENC, LQ RQ },
{ "", "\\0001\\0", 7, "simple",
" \\t\\n'\"\\033?""?/\\\\", "a\\:b", "a\\\\b",
- LQ_ENC RQ_ENC, LQ RQ } },
+ "a' b", LQ_ENC RQ_ENC, LQ RQ } },
/* left_quote = right_quote = "'" */
{ { "''", "'\\0001\\0'", 9, "'simple'",
"' \\t\\n\\'\"\\033?""?/\\\\'", "'a:b'", "'a\\\\b'",
- "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
+ "'a\\' b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
{ "''", "'\\0001\\0'", 9, "'simple'",
"' \\t\\n\\'\"\\033?""?/\\\\'", "'a:b'", "'a\\\\b'",
- "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
+ "'a\\' b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
{ "''", "'\\0001\\0'", 9, "'simple'",
"' \\t\\n\\'\"\\033?""?/\\\\'", "'a\\:b'", "'a\\\\b'",
- "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" } },
+ "'a\\' b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" } },
/* left_quote = "(" and right_quote = ")" */
{ { "()", "(\\0001\\0)", 9, "(simple)",
"( \\t\\n'\"\\033?""?/\\\\)", "(a:b)", "(a\\\\b)",
- "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" },
+ "(a' b)", "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" },
{ "()", "(\\0001\\0)", 9, "(simple)",
"( \\t\\n'\"\\033?""?/\\\\)", "(a:b)", "(a\\\\b)",
- "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" },
+ "(a' b)", "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" },
{ "()", "(\\0001\\0)", 9, "(simple)",
"( \\t\\n'\"\\033?""?/\\\\)", "(a\\:b)", "(a\\\\b)",
- "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" } },
+ "(a' b)", "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" } },
/* left_quote = ":" and right_quote = " " */
{ { ": ", ":\\0001\\0 ", 9, ":simple ",
":\\ \\t\\n'\"\\033?""?/\\\\ ", ":a:b ", ":a\\\\b ",
- ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " },
+ ":a'\\ b ", ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " },
{ ": ", ":\\0001\\0 ", 9, ":simple ",
":\\ \\t\\n'\"\\033?""?/\\\\ ", ":a:b ", ":a\\\\b ",
- ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " },
+ ":a'\\ b ", ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " },
{ ": ", ":\\0001\\0 ", 9, ":simple ",
":\\ \\t\\n'\"\\033?""?/\\\\ ", ":a\\:b ", ":a\\\\b ",
- ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " } },
+ ":a'\\ b ", ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " } },
/* left_quote = " " and right_quote = ":" */
{ { " :", " \\0001\\0:", 9, " simple:",
" \\t\\n'\"\\033?""?/\\\\:", " a\\:b:", " a\\\\b:",
- " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" },
+ " a' b:", " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" },
{ " :", " \\0001\\0:", 9, " simple:",
" \\t\\n'\"\\033?""?/\\\\:", " a\\:b:", " a\\\\b:",
- " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" },
+ " a' b:", " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" },
{ " :", " \\0001\\0:", 9, " simple:",
" \\t\\n'\"\\033?""?/\\\\:", " a\\:b:", " a\\\\b:",
- " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" } },
+ " a' b:", " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" } },
/* left_quote = "# " and right_quote = "\n" */
{ { "# \n", "# \\0001\\0\n", 10, "# simple\n",
"# \\t\\n'\"\\033?""?/\\\\\n", "# a:b\n", "# a\\\\b\n",
- "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" },
+ "# a' b\n", "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" },
{ "# \n", "# \\0001\\0\n", 10, "# simple\n",
"# \\t\\n'\"\\033?""?/\\\\\n", "# a:b\n", "# a\\\\b\n",
- "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" },
+ "# a' b\n", "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" },
{ "# \n", "# \\0001\\0\n", 10, "# simple\n",
"# \\t\\n'\"\\033?""?/\\\\\n", "# a\\:b\n", "# a\\\\b\n",
- "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" } },
+ "# a' b\n", "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" } },
/* left_quote = "\"'" and right_quote = "'\"" */
{ { "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"",
"\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a:b'\"", "\"'a\\\\b'\"",
- "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" },
+ "\"'a' b'\"", "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" },
{ "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"",
"\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a:b'\"", "\"'a\\\\b'\"",
- "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" },
+ "\"'a' b'\"", "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" },
{ "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"",
"\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a\\:b'\"", "\"'a\\\\b'\"",
- "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" } }
+ "\"'a' b'\"", "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" } }
};
+static char *
+use_quote_double_quotes (const char *str, size_t *len)
+{
+ char *p = *len == SIZE_MAX ? quotearg_char (str, '"')
+ : quotearg_char_mem (str, *len, '"');
+ *len = strlen (p);
+ return p;
+}
+
int
main (int argc _GL_UNUSED, char *argv[])
{
int i;
bool ascii_only = MB_CUR_MAX == 1 && !isprint ((unsigned char) LQ[0]);
- set_program_name (argv[0]);
-
/* This part of the program is hard-wired to the C locale since it
does not call setlocale. However, according to POSIX, the use of
8-bit bytes in a character context in the C locale gives
diff --git a/gnulib-tests/test-quotearg.h b/gnulib-tests/test-quotearg.h
index 7eee6b5..5aee789 100644
--- a/gnulib-tests/test-quotearg.h
+++ b/gnulib-tests/test-quotearg.h
@@ -1,5 +1,5 @@
/* Test of quotearg family of functions.
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
@@ -24,8 +24,9 @@ struct result_strings {
char const *str4; /* Translation of " \t\n'\"\033?""?/\\". */
char const *str5; /* Translation of "a:b". */
char const *str6; /* Translation of "a\\b". */
- char const *str7a; /* Translation of LQ RQ, in ASCII charset. */
- char const *str7b; /* Translation of LQ RQ, in Latin1 or UTF-8 charset. */
+ char const *str7; /* Translation of "a' b". */
+ char const *str8a; /* Translation of LQ RQ, in ASCII charset. */
+ char const *str8b; /* Translation of LQ RQ, in Latin1 or UTF-8 charset. */
};
struct result_groups {
@@ -43,7 +44,7 @@ struct result_groups {
static struct result_strings inputs = {
"", "\0001\0", 3, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
- LQ RQ, NULL
+ "a' b", LQ RQ, NULL
};
static void
@@ -85,12 +86,16 @@ compare_strings (char *(func) (char const *, size_t *),
p = func (inputs.str6, &len);
compare (results->str6, strlen (results->str6), p, len);
- len = strlen (inputs.str7a);
- p = func (inputs.str7a, &len);
+ len = strlen (inputs.str7);
+ p = func (inputs.str7, &len);
+ compare (results->str7, strlen (results->str7), p, len);
+
+ len = strlen (inputs.str8a);
+ p = func (inputs.str8a, &len);
if (ascii_only)
- compare (results->str7a, strlen (results->str7a), p, len);
+ compare (results->str8a, strlen (results->str8a), p, len);
else
- compare (results->str7b, strlen (results->str7b), p, len);
+ compare (results->str8b, strlen (results->str8b), p, len);
}
static char *
@@ -114,15 +119,6 @@ use_quotearg (const char *str, size_t *len)
}
static char *
-use_quote_double_quotes (const char *str, size_t *len)
-{
- char *p = *len == SIZE_MAX ? quotearg_char (str, '"')
- : quotearg_char_mem (str, *len, '"');
- *len = strlen (p);
- return p;
-}
-
-static char *
use_quotearg_colon (const char *str, size_t *len)
{
char *p = (*len == SIZE_MAX ? quotearg_colon (str)
diff --git a/gnulib-tests/test-raise.c b/gnulib-tests/test-raise.c
index b793e97..47c34ce 100644
--- a/gnulib-tests/test-raise.c
+++ b/gnulib-tests/test-raise.c
@@ -1,5 +1,5 @@
/* Test raising a signal.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/test-rawmemchr.c b/gnulib-tests/test-rawmemchr.c
index 4f4ec7b..5480f43 100644
--- a/gnulib-tests/test-rawmemchr.c
+++ b/gnulib-tests/test-rawmemchr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2017 Free Software Foundation, Inc.
* Written by Eric Blake and Bruno Haible
*
* This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-readlink.c b/gnulib-tests/test-readlink.c
index fdff6e1..7911cf4 100644
--- a/gnulib-tests/test-readlink.c
+++ b/gnulib-tests/test-readlink.c
@@ -1,5 +1,5 @@
/* Tests of readlink.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gnulib-tests/test-readlink.h b/gnulib-tests/test-readlink.h
index cba98f6..674aef8 100644
--- a/gnulib-tests/test-readlink.h
+++ b/gnulib-tests/test-readlink.h
@@ -1,5 +1,5 @@
/* Tests of readlink.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gnulib-tests/test-regex.c b/gnulib-tests/test-regex.c
index c0d9824..9173fe8 100644
--- a/gnulib-tests/test-regex.c
+++ b/gnulib-tests/test-regex.c
@@ -1,5 +1,5 @@
/* Test regular expressions
- Copyright 1996-2001, 2003-2016 Free Software Foundation, Inc.
+ Copyright 1996-2001, 2003-2017 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
diff --git a/gnulib-tests/test-select-fd.c b/gnulib-tests/test-select-fd.c
index 452ddb2..d375fc3 100644
--- a/gnulib-tests/test-select-fd.c
+++ b/gnulib-tests/test-select-fd.c
@@ -1,5 +1,5 @@
/* Test of select() substitute, reading or writing from a given file descriptor.
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
diff --git a/gnulib-tests/test-select-stdin.c b/gnulib-tests/test-select-stdin.c
index 0250af4..698ed5b 100644
--- a/gnulib-tests/test-select-stdin.c
+++ b/gnulib-tests/test-select-stdin.c
@@ -1,5 +1,5 @@
/* Test of select() substitute, reading from stdin.
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
diff --git a/gnulib-tests/test-select.c b/gnulib-tests/test-select.c
index 9747923..e7bf488 100644
--- a/gnulib-tests/test-select.c
+++ b/gnulib-tests/test-select.c
@@ -1,5 +1,5 @@
/* Test of select() substitute.
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
diff --git a/gnulib-tests/test-select.h b/gnulib-tests/test-select.h
index f6daba3..aa67ca0 100644
--- a/gnulib-tests/test-select.h
+++ b/gnulib-tests/test-select.h
@@ -1,5 +1,5 @@
/* Test of select() substitute.
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
@@ -292,8 +292,8 @@ test_bad_fd (select_fn my_select)
/* On Linux, Mac OS X, *BSD, values of fd like 99 or 399 are discarded
by the kernel early and therefore do *not* lead to EBADF, as required
by POSIX. */
-# if defined __linux__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined __NetBSD__
- fd = 16;
+# if defined __linux__ || (defined __APPLE__ && defined __MACH__) || (defined __FreeBSD__ || defined __DragonFly__) || defined __OpenBSD__ || defined __NetBSD__
+ fd = 14;
# else
fd = 99;
# endif
diff --git a/gnulib-tests/test-setenv.c b/gnulib-tests/test-setenv.c
index 519dc27..d5e628f 100644
--- a/gnulib-tests/test-setenv.c
+++ b/gnulib-tests/test-setenv.c
@@ -1,5 +1,5 @@
/* Tests of setenv.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gnulib-tests/test-setlocale1.c b/gnulib-tests/test-setlocale1.c
index 143c0d8..69e17cb 100644
--- a/gnulib-tests/test-setlocale1.c
+++ b/gnulib-tests/test-setlocale1.c
@@ -1,5 +1,5 @@
/* Test of setting the current locale.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/test-setlocale2.c b/gnulib-tests/test-setlocale2.c
index 52e65d8..32d7bb3 100644
--- a/gnulib-tests/test-setlocale2.c
+++ b/gnulib-tests/test-setlocale2.c
@@ -1,5 +1,5 @@
/* Test of setting the current locale.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/test-setsockopt.c b/gnulib-tests/test-setsockopt.c
index 4b73b82..0347076 100644
--- a/gnulib-tests/test-setsockopt.c
+++ b/gnulib-tests/test-setsockopt.c
@@ -1,5 +1,5 @@
/* Test setsockopt() function.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/test-sh-quote.c b/gnulib-tests/test-sh-quote.c
index a2633ba..a7db744 100644
--- a/gnulib-tests/test-sh-quote.c
+++ b/gnulib-tests/test-sh-quote.c
@@ -1,5 +1,5 @@
/* Test of sh-quote module.
- Copyright (C) 2012-2016 Free Software Foundation, Inc.
+ Copyright (C) 2012-2017 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
@@ -91,7 +91,7 @@ main (void)
check_one ("&", "'&'");
/* "'" would be interpreted as the start of a string. */
- check_one ("'foo'bar", "''\\''foo'\\''bar'"); /* or "\"'foo'bar\"" */
+ check_one ("'foo'bar", "\"'foo'bar\"");
/* '(' at the beginning of argv[0] would introduce a subshell command. */
check_one ("(", "'('");
diff --git a/gnulib-tests/test-sigaction.c b/gnulib-tests/test-sigaction.c
index 27c1ecc..b664e11 100644
--- a/gnulib-tests/test-sigaction.c
+++ b/gnulib-tests/test-sigaction.c
@@ -1,5 +1,5 @@
/* Test of sigaction() function.
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
diff --git a/gnulib-tests/test-signal-h.c b/gnulib-tests/test-signal-h.c
index b050839..9ef589b 100644
--- a/gnulib-tests/test-signal-h.c
+++ b/gnulib-tests/test-signal-h.c
@@ -1,5 +1,5 @@
/* Test of <signal.h> substitute.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gnulib-tests/test-sigprocmask.c b/gnulib-tests/test-sigprocmask.c
index e759bf1..7c0da7f 100644
--- a/gnulib-tests/test-sigprocmask.c
+++ b/gnulib-tests/test-sigprocmask.c
@@ -1,5 +1,5 @@
/* Test of sigprocmask.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/test-sleep.c b/gnulib-tests/test-sleep.c
index 64f681e..84567cf 100644
--- a/gnulib-tests/test-sleep.c
+++ b/gnulib-tests/test-sleep.c
@@ -1,5 +1,5 @@
/* Test of sleep() function.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
diff --git a/gnulib-tests/test-snprintf.c b/gnulib-tests/test-snprintf.c
index 9041e4a..06d48be 100644
--- a/gnulib-tests/test-snprintf.c
+++ b/gnulib-tests/test-snprintf.c
@@ -1,5 +1,5 @@
/* Test of snprintf() function.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
diff --git a/gnulib-tests/test-sockets.c b/gnulib-tests/test-sockets.c
index 2836ed9..cf56968 100644
--- a/gnulib-tests/test-sockets.c
+++ b/gnulib-tests/test-sockets.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2017 Free Software Foundation, Inc.
* Written by Simon Josefsson.
*
* This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-stat-time.c b/gnulib-tests/test-stat-time.c
index c60ee7a..47849de 100644
--- a/gnulib-tests/test-stat-time.c
+++ b/gnulib-tests/test-stat-time.c
@@ -1,5 +1,5 @@
/* Test of <stat-time.h>.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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,8 +22,10 @@
#include <fcntl.h>
#include <signal.h>
+#include <stdio.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <time.h>
#include "macros.h"
@@ -32,6 +34,27 @@
enum { NFILES = 4 };
+static char filename_stamp1[50];
+static char filename_testfile[50];
+static char filename_stamp2[50];
+static char filename_stamp3[50];
+
+/* Use file names that are different at each run.
+ This is necessary for test_birthtime() to pass on native Windows:
+ On this platform, the file system apparently remembers the creation time
+ of a file even after it is removed and created anew. See
+ "Windows NT Contains File System Tunneling Capabilities"
+ <https://support.microsoft.com/en-us/help/172190/> */
+static void
+initialize_filenames (void)
+{
+ long t = (long) time (NULL);
+ sprintf (filename_stamp1, "t-stt-%ld-stamp1", t);
+ sprintf (filename_testfile, "t-stt-%ld-testfile", t);
+ sprintf (filename_stamp2, "t-stt-%ld-stamp2", t);
+ sprintf (filename_stamp3, "t-stt-%ld-stamp3", t);
+}
+
static int
force_unlink (const char *filename)
{
@@ -45,11 +68,10 @@ static void
cleanup (int sig)
{
/* Remove temporary files. */
- force_unlink ("t-stt-stamp1");
- force_unlink ("t-stt-testfile");
- force_unlink ("t-stt-stamp2");
- force_unlink ("t-stt-renamed");
- force_unlink ("t-stt-stamp3");
+ force_unlink (filename_stamp1);
+ force_unlink (filename_testfile);
+ force_unlink (filename_stamp2);
+ force_unlink (filename_stamp3);
if (sig != 0)
_exit (1);
@@ -87,20 +109,20 @@ prepare_test (struct stat *statinfo, struct timespec *modtimes)
{
int i;
- create_file ("t-stt-stamp1");
+ create_file (filename_stamp1);
nap ();
- create_file ("t-stt-testfile");
+ create_file (filename_testfile);
nap ();
- create_file ("t-stt-stamp2");
+ create_file (filename_stamp2);
nap ();
- ASSERT (chmod ("t-stt-testfile", 0400) == 0);
+ ASSERT (chmod (filename_testfile, 0400) == 0);
nap ();
- create_file ("t-stt-stamp3");
+ create_file (filename_stamp3);
- do_stat ("t-stt-stamp1", &statinfo[0]);
- do_stat ("t-stt-testfile", &statinfo[1]);
- do_stat ("t-stt-stamp2", &statinfo[2]);
- do_stat ("t-stt-stamp3", &statinfo[3]);
+ do_stat (filename_stamp1, &statinfo[0]);
+ do_stat (filename_testfile, &statinfo[1]);
+ do_stat (filename_stamp2, &statinfo[2]);
+ do_stat (filename_stamp3, &statinfo[3]);
/* Now use our access functions. */
for (i = 0; i < NFILES; ++i)
@@ -160,7 +182,7 @@ test_ctime (const struct stat *statinfo)
if (statinfo[0].st_mtime != statinfo[0].st_ctime)
return;
- /* mtime(stamp2) < ctime(renamed) */
+ /* mtime(stamp2) < ctime(testfile) */
ASSERT (statinfo[2].st_mtime < statinfo[1].st_ctime
|| (statinfo[2].st_mtime == statinfo[1].st_ctime
&& (get_stat_mtime_ns (&statinfo[2])
@@ -183,11 +205,11 @@ test_birthtime (const struct stat *statinfo,
return;
}
- /* mtime(stamp1) < birthtime(renamed) */
+ /* mtime(stamp1) < birthtime(testfile) */
ASSERT (modtimes[0].tv_sec < birthtimes[1].tv_sec
|| (modtimes[0].tv_sec == birthtimes[1].tv_sec
&& modtimes[0].tv_nsec < birthtimes[1].tv_nsec));
- /* birthtime(renamed) < mtime(stamp2) */
+ /* birthtime(testfile) < mtime(stamp2) */
ASSERT (birthtimes[1].tv_sec < modtimes[2].tv_sec
|| (birthtimes[1].tv_sec == modtimes[2].tv_sec
&& birthtimes[1].tv_nsec < modtimes[2].tv_nsec));
@@ -200,6 +222,8 @@ main (void)
struct timespec modtimes[NFILES];
struct timespec birthtimes[NFILES];
+ initialize_filenames ();
+
#ifdef SIGHUP
signal (SIGHUP, cleanup);
#endif
diff --git a/gnulib-tests/test-stat.c b/gnulib-tests/test-stat.c
index 4510e59..225edaa 100644
--- a/gnulib-tests/test-stat.c
+++ b/gnulib-tests/test-stat.c
@@ -1,5 +1,5 @@
/* Tests of stat.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gnulib-tests/test-stat.h b/gnulib-tests/test-stat.h
index 4cf6c6d..234ec77 100644
--- a/gnulib-tests/test-stat.h
+++ b/gnulib-tests/test-stat.h
@@ -1,5 +1,5 @@
/* Tests of stat.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gnulib-tests/test-stdalign.c b/gnulib-tests/test-stdalign.c
index 0f240c5..c4b70e1 100644
--- a/gnulib-tests/test-stdalign.c
+++ b/gnulib-tests/test-stdalign.c
@@ -1,5 +1,5 @@
/* Test of <stdalign.h>.
- Copyright 2009-2016 Free Software Foundation, Inc.
+ Copyright 2009-2017 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
@@ -84,6 +84,11 @@ main ()
/* Avoid a test failure due to Sun Studio Developer Bug Report #2125432. */
fputs ("Skipping test: known Sun C compiler bug\n", stderr);
return 77;
+#elif defined __HP_cc && __ia64
+ /* Avoid a test failure due to HP-UX Itanium cc bug; see:
+ http://lists.gnu.org/archive/html/bug-gnulib/2017-03/msg00078.html */
+ fputs ("Skipping test: known HP-UX Itanium cc compiler bug\n", stderr);
+ return 77;
#else
CHECK_ALIGNED (static_char_alignas);
CHECK_ALIGNED (static_char_Alignas);
diff --git a/gnulib-tests/test-stdbool.c b/gnulib-tests/test-stdbool.c
index 45dc837..507af83 100644
--- a/gnulib-tests/test-stdbool.c
+++ b/gnulib-tests/test-stdbool.c
@@ -1,5 +1,5 @@
/* Test of <stdbool.h> substitute.
- Copyright (C) 2002-2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2007, 2009-2017 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
diff --git a/gnulib-tests/test-stddef.c b/gnulib-tests/test-stddef.c
index bfb72a0..8bf3793 100644
--- a/gnulib-tests/test-stddef.c
+++ b/gnulib-tests/test-stddef.c
@@ -1,5 +1,5 @@
/* Test of <stddef.h> substitute.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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,7 @@
#include <config.h>
#include <stddef.h>
+#include <limits.h>
#include <stdalign.h>
#include "verify.h"
@@ -43,9 +44,12 @@ struct d
unlikely to bite real code, we ignore that short-coming. */
/* verify (sizeof offsetof (struct d, e) == sizeof (size_t)); */
verify (sizeof (offsetof (struct d, e)) == sizeof (size_t));
-verify (offsetof (struct d, e) < -1); /* Must be unsigned. */
verify (offsetof (struct d, f) == 1);
+/* offsetof promotes to an unsigned integer if and only if sizes do
+ not fit in int. */
+verify ((offsetof (struct d, e) < -1) == (INT_MAX < (size_t) -1));
+
/* Check max_align_t's alignment. */
verify (alignof (double) <= alignof (max_align_t));
verify (alignof (int) <= alignof (max_align_t));
diff --git a/gnulib-tests/test-stdint.c b/gnulib-tests/test-stdint.c
index 7705fc7..7352215 100644
--- a/gnulib-tests/test-stdint.c
+++ b/gnulib-tests/test-stdint.c
@@ -1,5 +1,5 @@
/* Test of <stdint.h> substitute.
- Copyright (C) 2006-2016 Free Software Foundation, Inc.
+ Copyright (C) 2006-2017 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
@@ -351,6 +351,73 @@ verify_same_types (INTMAX_C (17), (intmax_t)0 + 0);
verify (UINTMAX_C (17) == 17);
verify_same_types (UINTMAX_C (17), (uintmax_t)0 + 0);
+/* Use _GL_VERIFY (with a fixed-length diagnostic string) rather than verify,
+ because the latter would require forming each stringified expression, and
+ many of these would be so long as to trigger a warning/error like this:
+
+ test-stdint.c:407:1: error: string length '6980' is greater than the \
+ length '4095' ISO C99 compilers are required to support \
+ [-Werror=overlength-strings]
+ */
+#define verify_width(width, min, max) \
+ _GL_VERIFY ((max) >> ((width) - 1 - ((min) < 0)) == 1, \
+ "verify_width check")
+
+/* Macros specified by ISO/IEC TS 18661-1:2014. */
+
+#ifdef INT8_MAX
+verify_width (INT8_WIDTH, INT8_MIN, INT8_MAX);
+#endif
+#ifdef UINT8_MAX
+verify_width (UINT8_WIDTH, 0, UINT8_MAX);
+#endif
+#ifdef INT16_MAX
+verify_width (INT16_WIDTH, INT16_MIN, INT16_MAX);
+#endif
+#ifdef UINT16_MAX
+verify_width (UINT16_WIDTH, 0, UINT16_MAX);
+#endif
+#ifdef INT32_MAX
+verify_width (INT32_WIDTH, INT32_MIN, INT32_MAX);
+#endif
+#ifdef UINT32_MAX
+verify_width (UINT32_WIDTH, 0, UINT32_MAX);
+#endif
+#ifdef INT64_MAX
+verify_width (INT64_WIDTH, INT64_MIN, INT64_MAX);
+#endif
+#ifdef UINT64_MAX
+verify_width (UINT64_WIDTH, 0, UINT64_MAX);
+#endif
+verify_width (INT_LEAST8_WIDTH, INT_LEAST8_MIN, INT_LEAST8_MAX);
+verify_width (UINT_LEAST8_WIDTH, 0, UINT_LEAST8_MAX);
+verify_width (INT_LEAST16_WIDTH, INT_LEAST16_MIN, INT_LEAST16_MAX);
+verify_width (UINT_LEAST16_WIDTH, 0, UINT_LEAST16_MAX);
+verify_width (INT_LEAST32_WIDTH, INT_LEAST32_MIN, INT_LEAST32_MAX);
+verify_width (UINT_LEAST32_WIDTH, 0, UINT_LEAST32_MAX);
+verify_width (INT_LEAST64_WIDTH, INT_LEAST64_MIN, INT_LEAST64_MAX);
+verify_width (UINT_LEAST64_WIDTH, 0, UINT_LEAST64_MAX);
+verify_width (INT_FAST8_WIDTH, INT_FAST8_MIN, INT_FAST8_MAX);
+verify_width (UINT_FAST8_WIDTH, 0, UINT_FAST8_MAX);
+verify_width (INT_FAST16_WIDTH, INT_FAST16_MIN, INT_FAST16_MAX);
+verify_width (UINT_FAST16_WIDTH, 0, UINT_FAST16_MAX);
+verify_width (INT_FAST32_WIDTH, INT_FAST32_MIN, INT_FAST32_MAX);
+verify_width (UINT_FAST32_WIDTH, 0, UINT_FAST32_MAX);
+verify_width (INT_FAST64_WIDTH, INT_FAST64_MIN, INT_FAST64_MAX);
+verify_width (UINT_FAST64_WIDTH, 0, UINT_FAST64_MAX);
+verify_width (INTPTR_WIDTH, INTPTR_MIN, INTPTR_MAX);
+verify_width (UINTPTR_WIDTH, 0, UINTPTR_MAX);
+verify_width (INTMAX_WIDTH, INTMAX_MIN, INTMAX_MAX);
+verify_width (UINTMAX_WIDTH, 0, UINTMAX_MAX);
+verify_width (PTRDIFF_WIDTH, PTRDIFF_MIN, PTRDIFF_MAX);
+verify_width (SIZE_WIDTH, 0, SIZE_MAX);
+verify_width (WCHAR_WIDTH, WCHAR_MIN, WCHAR_MAX);
+#ifdef WINT_MAX
+verify_width (WINT_WIDTH, WINT_MIN, WINT_MAX);
+#endif
+#ifdef SIG_ATOMIC_MAX
+verify_width (SIG_ATOMIC_WIDTH, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX);
+#endif
int
main (void)
diff --git a/gnulib-tests/test-stdio.c b/gnulib-tests/test-stdio.c
index 6cde888..46d75e2 100644
--- a/gnulib-tests/test-stdio.c
+++ b/gnulib-tests/test-stdio.c
@@ -1,5 +1,5 @@
/* Test of <stdio.h> substitute.
- Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2017 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
diff --git a/gnulib-tests/test-stdlib.c b/gnulib-tests/test-stdlib.c
index a1fc0d8..3c1d7fb 100644
--- a/gnulib-tests/test-stdlib.c
+++ b/gnulib-tests/test-stdlib.c
@@ -1,5 +1,5 @@
/* Test of <stdlib.h> substitute.
- Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2017 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
diff --git a/gnulib-tests/test-strerror.c b/gnulib-tests/test-strerror.c
index 80ffe1c..6b2b4fa 100644
--- a/gnulib-tests/test-strerror.c
+++ b/gnulib-tests/test-strerror.c
@@ -1,5 +1,5 @@
/* Test of strerror() function.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
diff --git a/gnulib-tests/test-strerror_r.c b/gnulib-tests/test-strerror_r.c
index cb773a3..286e6ab 100644
--- a/gnulib-tests/test-strerror_r.c
+++ b/gnulib-tests/test-strerror_r.c
@@ -1,5 +1,5 @@
/* Test of strerror_r() function.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
diff --git a/gnulib-tests/test-strftime.c b/gnulib-tests/test-strftime.c
index 39494e6..102e168 100644
--- a/gnulib-tests/test-strftime.c
+++ b/gnulib-tests/test-strftime.c
@@ -1,5 +1,5 @@
/* Test that posixtime works as required.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
@@ -96,6 +96,8 @@ static struct tzalloc_test TZ[] =
{ 0, "JST-9" },
#define NZ 5
{ 0, "NZST-12NZDT,M9.5.0,M4.1.0/3" },
+#define Unknown 6
+ { 0, "<-00>0" },
{ 0 }
};
@@ -121,18 +123,21 @@ static struct localtime_rz_test LT[] =
{ TZ+CentEur, 0, "1970-01-01 01:00:00 +0100 (CET)", 0 },
{ TZ+Japan , 0, "1970-01-01 09:00:00 +0900 (JST)", 0 },
{ TZ+NZ , 0, "1970-01-01 13:00:00 +1300 (NZDT)", 1 },
+ { TZ+Unknown, 0, "1970-01-01 00:00:00 -0000 (-00)", 0 },
{ TZ+Pacific, 500000001, "1985-11-04 16:53:21 -0800 (PST)", 0 },
{ TZ+Arizona, 500000001, "1985-11-04 17:53:21 -0700 (MST)", 0 },
{ TZ+UTC , 500000001, "1985-11-05 00:53:21 +0000 (UTC)", 0 },
{ TZ+CentEur, 500000001, "1985-11-05 01:53:21 +0100 (CET)", 1 },
{ TZ+Japan , 500000001, "1985-11-05 09:53:21 +0900 (JST)", 0 },
{ TZ+NZ , 500000001, "1985-11-05 13:53:21 +1300 (NZDT)", 0 },
+ { TZ+Unknown, 500000001, "1985-11-05 00:53:21 -0000 (-00)", 0 },
{ TZ+Pacific, 1000000002, "2001-09-08 18:46:42 -0700 (PDT)", 0 },
{ TZ+Arizona, 1000000002, "2001-09-08 18:46:42 -0700 (MST)", 0 },
{ TZ+UTC , 1000000002, "2001-09-09 01:46:42 +0000 (UTC)", 0 },
{ TZ+CentEur, 1000000002, "2001-09-09 03:46:42 +0200 (CEST)", 0 },
{ TZ+Japan , 1000000002, "2001-09-09 10:46:42 +0900 (JST)", 0 },
{ TZ+NZ , 1000000002, "2001-09-09 13:46:42 +1200 (NZST)", 0 },
+ { TZ+Unknown, 1000000002, "2001-09-09 01:46:42 -0000 (-00)", 0 },
{ 0 }
};
@@ -200,12 +205,48 @@ tzalloc_test (void)
return fail;
}
+
+static int
+quarter_test (void)
+{
+ int result = 0;
+ size_t mon;
+
+ /* Check %q. */
+ for (mon = 1; mon <= 12; mon++)
+ {
+ char out[2];
+ char exp[2] = {0,};
+ struct tm qtm = { .tm_mon = mon - 1 };
+ char fmt[3] = {'%','q','\0'};
+
+ size_t r = nstrftime (out, sizeof (out), fmt, &qtm, 0, 0);
+ if (r == 0)
+ {
+ puts ("nstrftime(\"%q\") failed");
+ result = 1;
+ break;
+ }
+
+ exp[0] = mon < 4 ? '1' : mon < 7 ? '2' : mon < 10 ? '3' : '4';
+ if (strcmp (out, exp) != 0)
+ {
+ printf ("nstrftime %%q: expected \"%s\", got \"%s\"\n", exp, out);
+ result = 1;
+ break;
+ }
+ }
+
+ return result;
+}
+
int
main (void)
{
int fail = 0;
fail |= posixtm_test ();
fail |= tzalloc_test ();
+ fail |= quarter_test ();
return fail;
}
diff --git a/gnulib-tests/test-striconv.c b/gnulib-tests/test-striconv.c
index 9b71b69..7002315 100644
--- a/gnulib-tests/test-striconv.c
+++ b/gnulib-tests/test-striconv.c
@@ -1,5 +1,5 @@
/* Test of character set conversion.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
diff --git a/gnulib-tests/test-string.c b/gnulib-tests/test-string.c
index f4c60f7..f10005d 100644
--- a/gnulib-tests/test-string.c
+++ b/gnulib-tests/test-string.c
@@ -1,5 +1,5 @@
/* Test of <string.h> substitute.
- Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2017 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
diff --git a/gnulib-tests/test-strings.c b/gnulib-tests/test-strings.c
index 5eaa61a..d658a29 100644
--- a/gnulib-tests/test-strings.c
+++ b/gnulib-tests/test-strings.c
@@ -1,5 +1,5 @@
/* Test of <strings.h> substitute.
- Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2017 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
diff --git a/gnulib-tests/test-strnlen.c b/gnulib-tests/test-strnlen.c
index ee5bd78..bceb059 100644
--- a/gnulib-tests/test-strnlen.c
+++ b/gnulib-tests/test-strnlen.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2016 Free Software Foundation, Inc.
+ * Copyright (C) 2010-2017 Free Software Foundation, Inc.
* Written by Eric Blake
*
* This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-strtoull.c b/gnulib-tests/test-strtoull.c
index 6b1e01b..d7dc35c 100644
--- a/gnulib-tests/test-strtoull.c
+++ b/gnulib-tests/test-strtoull.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ * Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/test-strtoumax.c b/gnulib-tests/test-strtoumax.c
index bb9d30e..a917c17 100644
--- a/gnulib-tests/test-strtoumax.c
+++ b/gnulib-tests/test-strtoumax.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ * Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/test-symlink.c b/gnulib-tests/test-symlink.c
index ad13b93..6b025a8 100644
--- a/gnulib-tests/test-symlink.c
+++ b/gnulib-tests/test-symlink.c
@@ -1,5 +1,5 @@
/* Tests of symlink.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gnulib-tests/test-symlink.h b/gnulib-tests/test-symlink.h
index fc064e8..8b16f4a 100644
--- a/gnulib-tests/test-symlink.h
+++ b/gnulib-tests/test-symlink.h
@@ -1,5 +1,5 @@
/* Tests of symlink.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gnulib-tests/test-sys_ioctl.c b/gnulib-tests/test-sys_ioctl.c
index 8e0ddcd..41d9462 100644
--- a/gnulib-tests/test-sys_ioctl.c
+++ b/gnulib-tests/test-sys_ioctl.c
@@ -1,5 +1,5 @@
/* Test of <sys/ioctl.h> substitute.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gnulib-tests/test-sys_select.c b/gnulib-tests/test-sys_select.c
index 39a878f..34793c5 100644
--- a/gnulib-tests/test-sys_select.c
+++ b/gnulib-tests/test-sys_select.c
@@ -1,5 +1,5 @@
/* Test of <sys/select.h> substitute.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
diff --git a/gnulib-tests/test-sys_socket.c b/gnulib-tests/test-sys_socket.c
index a4f7108..35c198b 100644
--- a/gnulib-tests/test-sys_socket.c
+++ b/gnulib-tests/test-sys_socket.c
@@ -1,5 +1,5 @@
/* Test of <sys/socket.h> substitute.
- Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2017 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
diff --git a/gnulib-tests/test-sys_stat.c b/gnulib-tests/test-sys_stat.c
index 8a3af94..df1972f 100644
--- a/gnulib-tests/test-sys_stat.c
+++ b/gnulib-tests/test-sys_stat.c
@@ -1,5 +1,5 @@
/* Test of <sys/stat.h> substitute.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
diff --git a/gnulib-tests/test-sys_time.c b/gnulib-tests/test-sys_time.c
index 44535b9..ea38e84 100644
--- a/gnulib-tests/test-sys_time.c
+++ b/gnulib-tests/test-sys_time.c
@@ -1,5 +1,5 @@
/* Test of <sys/time.h> substitute.
- Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2017 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
diff --git a/gnulib-tests/test-sys_types.c b/gnulib-tests/test-sys_types.c
index 7f8fb6d..30a6b9d 100644
--- a/gnulib-tests/test-sys_types.c
+++ b/gnulib-tests/test-sys_types.c
@@ -1,5 +1,5 @@
/* Test of <sys/types.h> substitute.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/test-sys_uio.c b/gnulib-tests/test-sys_uio.c
index c433847..713eafb 100644
--- a/gnulib-tests/test-sys_uio.c
+++ b/gnulib-tests/test-sys_uio.c
@@ -1,5 +1,5 @@
/* Test of <sys/uio.h> substitute.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/test-sys_wait.c b/gnulib-tests/test-sys_wait.c
index f814ff3..d3b6804 100644
--- a/gnulib-tests/test-sys_wait.c
+++ b/gnulib-tests/test-sys_wait.c
@@ -1,5 +1,5 @@
/* Test of <sys/wait.h> substitute.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gnulib-tests/test-sys_wait.h b/gnulib-tests/test-sys_wait.h
index 7389be4..00cb1c0 100644
--- a/gnulib-tests/test-sys_wait.h
+++ b/gnulib-tests/test-sys_wait.h
@@ -1,5 +1,5 @@
/* Test of macros shared between <sys/wait.h> and <stdlib.h>.
- Copyright (C) 2010-2016 Free Software Foundation, Inc.
+ Copyright (C) 2010-2017 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
diff --git a/gnulib-tests/test-time.c b/gnulib-tests/test-time.c
index dec2b13..ff9ffee 100644
--- a/gnulib-tests/test-time.c
+++ b/gnulib-tests/test-time.c
@@ -1,5 +1,5 @@
/* Test of <time.h> substitute.
- Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2017 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
diff --git a/gnulib-tests/test-timespec.c b/gnulib-tests/test-timespec.c
index 3ea6e2d..de8e29d 100644
--- a/gnulib-tests/test-timespec.c
+++ b/gnulib-tests/test-timespec.c
@@ -1,5 +1,5 @@
/* Test timespec functions.
- Copyright 2015-2016 Free Software Foundation, Inc.
+ Copyright 2015-2017 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
diff --git a/gnulib-tests/test-unistd.c b/gnulib-tests/test-unistd.c
index 463ef57..ce7f59a 100644
--- a/gnulib-tests/test-unistd.c
+++ b/gnulib-tests/test-unistd.c
@@ -1,5 +1,5 @@
/* Test of <unistd.h> substitute.
- Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2017 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
diff --git a/gnulib-tests/test-unsetenv.c b/gnulib-tests/test-unsetenv.c
index fe4548d..d7d7d05 100644
--- a/gnulib-tests/test-unsetenv.c
+++ b/gnulib-tests/test-unsetenv.c
@@ -1,5 +1,5 @@
/* Tests of unsetenv.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gnulib-tests/test-update-copyright.sh b/gnulib-tests/test-update-copyright.sh
index cd4886a..0df54e2 100755
--- a/gnulib-tests/test-update-copyright.sh
+++ b/gnulib-tests/test-update-copyright.sh
@@ -1,6 +1,6 @@
#!/bin/sh
# Test suite for update-copyright.
-# Copyright (C) 2009-2016 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-vasnprintf.c b/gnulib-tests/test-vasnprintf.c
index a75c004..2dd869f 100644
--- a/gnulib-tests/test-vasnprintf.c
+++ b/gnulib-tests/test-vasnprintf.c
@@ -1,5 +1,5 @@
/* Test of vasnprintf() and asnprintf() functions.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
diff --git a/gnulib-tests/test-vasprintf.c b/gnulib-tests/test-vasprintf.c
index ebcbfc4..2cab307 100644
--- a/gnulib-tests/test-vasprintf.c
+++ b/gnulib-tests/test-vasprintf.c
@@ -1,5 +1,5 @@
/* Test of vasprintf() and asprintf() functions.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
diff --git a/gnulib-tests/test-vc-list-files-cvs.sh b/gnulib-tests/test-vc-list-files-cvs.sh
index 6262944..f04fe9c 100755
--- a/gnulib-tests/test-vc-list-files-cvs.sh
+++ b/gnulib-tests/test-vc-list-files-cvs.sh
@@ -1,6 +1,6 @@
#!/bin/sh
# Unit tests for vc-list-files
-# Copyright (C) 2008-2016 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-vc-list-files-git.sh b/gnulib-tests/test-vc-list-files-git.sh
index 4358115..8249017 100755
--- a/gnulib-tests/test-vc-list-files-git.sh
+++ b/gnulib-tests/test-vc-list-files-git.sh
@@ -1,6 +1,6 @@
#!/bin/sh
# Unit tests for vc-list-files
-# Copyright (C) 2008-2016 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-verify-try.c b/gnulib-tests/test-verify-try.c
new file mode 100644
index 0000000..362fb01
--- /dev/null
+++ b/gnulib-tests/test-verify-try.c
@@ -0,0 +1,21 @@
+/* Test the "verify" module.
+
+ Copyright (C) 2017 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/>. */
+
+/* This is a separate source file, so that the execution of test-verify.sh
+ does not interfere with the building of the 'test-verify' program. */
+
+#include "test-verify.c"
diff --git a/gnulib-tests/test-verify.c b/gnulib-tests/test-verify.c
index d7ca053..92b7501 100644
--- a/gnulib-tests/test-verify.c
+++ b/gnulib-tests/test-verify.c
@@ -1,6 +1,6 @@
/* Test the "verify" module.
- Copyright (C) 2005, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2017 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
diff --git a/gnulib-tests/test-verify.sh b/gnulib-tests/test-verify.sh
index 3e76761..1e75d55 100755
--- a/gnulib-tests/test-verify.sh
+++ b/gnulib-tests/test-verify.sh
@@ -7,8 +7,9 @@ unset MALLOC_PERTURB_
# Rather than figure out how to invoke the compiler with the right
# include path ourselves, we let make do it:
-(cd "$initial_cwd_" && rm -f test-verify.o \
- && $MAKE test-verify.o >/dev/null 2>&1) \
+(cd "$initial_cwd_" \
+ && rm -f test-verify-try.o \
+ && $MAKE test-verify-try.o >/dev/null 2>&1) \
|| skip_ "cannot compile error-free"
# Now, prove that we encounter all expected compilation failures:
@@ -16,8 +17,8 @@ unset MALLOC_PERTURB_
: >err
for i in 1 2 3 4 5; do
(cd "$initial_cwd_"
- rm -f test-verify.o
- $MAKE CFLAGS=-DEXP_FAIL=$i test-verify.o) >>out 2>>err \
+ rm -f test-verify-try.o
+ $MAKE CFLAGS=-DEXP_FAIL=$i test-verify-try.o) >>out 2>>err \
&& { warn_ "compiler didn't detect verification failure $i"; fail=1; }
done
diff --git a/gnulib-tests/test-version-etc.c b/gnulib-tests/test-version-etc.c
index 4382c76..ad8221a 100644
--- a/gnulib-tests/test-version-etc.c
+++ b/gnulib-tests/test-version-etc.c
@@ -1,5 +1,5 @@
/* Test suite for version-etc.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 Free Software Foundation, Inc.
This file is part of the GNUlib Library.
This program is free software: you can redistribute it and/or modify
@@ -19,14 +19,12 @@
#include "version-etc.h"
-#include "progname.h"
#define AUTHORS "Sergey Poznyakoff", "Eric Blake"
int
main (int argc _GL_UNUSED, char **argv)
{
- set_program_name (argv[0]);
version_etc (stdout, "test-version-etc", "dummy", "0", AUTHORS,
(const char *) NULL);
return 0;
diff --git a/gnulib-tests/test-version-etc.sh b/gnulib-tests/test-version-etc.sh
index 1706aef..e7de3b7 100755
--- a/gnulib-tests/test-version-etc.sh
+++ b/gnulib-tests/test-version-etc.sh
@@ -1,6 +1,6 @@
#! /bin/sh
# Test suite for version-etc.
-# Copyright (C) 2009-2016 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-wchar.c b/gnulib-tests/test-wchar.c
index e118048..2463aeb 100644
--- a/gnulib-tests/test-wchar.c
+++ b/gnulib-tests/test-wchar.c
@@ -1,5 +1,5 @@
/* Test of <wchar.h> substitute.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
diff --git a/gnulib-tests/test-wcrtomb-w32.c b/gnulib-tests/test-wcrtomb-w32.c
index 0570c73..e7d0803 100644
--- a/gnulib-tests/test-wcrtomb-w32.c
+++ b/gnulib-tests/test-wcrtomb-w32.c
@@ -1,5 +1,5 @@
/* Test of conversion of wide character to multibyte character.
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
diff --git a/gnulib-tests/test-wcrtomb.c b/gnulib-tests/test-wcrtomb.c
index e1d2bb4..1458c76 100644
--- a/gnulib-tests/test-wcrtomb.c
+++ b/gnulib-tests/test-wcrtomb.c
@@ -1,5 +1,5 @@
/* Test of conversion of wide character to multibyte character.
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
diff --git a/gnulib-tests/test-wctype-h.c b/gnulib-tests/test-wctype-h.c
index b401091..6d1b2b6 100644
--- a/gnulib-tests/test-wctype-h.c
+++ b/gnulib-tests/test-wctype-h.c
@@ -1,5 +1,5 @@
/* Test of <wctype.h> substitute.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
diff --git a/gnulib-tests/test-wcwidth.c b/gnulib-tests/test-wcwidth.c
index 5a0d853..5290cf7 100644
--- a/gnulib-tests/test-wcwidth.c
+++ b/gnulib-tests/test-wcwidth.c
@@ -1,5 +1,5 @@
/* Test of wcwidth() function.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
@@ -26,6 +26,7 @@ SIGNATURE_CHECK (wcwidth, int, (wchar_t));
#include <locale.h>
#include <string.h>
+#include "c-ctype.h"
#include "localcharset.h"
#include "macros.h"
@@ -34,9 +35,11 @@ main ()
{
wchar_t wc;
+#ifdef C_CTYPE_ASCII
/* Test width of ASCII characters. */
for (wc = 0x20; wc < 0x7F; wc++)
ASSERT (wcwidth (wc) == 1);
+#endif
/* Switch to an UTF-8 locale. */
if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL
diff --git a/gnulib-tests/test-xalloc-die.c b/gnulib-tests/test-xalloc-die.c
index 9329750..66eb9a9 100644
--- a/gnulib-tests/test-xalloc-die.c
+++ b/gnulib-tests/test-xalloc-die.c
@@ -1,5 +1,5 @@
/* Test of xalloc_die() function.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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,12 +19,10 @@
#include <config.h>
#include "xalloc.h"
-#include "progname.h"
int
main (int argc _GL_UNUSED, char **argv)
{
- set_program_name (argv[0]);
xalloc_die ();
return 0;
}
diff --git a/gnulib-tests/test-xalloc-die.sh b/gnulib-tests/test-xalloc-die.sh
index fba601f..0538d9f 100755
--- a/gnulib-tests/test-xalloc-die.sh
+++ b/gnulib-tests/test-xalloc-die.sh
@@ -1,6 +1,6 @@
#!/bin/sh
# Test suite for xalloc_die.
-# Copyright (C) 2009-2016 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-xstrtol.c b/gnulib-tests/test-xstrtol.c
index fef45e5..6d7b4a0 100644
--- a/gnulib-tests/test-xstrtol.c
+++ b/gnulib-tests/test-xstrtol.c
@@ -1,5 +1,5 @@
/* Test of xstrtol module.
- Copyright (C) 1995-1996, 1998-2001, 2003-2016 Free Software Foundation, Inc.
+ Copyright (C) 1995-1996, 1998-2001, 2003-2017 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
@@ -29,8 +29,6 @@
# define __spec "ld"
#endif
-char *program_name;
-
/* Don't show the program name in error messages. */
static void
print_no_progname (void)
@@ -43,7 +41,6 @@ main (int argc, char **argv)
strtol_error s_err;
int i;
- program_name = argv[0];
error_print_progname = print_no_progname;
for (i = 1; i < argc; i++)
diff --git a/gnulib-tests/test-xvasprintf.c b/gnulib-tests/test-xvasprintf.c
index 985fe2e..922f4ce 100644
--- a/gnulib-tests/test-xvasprintf.c
+++ b/gnulib-tests/test-xvasprintf.c
@@ -1,5 +1,5 @@
/* Test of xvasprintf() and xasprintf() functions.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
@@ -31,7 +31,6 @@
#include <stdlib.h>
#include <string.h>
-#include "progname.h"
#include "macros.h"
static char *
@@ -129,8 +128,6 @@ test_xasprintf (void)
int
main (int argc _GL_UNUSED, char *argv[])
{
- set_program_name (argv[0]);
-
test_xvasprintf ();
test_xasprintf ();
diff --git a/gnulib-tests/timespec-add.c b/gnulib-tests/timespec-add.c
index b093946..e6c87c6 100644
--- a/gnulib-tests/timespec-add.c
+++ b/gnulib-tests/timespec-add.c
@@ -1,6 +1,6 @@
/* Add two struct timespec values.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/timespec-sub.c b/gnulib-tests/timespec-sub.c
index 63cc142..5d9276d 100644
--- a/gnulib-tests/timespec-sub.c
+++ b/gnulib-tests/timespec-sub.c
@@ -1,6 +1,6 @@
/* Subtract two struct timespec values.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gnulib-tests/unistr/test-u8-mbtoucr.c b/gnulib-tests/unistr/test-u8-mbtoucr.c
index 7a7b0b9..08bfdb4 100644
--- a/gnulib-tests/unistr/test-u8-mbtoucr.c
+++ b/gnulib-tests/unistr/test-u8-mbtoucr.c
@@ -1,5 +1,5 @@
/* Test of u8_mbtoucr() function.
- Copyright (C) 2010-2016 Free Software Foundation, Inc.
+ Copyright (C) 2010-2017 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
diff --git a/gnulib-tests/unistr/test-u8-uctomb.c b/gnulib-tests/unistr/test-u8-uctomb.c
index bbc9418..5c36fb9 100644
--- a/gnulib-tests/unistr/test-u8-uctomb.c
+++ b/gnulib-tests/unistr/test-u8-uctomb.c
@@ -1,5 +1,5 @@
/* Test of u8_uctomb() function.
- Copyright (C) 2010-2016 Free Software Foundation, Inc.
+ Copyright (C) 2010-2017 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
diff --git a/gnulib-tests/uniwidth/test-uc_width.c b/gnulib-tests/uniwidth/test-uc_width.c
index 8c248fa..6a3fafb 100644
--- a/gnulib-tests/uniwidth/test-uc_width.c
+++ b/gnulib-tests/uniwidth/test-uc_width.c
@@ -1,5 +1,5 @@
/* Test of uc_width() function.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
diff --git a/gnulib-tests/uniwidth/test-uc_width2.c b/gnulib-tests/uniwidth/test-uc_width2.c
index 60ef755..1792daf 100644
--- a/gnulib-tests/uniwidth/test-uc_width2.c
+++ b/gnulib-tests/uniwidth/test-uc_width2.c
@@ -1,5 +1,5 @@
/* Test of uc_width() function.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
diff --git a/gnulib-tests/unused-parameter.h b/gnulib-tests/unused-parameter.h
new file mode 100644
index 0000000..b300055
--- /dev/null
+++ b/gnulib-tests/unused-parameter.h
@@ -0,0 +1,36 @@
+/* A C macro for declaring that specific function parameters are not used.
+ Copyright (C) 2008-2017 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/>. */
+
+/* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter
+ declarations for parameters that are not used. This helps to reduce
+ warnings, such as from GCC -Wunused-parameter. The syntax is as follows:
+ type param _GL_UNUSED_PARAMETER
+ or more generally
+ param_decl _GL_UNUSED_PARAMETER
+ For example:
+ int param _GL_UNUSED_PARAMETER
+ int *(*param)(void) _GL_UNUSED_PARAMETER
+ Other possible, but obscure and discouraged syntaxes:
+ int _GL_UNUSED_PARAMETER *(*param)(void)
+ _GL_UNUSED_PARAMETER int *(*param)(void)
+ */
+#ifndef _GL_UNUSED_PARAMETER
+# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+# define _GL_UNUSED_PARAMETER __attribute__ ((__unused__))
+# else
+# define _GL_UNUSED_PARAMETER
+# endif
+#endif
diff --git a/gnulib-tests/w32sock.h b/gnulib-tests/w32sock.h
index c78b4bb..2f753fb 100644
--- a/gnulib-tests/w32sock.h
+++ b/gnulib-tests/w32sock.h
@@ -1,6 +1,6 @@
/* w32sock.h --- internal auxiliary functions for Windows socket functions
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
@@ -26,7 +26,11 @@
#include <io.h>
/* Get _get_osfhandle(). */
-#include "msvc-nothrow.h"
+#if GNULIB_MSVC_NOTHROW
+# include "msvc-nothrow.h"
+#else
+# include <io.h>
+#endif
#define FD_TO_SOCKET(fd) ((SOCKET) _get_osfhandle ((fd)))
#define SOCKET_TO_FD(fh) (_open_osfhandle ((intptr_t) (fh), O_RDWR | O_BINARY))
diff --git a/gnulib-tests/warn-on-use.h b/gnulib-tests/warn-on-use.h
new file mode 100644
index 0000000..3c0eb57
--- /dev/null
+++ b/gnulib-tests/warn-on-use.h
@@ -0,0 +1,109 @@
+/* A C macro for emitting warnings if a function is used.
+ Copyright (C) 2010-2017 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/>. */
+
+/* _GL_WARN_ON_USE (function, "literal string") issues a declaration
+ for FUNCTION which will then trigger a compiler warning containing
+ the text of "literal string" anywhere that function is called, if
+ supported by the compiler. If the compiler does not support this
+ feature, the macro expands to an unused extern declaration.
+
+ This macro is useful for marking a function as a potential
+ portability trap, with the intent that "literal string" include
+ instructions on the replacement function that should be used
+ instead. However, one of the reasons that a function is a
+ portability trap is if it has the wrong signature. Declaring
+ FUNCTION with a different signature in C is a compilation error, so
+ this macro must use the same type as any existing declaration so
+ that programs that avoid the problematic FUNCTION do not fail to
+ compile merely because they included a header that poisoned the
+ function. But this implies that _GL_WARN_ON_USE is only safe to
+ use if FUNCTION is known to already have a declaration. Use of
+ this macro implies that there must not be any other macro hiding
+ the declaration of FUNCTION; but undefining FUNCTION first is part
+ of the poisoning process anyway (although for symbols that are
+ provided only via a macro, the result is a compilation error rather
+ than a warning containing "literal string"). Also note that in
+ C++, it is only safe to use if FUNCTION has no overloads.
+
+ For an example, it is possible to poison 'getline' by:
+ - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
+ [getline]) in configure.ac, which potentially defines
+ HAVE_RAW_DECL_GETLINE
+ - adding this code to a header that wraps the system <stdio.h>:
+ #undef getline
+ #if HAVE_RAW_DECL_GETLINE
+ _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
+ "not universally present; use the gnulib module getline");
+ #endif
+
+ It is not possible to directly poison global variables. But it is
+ possible to write a wrapper accessor function, and poison that
+ (less common usage, like &environ, will cause a compilation error
+ rather than issue the nice warning, but the end result of informing
+ the developer about their portability problem is still achieved):
+ #if HAVE_RAW_DECL_ENVIRON
+ static char ***rpl_environ (void) { return &environ; }
+ _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
+ # undef environ
+ # define environ (*rpl_environ ())
+ #endif
+ */
+#ifndef _GL_WARN_ON_USE
+
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */
+# define _GL_WARN_ON_USE(function, message) \
+extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
+/* Verify the existence of the function. */
+# define _GL_WARN_ON_USE(function, message) \
+extern __typeof__ (function) function
+# else /* Unsupported. */
+# define _GL_WARN_ON_USE(function, message) \
+_GL_WARN_EXTERN_C int _gl_warn_on_use
+# endif
+#endif
+
+/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
+ is like _GL_WARN_ON_USE (function, "string"), except that the function is
+ declared with the given prototype, consisting of return type, parameters,
+ and attributes.
+ This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
+ not work in this case. */
+#ifndef _GL_WARN_ON_USE_CXX
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
+# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
+extern rettype function parameters_and_attributes \
+ __attribute__ ((__warning__ (msg)))
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
+/* Verify the existence of the function. */
+# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
+extern rettype function parameters_and_attributes
+# else /* Unsupported. */
+# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
+_GL_WARN_EXTERN_C int _gl_warn_on_use
+# endif
+#endif
+
+/* _GL_WARN_EXTERN_C declaration;
+ performs the declaration with C linkage. */
+#ifndef _GL_WARN_EXTERN_C
+# if defined __cplusplus
+# define _GL_WARN_EXTERN_C extern "C"
+# else
+# define _GL_WARN_EXTERN_C extern
+# endif
+#endif
diff --git a/gnulib-tests/wctob.c b/gnulib-tests/wctob.c
index 15e3ff3..ab320cf 100644
--- a/gnulib-tests/wctob.c
+++ b/gnulib-tests/wctob.c
@@ -1,5 +1,5 @@
/* Convert wide character to unibyte character.
- Copyright (C) 2008, 2010-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2010-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/wctomb-impl.h b/gnulib-tests/wctomb-impl.h
index a6ed971..f76b595 100644
--- a/gnulib-tests/wctomb-impl.h
+++ b/gnulib-tests/wctomb-impl.h
@@ -1,5 +1,5 @@
/* Convert wide character to multibyte character.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/wctomb.c b/gnulib-tests/wctomb.c
index f1d14f5..724ce4f 100644
--- a/gnulib-tests/wctomb.c
+++ b/gnulib-tests/wctomb.c
@@ -1,5 +1,5 @@
/* Convert wide character to multibyte character.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/zerosize-ptr.h b/gnulib-tests/zerosize-ptr.h
index e6ff672..e097ccd 100644
--- a/gnulib-tests/zerosize-ptr.h
+++ b/gnulib-tests/zerosize-ptr.h
@@ -1,5 +1,5 @@
/* Return a pointer to a zero-size object in memory.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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