summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClint Adams <clint@debian.org>2018-07-04 13:05:38 -0400
committerClint Adams <clint@debian.org>2018-07-04 13:05:38 -0400
commit9fd2c17dbb24ebf411e716c049edfeca2fbf5896 (patch)
tree5ebac07651dc713a392f2197b98c23bb4b6006c5
parentad413d135e389462b526c62385591ad68c3c71e8 (diff)
parent117dcd10d7e04d0dda7668518b8d085027f4d705 (diff)
Update upstream source from tag 'upstream/4.5'
Update to upstream version '4.5' with Debian dir 13428ca9a53e474ef6a06bdd6317254f54f740d7
-rw-r--r--.tarball-version2
-rw-r--r--.version2
-rw-r--r--COPYING8
-rw-r--r--ChangeLog1011
-rw-r--r--GNUmakefile4
-rw-r--r--Makefile.am10
-rw-r--r--Makefile.in2129
-rw-r--r--NEWS30
-rw-r--r--README-release100
-rw-r--r--THANKS6
-rw-r--r--aclocal.m4184
-rw-r--r--basicdefs.h2
-rwxr-xr-xbootstrap14
-rw-r--r--bootstrap.conf13
-rwxr-xr-xbuild-aux/announce-gen14
-rwxr-xr-xbuild-aux/config.guess580
-rwxr-xr-xbuild-aux/config.rpath2
-rwxr-xr-xbuild-aux/config.sub255
-rwxr-xr-xbuild-aux/depcomp43
-rwxr-xr-xbuild-aux/do-release-commit-and-tag10
-rwxr-xr-xbuild-aux/gendocs.sh20
-rwxr-xr-xbuild-aux/git-version-gen23
-rwxr-xr-xbuild-aux/gitlog-to-changelog10
-rwxr-xr-xbuild-aux/gnu-web-doc-update14
-rwxr-xr-xbuild-aux/gnupload12
-rwxr-xr-xbuild-aux/help2man2
-rwxr-xr-xbuild-aux/install-sh45
-rwxr-xr-xbuild-aux/mdate-sh12
-rwxr-xr-xbuild-aux/missing14
-rwxr-xr-xbuild-aux/prefix-gnulib-mk2
-rwxr-xr-xbuild-aux/test-driver8
-rw-r--r--build-aux/texinfo.tex270
-rwxr-xr-xbuild-aux/update-copyright13
-rwxr-xr-xbuild-aux/useless-if-before-free10
-rwxr-xr-xbuild-aux/vc-list-files12
-rw-r--r--config_h.in501
-rwxr-xr-xconfigure7260
-rw-r--r--configure.ac23
-rw-r--r--doc/config.texi36
-rw-r--r--doc/fdl.texi4
-rw-r--r--doc/local.mk4
-rw-r--r--doc/sed-dummy.14
-rw-r--r--doc/sed.118
-rw-r--r--doc/sed.info657
-rw-r--r--doc/sed.texi591
-rw-r--r--doc/sed.x2
-rw-r--r--doc/stamp-vti8
-rw-r--r--doc/version.texi8
-rw-r--r--gnulib-tests/Makefile.in1739
-rw-r--r--gnulib-tests/_Noreturn.h (renamed from build-aux/snippet/_Noreturn.h)0
-rw-r--r--gnulib-tests/accept.c52
-rw-r--r--gnulib-tests/arg-nonnull.h (renamed from build-aux/snippet/arg-nonnull.h)4
-rw-r--r--gnulib-tests/arpa_inet.in.h140
-rw-r--r--gnulib-tests/binary-io.c35
-rw-r--r--gnulib-tests/binary-io.h42
-rw-r--r--gnulib-tests/bind.c49
-rw-r--r--gnulib-tests/c++defs.h (renamed from build-aux/snippet/c++defs.h)8
-rw-r--r--gnulib-tests/cloexec.c83
-rw-r--r--gnulib-tests/cloexec.h38
-rw-r--r--gnulib-tests/close.c8
-rw-r--r--gnulib-tests/closedir.c4
-rw-r--r--gnulib-tests/connect.c56
-rwxr-xr-xgnulib-tests/dfa-invalid-char-class.sh4
-rw-r--r--gnulib-tests/dfa-match-aux.c2
-rwxr-xr-xgnulib-tests/dfa-match.sh4
-rw-r--r--gnulib-tests/dirent-private.h4
-rw-r--r--gnulib-tests/dirent.in.h4
-rw-r--r--gnulib-tests/dirfd.c4
-rw-r--r--gnulib-tests/dup2.c50
-rw-r--r--gnulib-tests/fcntl.c418
-rw-r--r--gnulib-tests/fd-hook.c6
-rw-r--r--gnulib-tests/fd-hook.h6
-rw-r--r--gnulib-tests/fdopen.c4
-rw-r--r--gnulib-tests/fflush.c15
-rw-r--r--gnulib-tests/file-has-acl.c4
-rw-r--r--gnulib-tests/flexmember.h23
-rw-r--r--gnulib-tests/fpurge.c9
-rw-r--r--gnulib-tests/freading.c11
-rw-r--r--gnulib-tests/freading.h4
-rw-r--r--gnulib-tests/fseek.c4
-rw-r--r--gnulib-tests/fseeko.c14
-rw-r--r--gnulib-tests/ftell.c4
-rw-r--r--gnulib-tests/ftello.c4
-rw-r--r--gnulib-tests/ftruncate.c193
-rw-r--r--gnulib-tests/getcwd-lgpl.c4
-rw-r--r--gnulib-tests/getdtablesize.c17
-rw-r--r--gnulib-tests/getpagesize.c4
-rw-r--r--gnulib-tests/gnulib.mk793
-rw-r--r--gnulib-tests/inet_pton.c268
-rw-r--r--gnulib-tests/init.sh27
-rw-r--r--gnulib-tests/inttypes.in.h4
-rw-r--r--gnulib-tests/ioctl.c92
-rw-r--r--gnulib-tests/link.c4
-rw-r--r--gnulib-tests/listen.c49
-rw-r--r--gnulib-tests/localename.c51
-rw-r--r--gnulib-tests/localename.h4
-rw-r--r--gnulib-tests/lseek.c10
-rw-r--r--gnulib-tests/macros.h12
-rw-r--r--gnulib-tests/nanosleep.c276
-rw-r--r--gnulib-tests/nap.h155
-rw-r--r--gnulib-tests/netinet_in.in.h47
-rw-r--r--gnulib-tests/null-ptr.h33
-rw-r--r--gnulib-tests/open.c33
-rw-r--r--gnulib-tests/opendir.c4
-rw-r--r--gnulib-tests/perror.c49
-rw-r--r--gnulib-tests/pipe.c50
-rw-r--r--gnulib-tests/putenv.c4
-rw-r--r--gnulib-tests/raise.c81
-rw-r--r--gnulib-tests/read-file.c4
-rw-r--r--gnulib-tests/read-file.h4
-rw-r--r--gnulib-tests/readdir.c4
-rw-r--r--gnulib-tests/realloc.c4
-rw-r--r--gnulib-tests/select.c579
-rw-r--r--gnulib-tests/setenv.c4
-rw-r--r--gnulib-tests/setlocale.c11
-rw-r--r--gnulib-tests/setsockopt.c65
-rw-r--r--gnulib-tests/sig-handler.c3
-rw-r--r--gnulib-tests/sig-handler.h54
-rw-r--r--gnulib-tests/sigaction.c204
-rw-r--r--gnulib-tests/signal.in.h463
-rw-r--r--gnulib-tests/signature.h4
-rw-r--r--gnulib-tests/sigprocmask.c349
-rw-r--r--gnulib-tests/sleep.c76
-rw-r--r--gnulib-tests/socket.c49
-rw-r--r--gnulib-tests/sockets.c161
-rw-r--r--gnulib-tests/sockets.h66
-rw-r--r--gnulib-tests/stdio-impl.h22
-rw-r--r--gnulib-tests/strdup.c4
-rw-r--r--gnulib-tests/strerror_r.c460
-rw-r--r--gnulib-tests/symlink.c4
-rw-r--r--gnulib-tests/sys_ioctl.in.h79
-rw-r--r--gnulib-tests/sys_select.in.h319
-rw-r--r--gnulib-tests/sys_socket.c4
-rw-r--r--gnulib-tests/sys_socket.in.h706
-rw-r--r--gnulib-tests/sys_uio.in.h63
-rw-r--r--gnulib-tests/test-accept.c56
-rw-r--r--gnulib-tests/test-alignof.c4
-rw-r--r--gnulib-tests/test-alloca-opt.c4
-rw-r--r--gnulib-tests/test-arpa_inet.c27
-rw-r--r--gnulib-tests/test-binary-io.c10
-rwxr-xr-xgnulib-tests/test-binary-io.sh4
-rw-r--r--gnulib-tests/test-bind.c58
-rw-r--r--gnulib-tests/test-btowc.c4
-rw-r--r--gnulib-tests/test-c-ctype.c4
-rw-r--r--gnulib-tests/test-c-strcasecmp.c4
-rw-r--r--gnulib-tests/test-c-strncasecmp.c4
-rw-r--r--gnulib-tests/test-canonicalize-lgpl.c12
-rw-r--r--gnulib-tests/test-chdir.c4
-rw-r--r--gnulib-tests/test-cloexec.c148
-rw-r--r--gnulib-tests/test-close.c4
-rw-r--r--gnulib-tests/test-connect.c60
-rw-r--r--gnulib-tests/test-copy-acl.c4
-rw-r--r--gnulib-tests/test-ctype.c4
-rw-r--r--gnulib-tests/test-dirent.c4
-rw-r--r--gnulib-tests/test-dup2.c10
-rw-r--r--gnulib-tests/test-environ.c4
-rw-r--r--gnulib-tests/test-errno.c4
-rw-r--r--gnulib-tests/test-fcntl-h.c4
-rw-r--r--gnulib-tests/test-fcntl.c414
-rw-r--r--gnulib-tests/test-fdopen.c4
-rw-r--r--gnulib-tests/test-fflush.c4
-rw-r--r--gnulib-tests/test-fflush2.c10
-rw-r--r--gnulib-tests/test-fgetc.c8
-rw-r--r--gnulib-tests/test-file-has-acl.c4
-rw-r--r--gnulib-tests/test-fpending.c4
-rw-r--r--gnulib-tests/test-fpurge.c4
-rw-r--r--gnulib-tests/test-fputc.c8
-rw-r--r--gnulib-tests/test-fread.c8
-rw-r--r--gnulib-tests/test-freading.c4
-rw-r--r--gnulib-tests/test-fseek.c4
-rw-r--r--gnulib-tests/test-fseeko.c4
-rw-r--r--gnulib-tests/test-fseeko3.c4
-rw-r--r--gnulib-tests/test-fseeko4.c4
-rw-r--r--gnulib-tests/test-fstat.c4
-rw-r--r--gnulib-tests/test-ftell.c6
-rw-r--r--gnulib-tests/test-ftell3.c4
-rw-r--r--gnulib-tests/test-ftello.c6
-rw-r--r--gnulib-tests/test-ftello3.c4
-rw-r--r--gnulib-tests/test-ftello4.c4
-rw-r--r--gnulib-tests/test-ftruncate.c60
-rwxr-xr-xgnulib-tests/test-ftruncate.sh3
-rw-r--r--gnulib-tests/test-fwrite.c8
-rw-r--r--gnulib-tests/test-fwriting.c4
-rw-r--r--gnulib-tests/test-getcwd-lgpl.c4
-rw-r--r--gnulib-tests/test-getdelim.c4
-rw-r--r--gnulib-tests/test-getdtablesize.c4
-rw-r--r--gnulib-tests/test-getopt-gnu.c4
-rw-r--r--gnulib-tests/test-getopt-main.h4
-rw-r--r--gnulib-tests/test-getopt-posix.c4
-rw-r--r--gnulib-tests/test-getopt.h8
-rw-r--r--gnulib-tests/test-getopt_long.h10
-rw-r--r--gnulib-tests/test-getprogname.c4
-rw-r--r--gnulib-tests/test-gettimeofday.c4
-rw-r--r--gnulib-tests/test-ignore-value.c4
-rw-r--r--gnulib-tests/test-inet_pton.c58
-rwxr-xr-xgnulib-tests/test-init.sh4
-rw-r--r--gnulib-tests/test-intprops.c27
-rw-r--r--gnulib-tests/test-inttypes.c4
-rw-r--r--gnulib-tests/test-ioctl.c51
-rw-r--r--gnulib-tests/test-isblank.c4
-rw-r--r--gnulib-tests/test-langinfo.c4
-rw-r--r--gnulib-tests/test-limits-h.c4
-rw-r--r--gnulib-tests/test-link.c4
-rw-r--r--gnulib-tests/test-link.h4
-rw-r--r--gnulib-tests/test-listen.c49
-rw-r--r--gnulib-tests/test-locale.c4
-rw-r--r--gnulib-tests/test-localeconv.c8
-rw-r--r--gnulib-tests/test-localename.c4
-rw-r--r--gnulib-tests/test-lseek.c4
-rw-r--r--gnulib-tests/test-lstat.c4
-rw-r--r--gnulib-tests/test-lstat.h4
-rw-r--r--gnulib-tests/test-malloca.c4
-rw-r--r--gnulib-tests/test-mbrtowc-w32.c22
-rw-r--r--gnulib-tests/test-mbrtowc.c16
-rw-r--r--gnulib-tests/test-mbsinit.c4
-rw-r--r--gnulib-tests/test-memchr.c4
-rw-r--r--gnulib-tests/test-memrchr.c4
-rw-r--r--gnulib-tests/test-nanosleep.c83
-rw-r--r--gnulib-tests/test-netinet_in.c27
-rw-r--r--gnulib-tests/test-nl_langinfo.c30
-rw-r--r--gnulib-tests/test-open.c4
-rw-r--r--gnulib-tests/test-open.h4
-rw-r--r--gnulib-tests/test-pathmax.c4
-rw-r--r--gnulib-tests/test-perror.c36
-rwxr-xr-xgnulib-tests/test-perror.sh26
-rw-r--r--gnulib-tests/test-perror2.c136
-rw-r--r--gnulib-tests/test-pipe.c108
-rw-r--r--gnulib-tests/test-quotearg-simple.c4
-rw-r--r--gnulib-tests/test-quotearg.h4
-rw-r--r--gnulib-tests/test-raise.c50
-rw-r--r--gnulib-tests/test-read-file.c4
-rw-r--r--gnulib-tests/test-readlink.c4
-rw-r--r--gnulib-tests/test-readlink.h4
-rw-r--r--gnulib-tests/test-regex.c10
-rw-r--r--gnulib-tests/test-rename.c4
-rw-r--r--gnulib-tests/test-rename.h24
-rw-r--r--gnulib-tests/test-rmdir.c4
-rw-r--r--gnulib-tests/test-rmdir.h4
-rw-r--r--gnulib-tests/test-sameacls.c4
-rw-r--r--gnulib-tests/test-select-fd.c72
-rwxr-xr-xgnulib-tests/test-select-in.sh38
-rwxr-xr-xgnulib-tests/test-select-out.sh35
-rw-r--r--gnulib-tests/test-select-stdin.c83
-rw-r--r--gnulib-tests/test-select.c34
-rw-r--r--gnulib-tests/test-select.h462
-rw-r--r--gnulib-tests/test-set-mode-acl.c4
-rw-r--r--gnulib-tests/test-setenv.c4
-rw-r--r--gnulib-tests/test-setlocale1.c4
-rw-r--r--gnulib-tests/test-setlocale2.c4
-rwxr-xr-xgnulib-tests/test-setlocale2.sh2
-rw-r--r--gnulib-tests/test-setsockopt.c55
-rw-r--r--gnulib-tests/test-sigaction.c122
-rw-r--r--gnulib-tests/test-signal-h.c129
-rw-r--r--gnulib-tests/test-sigprocmask.c102
-rw-r--r--gnulib-tests/test-sleep.c58
-rw-r--r--gnulib-tests/test-sockets.c46
-rw-r--r--gnulib-tests/test-stat-time.c248
-rw-r--r--gnulib-tests/test-stat.c4
-rw-r--r--gnulib-tests/test-stat.h4
-rw-r--r--gnulib-tests/test-stdalign.c9
-rw-r--r--gnulib-tests/test-stdbool.c10
-rw-r--r--gnulib-tests/test-stddef.c10
-rw-r--r--gnulib-tests/test-stdint.c4
-rw-r--r--gnulib-tests/test-stdio.c4
-rw-r--r--gnulib-tests/test-stdlib.c4
-rw-r--r--gnulib-tests/test-strerror.c4
-rw-r--r--gnulib-tests/test-strerror_r.c181
-rw-r--r--gnulib-tests/test-string.c4
-rw-r--r--gnulib-tests/test-strverscmp.c4
-rw-r--r--gnulib-tests/test-symlink.c4
-rw-r--r--gnulib-tests/test-symlink.h4
-rw-r--r--gnulib-tests/test-sys_ioctl.c27
-rw-r--r--gnulib-tests/test-sys_select.c59
-rw-r--r--gnulib-tests/test-sys_socket.c68
-rw-r--r--gnulib-tests/test-sys_stat.c4
-rw-r--r--gnulib-tests/test-sys_time.c4
-rw-r--r--gnulib-tests/test-sys_types.c4
-rw-r--r--gnulib-tests/test-sys_uio.c32
-rw-r--r--gnulib-tests/test-sys_wait.h4
-rw-r--r--gnulib-tests/test-time.c4
-rw-r--r--gnulib-tests/test-unistd.c4
-rw-r--r--gnulib-tests/test-unsetenv.c4
-rwxr-xr-xgnulib-tests/test-update-copyright.sh4
-rwxr-xr-xgnulib-tests/test-vc-list-files-cvs.sh4
-rwxr-xr-xgnulib-tests/test-vc-list-files-git.sh4
-rw-r--r--gnulib-tests/test-verify-try.c21
-rw-r--r--gnulib-tests/test-verify.c4
-rwxr-xr-xgnulib-tests/test-verify.sh9
-rw-r--r--gnulib-tests/test-version-etc.c4
-rwxr-xr-xgnulib-tests/test-version-etc.sh12
-rw-r--r--gnulib-tests/test-wchar.c4
-rw-r--r--gnulib-tests/test-wcrtomb-w32.c4
-rw-r--r--gnulib-tests/test-wcrtomb.c4
-rw-r--r--gnulib-tests/test-wctype-h.c4
-rw-r--r--gnulib-tests/test-xalloc-die.c4
-rwxr-xr-xgnulib-tests/test-xalloc-die.sh4
-rw-r--r--gnulib-tests/unsetenv.c4
-rw-r--r--gnulib-tests/unused-parameter.h (renamed from build-aux/snippet/unused-parameter.h)4
-rw-r--r--gnulib-tests/w32sock.h140
-rw-r--r--gnulib-tests/warn-on-use.h (renamed from build-aux/snippet/warn-on-use.h)4
-rw-r--r--gnulib-tests/zerosize-ptr.h4
-rw-r--r--init.cfg80
-rw-r--r--lib/_Noreturn.h10
-rw-r--r--lib/acl-errno-valid.c4
-rw-r--r--lib/acl-internal.c4
-rw-r--r--lib/acl-internal.h4
-rw-r--r--lib/acl.h4
-rw-r--r--lib/acl_entries.c4
-rw-r--r--lib/alignof.h4
-rw-r--r--lib/alloca.in.h4
-rw-r--r--lib/arg-nonnull.h26
-rw-r--r--lib/basename-lgpl.c4
-rw-r--r--lib/btowc.c4
-rw-r--r--lib/c++defs.h316
-rw-r--r--lib/c-ctype.h4
-rw-r--r--lib/c-strcase.h4
-rw-r--r--lib/c-strcasecmp.c4
-rw-r--r--lib/c-strcaseeq.h4
-rw-r--r--lib/c-strncasecmp.c4
-rw-r--r--lib/canonicalize-lgpl.c14
-rw-r--r--lib/close-stream.c4
-rw-r--r--lib/closeout.c20
-rw-r--r--lib/closeout.h4
-rw-r--r--lib/config.charset4
-rw-r--r--lib/copy-acl.c4
-rw-r--r--lib/ctype.in.h4
-rw-r--r--lib/dfa.c61
-rw-r--r--lib/dfa.h2
-rw-r--r--lib/dirname-lgpl.c4
-rw-r--r--lib/dirname.h4
-rw-r--r--lib/dosname.h4
-rw-r--r--lib/errno.in.h4
-rw-r--r--lib/error.c27
-rw-r--r--lib/error.h4
-rw-r--r--lib/exitfail.c4
-rw-r--r--lib/exitfail.h4
-rw-r--r--lib/fcntl.in.h9
-rw-r--r--lib/filename.h (renamed from gnulib-tests/filename.h)4
-rw-r--r--lib/fpending.c11
-rw-r--r--lib/fpending.h4
-rw-r--r--lib/fstat.c72
-rw-r--r--lib/fwriting.c9
-rw-r--r--lib/fwriting.h4
-rw-r--r--lib/get-permissions.c4
-rw-r--r--lib/getdelim.c6
-rw-r--r--lib/getfilecon.c4
-rw-r--r--lib/getopt-cdefs.in.h67
-rw-r--r--lib/getopt-core.h96
-rw-r--r--lib/getopt-ext.h77
-rw-r--r--lib/getopt-pfx-core.h59
-rw-r--r--lib/getopt-pfx-ext.h71
-rw-r--r--lib/getopt.c1470
-rw-r--r--lib/getopt.in.h258
-rw-r--r--lib/getopt1.c179
-rw-r--r--lib/getopt_int.h91
-rw-r--r--lib/getprogname.c22
-rw-r--r--lib/getprogname.h4
-rw-r--r--lib/gettext.h12
-rw-r--r--lib/gettimeofday.c158
-rw-r--r--lib/glthread/lock.c6
-rw-r--r--lib/glthread/lock.h24
-rw-r--r--lib/glthread/threadlib.c4
-rw-r--r--lib/gnulib.mk209
-rw-r--r--lib/hard-locale.c4
-rw-r--r--lib/hard-locale.h4
-rw-r--r--lib/ignore-value.h4
-rw-r--r--lib/intprops.h81
-rw-r--r--lib/isblank.c4
-rw-r--r--lib/langinfo.in.h32
-rw-r--r--lib/limits.in.h15
-rw-r--r--lib/local.mk4
-rw-r--r--lib/localcharset.c14
-rw-r--r--lib/localcharset.h4
-rw-r--r--lib/locale.in.h4
-rw-r--r--lib/localeconv.c4
-rw-r--r--lib/localeinfo.c2
-rw-r--r--lib/localeinfo.h2
-rw-r--r--lib/localtime-buffer.c58
-rw-r--r--lib/localtime-buffer.h27
-rw-r--r--lib/lstat.c43
-rw-r--r--lib/malloc.c4
-rw-r--r--lib/malloca.c140
-rw-r--r--lib/malloca.h15
-rw-r--r--lib/malloca.valgrind7
-rw-r--r--lib/mbrlen.c4
-rw-r--r--lib/mbrtowc.c17
-rw-r--r--lib/mbsinit.c38
-rw-r--r--lib/mbtowc-impl.h4
-rw-r--r--lib/mbtowc.c4
-rw-r--r--lib/memchr.c4
-rw-r--r--lib/memrchr.c4
-rw-r--r--lib/minmax.h4
-rw-r--r--lib/mkostemp.c4
-rw-r--r--lib/msvc-inval.c4
-rw-r--r--lib/msvc-inval.h8
-rw-r--r--lib/msvc-nothrow.c8
-rw-r--r--lib/msvc-nothrow.h4
-rw-r--r--lib/nl_langinfo.c85
-rw-r--r--lib/obstack.c4
-rw-r--r--lib/obstack.h4
-rw-r--r--lib/pathmax.h6
-rw-r--r--lib/progname.c4
-rw-r--r--lib/progname.h4
-rw-r--r--lib/qcopy-acl.c4
-rw-r--r--lib/qset-acl.c4
-rw-r--r--lib/quote.h4
-rw-r--r--lib/quotearg.c40
-rw-r--r--lib/quotearg.h4
-rw-r--r--lib/readlink.c4
-rw-r--r--lib/ref-add.sin4
-rw-r--r--lib/ref-del.sin4
-rw-r--r--lib/regcomp.c43
-rw-r--r--lib/regex.c4
-rw-r--r--lib/regex.h4
-rw-r--r--lib/regex_internal.c63
-rw-r--r--lib/regex_internal.h35
-rw-r--r--lib/regexec.c234
-rw-r--r--lib/rename.c4
-rw-r--r--lib/rmdir.c4
-rw-r--r--lib/same-inode.h22
-rw-r--r--lib/se-selinux.in.h30
-rw-r--r--lib/secure_getenv.c54
-rw-r--r--lib/set-acl.c4
-rw-r--r--lib/set-permissions.c4
-rw-r--r--lib/stat-time.c3
-rw-r--r--lib/stat-time.h252
-rw-r--r--lib/stat-w32.c421
-rw-r--r--lib/stat-w32.h37
-rw-r--r--lib/stat.c419
-rw-r--r--lib/stdalign.in.h8
-rw-r--r--lib/stdarg.in.h4
-rw-r--r--lib/stdbool.in.h10
-rw-r--r--lib/stddef.in.h22
-rw-r--r--lib/stdint.in.h47
-rw-r--r--lib/stdio-impl.h22
-rw-r--r--lib/stdio.in.h12
-rw-r--r--lib/stdlib.in.h28
-rw-r--r--lib/streq.h4
-rw-r--r--lib/strerror-override.c4
-rw-r--r--lib/strerror-override.h4
-rw-r--r--lib/strerror.c4
-rw-r--r--lib/string.in.h21
-rw-r--r--lib/stripslash.c4
-rw-r--r--lib/strverscmp.c4
-rw-r--r--lib/sys_stat.in.h182
-rw-r--r--lib/sys_time.in.h4
-rw-r--r--lib/sys_types.in.h46
-rw-r--r--lib/tempname.c7
-rw-r--r--lib/tempname.h4
-rw-r--r--lib/time.in.h61
-rw-r--r--lib/unistd.in.h84
-rw-r--r--lib/unlocked-io.h4
-rw-r--r--lib/unused-parameter.h36
-rw-r--r--lib/verify.h4
-rw-r--r--lib/version-etc-fsf.c4
-rw-r--r--lib/version-etc.c12
-rw-r--r--lib/version-etc.h4
-rw-r--r--lib/warn-on-use.h109
-rw-r--r--lib/wchar.in.h55
-rw-r--r--lib/wcrtomb.c4
-rw-r--r--lib/wctob.c4
-rw-r--r--lib/wctomb-impl.h4
-rw-r--r--lib/wctomb.c4
-rw-r--r--lib/wctype.in.h26
-rw-r--r--lib/xalloc-die.c4
-rw-r--r--lib/xalloc-oversized.h6
-rw-r--r--lib/xalloc.h6
-rw-r--r--lib/xmalloc.c4
-rw-r--r--m4/00gnulib.m42
-rw-r--r--m4/absolute-header.m42
-rw-r--r--m4/acl.m42
-rw-r--r--m4/alloca.m46
-rw-r--r--m4/arpa_inet_h.m457
-rw-r--r--m4/asm-underscore.m472
-rw-r--r--m4/assert.m42
-rw-r--r--m4/btowc.m418
-rw-r--r--m4/builtin-expect.m42
-rw-r--r--m4/canonicalize.m46
-rw-r--r--m4/close-stream.m42
-rw-r--r--m4/close.m414
-rw-r--r--m4/closedir.m45
-rw-r--r--m4/closeout.m42
-rw-r--r--m4/configmake.m42
-rw-r--r--m4/ctype.m42
-rw-r--r--m4/dirent_h.m42
-rw-r--r--m4/dirfd.m411
-rw-r--r--m4/dirname.m42
-rw-r--r--m4/double-slash-root.m42
-rw-r--r--m4/dup2.m42
-rw-r--r--m4/eealloc.m42
-rw-r--r--m4/environ.m42
-rw-r--r--m4/errno_h.m42
-rw-r--r--m4/error.m42
-rw-r--r--m4/extensions.m420
-rw-r--r--m4/extern-inline.m410
-rw-r--r--m4/fcntl-o.m413
-rw-r--r--m4/fcntl.m4126
-rw-r--r--m4/fcntl_h.m42
-rw-r--r--m4/fdopen.m415
-rw-r--r--m4/fflush.m444
-rw-r--r--m4/flexmember.m49
-rw-r--r--m4/fpending.m42
-rw-r--r--m4/fpurge.m455
-rw-r--r--m4/freading.m42
-rw-r--r--m4/fseek.m42
-rw-r--r--m4/fseeko.m411
-rw-r--r--m4/fstat.m429
-rw-r--r--m4/ftell.m42
-rw-r--r--m4/ftello.m426
-rw-r--r--m4/ftruncate.m440
-rw-r--r--m4/fwriting.m42
-rw-r--r--m4/getcwd.m420
-rw-r--r--m4/getdelim.m48
-rw-r--r--m4/getdtablesize.m456
-rw-r--r--m4/getopt.m431
-rw-r--r--m4/getpagesize.m42
-rw-r--r--m4/getprogname.m42
-rw-r--r--m4/gettimeofday.m448
-rw-r--r--m4/glibc21.m42
-rw-r--r--m4/gnulib-common.m421
-rw-r--r--m4/gnulib-comp.m4368
-rw-r--r--m4/hard-locale.m42
-rw-r--r--m4/host-cpu-c-abi.m4456
-rw-r--r--m4/include_next.m47
-rw-r--r--m4/inet_pton.m469
-rw-r--r--m4/inttypes-pri.m42
-rw-r--r--m4/inttypes.m42
-rw-r--r--m4/ioctl.m444
-rw-r--r--m4/isblank.m42
-rw-r--r--m4/langinfo_h.m419
-rw-r--r--m4/largefile.m423
-rw-r--r--m4/lib-ld.m4163
-rw-r--r--m4/lib-link.m44
-rw-r--r--m4/lib-prefix.m4129
-rw-r--r--m4/limits-h.m42
-rw-r--r--m4/link.m412
-rw-r--r--m4/localcharset.m42
-rw-r--r--m4/locale-fr.m429
-rw-r--r--m4/locale-ja.m439
-rw-r--r--m4/locale-tr.m42
-rw-r--r--m4/locale-zh.m439
-rw-r--r--m4/locale_h.m46
-rw-r--r--m4/localeconv.m42
-rw-r--r--m4/localename.m45
-rw-r--r--m4/localtime-buffer.m421
-rw-r--r--m4/lock.m42
-rw-r--r--m4/longlong.m42
-rw-r--r--m4/lseek.m42
-rw-r--r--m4/lstat.m415
-rw-r--r--m4/malloc.m48
-rw-r--r--m4/malloca.m42
-rw-r--r--m4/manywarnings.m465
-rw-r--r--m4/mbrlen.m411
-rw-r--r--m4/mbrtowc.m427
-rw-r--r--m4/mbsinit.m42
-rw-r--r--m4/mbstate_t.m42
-rw-r--r--m4/mbtowc.m42
-rw-r--r--m4/memchr.m433
-rw-r--r--m4/memrchr.m42
-rw-r--r--m4/minmax.m42
-rw-r--r--m4/mkostemp.m42
-rw-r--r--m4/mmap-anon.m42
-rw-r--r--m4/mode_t.m42
-rw-r--r--m4/msvc-inval.m42
-rw-r--r--m4/msvc-nothrow.m42
-rw-r--r--m4/multiarch.m42
-rw-r--r--m4/nanosleep.m4150
-rw-r--r--m4/netinet_in_h.m431
-rw-r--r--m4/nl_langinfo.m411
-rw-r--r--m4/nocrash.m42
-rw-r--r--m4/non-recursive-gnulib-prefix-hack.m42
-rw-r--r--m4/obstack.m42
-rw-r--r--m4/off_t.m42
-rw-r--r--m4/open-cloexec.m421
-rw-r--r--m4/open.m48
-rw-r--r--m4/opendir.m45
-rw-r--r--m4/pathmax.m42
-rw-r--r--m4/perror.m469
-rw-r--r--m4/pipe.m415
-rw-r--r--m4/pthread_rwlock_rdlock.m42
-rw-r--r--m4/putenv.m414
-rw-r--r--m4/quote.m42
-rw-r--r--m4/quotearg.m42
-rw-r--r--m4/raise.m436
-rw-r--r--m4/read-file.m42
-rw-r--r--m4/readdir.m42
-rw-r--r--m4/readlink.m412
-rw-r--r--m4/realloc.m48
-rw-r--r--m4/regex.m431
-rw-r--r--m4/rename.m433
-rw-r--r--m4/rmdir.m414
-rw-r--r--m4/secure_getenv.m426
-rw-r--r--m4/select.m4114
-rw-r--r--m4/selinux-context-h.m42
-rw-r--r--m4/selinux-selinux-h.m42
-rw-r--r--m4/setenv.m412
-rw-r--r--m4/setlocale.m42
-rw-r--r--m4/sigaction.m440
-rw-r--r--m4/signal_h.m483
-rw-r--r--m4/signalblocking.m425
-rw-r--r--m4/sleep.m464
-rw-r--r--m4/socketlib.m490
-rw-r--r--m4/sockets.m417
-rw-r--r--m4/socklen.m477
-rw-r--r--m4/sockpfaf.m487
-rw-r--r--m4/ssize_t.m42
-rw-r--r--m4/stat-time.m483
-rw-r--r--m4/stat.m4111
-rw-r--r--m4/std-gnu11.m48
-rw-r--r--m4/stdalign.m48
-rw-r--r--m4/stdarg.m42
-rw-r--r--m4/stdbool.m46
-rw-r--r--m4/stddef_h.m42
-rw-r--r--m4/stdint.m4110
-rw-r--r--m4/stdio_h.m42
-rw-r--r--m4/stdlib_h.m417
-rw-r--r--m4/strdup.m42
-rw-r--r--m4/strerror.m422
-rw-r--r--m4/strerror_r.m4173
-rw-r--r--m4/string_h.m416
-rw-r--r--m4/strverscmp.m42
-rw-r--r--m4/symlink.m412
-rw-r--r--m4/sys_ioctl_h.m464
-rw-r--r--m4/sys_select_h.m495
-rw-r--r--m4/sys_socket_h.m42
-rw-r--r--m4/sys_stat_h.m420
-rw-r--r--m4/sys_time_h.m45
-rw-r--r--m4/sys_types_h.m419
-rw-r--r--m4/sys_uio_h.m431
-rw-r--r--m4/tempname.m42
-rw-r--r--m4/threadlib.m412
-rw-r--r--m4/time_h.m414
-rw-r--r--m4/ungetc.m451
-rw-r--r--m4/unistd_h.m412
-rw-r--r--m4/unlocked-io.m42
-rw-r--r--m4/version-etc.m42
-rw-r--r--m4/warn-on-use.m42
-rw-r--r--m4/warnings.m460
-rw-r--r--m4/wchar_h.m417
-rw-r--r--m4/wchar_t.m42
-rw-r--r--m4/wcrtomb.m46
-rw-r--r--m4/wctob.m49
-rw-r--r--m4/wctomb.m42
-rw-r--r--m4/wctype_h.m49
-rw-r--r--m4/wint_t.m416
-rw-r--r--m4/xalloc.m42
-rw-r--r--maint.mk23
-rw-r--r--po/Makefile.in.in4
-rw-r--r--po/af.gmobin2980 -> 2980 bytes
-rw-r--r--po/af.po125
-rw-r--r--po/ast.gmobin8685 -> 8685 bytes
-rw-r--r--po/ast.po125
-rw-r--r--po/bg.gmobin20003 -> 19502 bytes
-rw-r--r--po/bg.po157
-rw-r--r--po/ca.gmobin9210 -> 8934 bytes
-rw-r--r--po/ca.po127
-rw-r--r--po/cs.gmobin10084 -> 15585 bytes
-rw-r--r--po/cs.po282
-rw-r--r--po/da.gmobin9471 -> 12931 bytes
-rw-r--r--po/da.po293
-rw-r--r--po/de.gmobin14480 -> 12615 bytes
-rw-r--r--po/de.po160
-rw-r--r--po/el.gmobin11966 -> 11648 bytes
-rw-r--r--po/el.po127
-rw-r--r--po/eo.gmobin15127 -> 12981 bytes
-rw-r--r--po/eo.po164
-rw-r--r--po/es.gmobin9401 -> 15385 bytes
-rw-r--r--po/es.po316
-rw-r--r--po/et.gmobin14676 -> 12607 bytes
-rw-r--r--po/et.po164
-rw-r--r--po/eu.gmobin1750 -> 1750 bytes
-rw-r--r--po/eu.po125
-rw-r--r--po/fi.gmobin16180 -> 13964 bytes
-rw-r--r--po/fi.po164
-rw-r--r--po/fr.gmobin9421 -> 16119 bytes
-rw-r--r--po/fr.po459
-rw-r--r--po/ga.gmobin15907 -> 15575 bytes
-rw-r--r--po/ga.po169
-rw-r--r--po/gl.gmobin10032 -> 9709 bytes
-rw-r--r--po/gl.po127
-rw-r--r--po/he.gmobin1333 -> 1333 bytes
-rw-r--r--po/he.po125
-rw-r--r--po/hr.gmobin9086 -> 15455 bytes
-rw-r--r--po/hr.po443
-rw-r--r--po/hu.gmobin10145 -> 13678 bytes
-rw-r--r--po/hu.po289
-rw-r--r--po/id.gmobin9027 -> 8759 bytes
-rw-r--r--po/id.po127
-rw-r--r--po/it.gmobin8506 -> 8506 bytes
-rw-r--r--po/it.po125
-rw-r--r--po/ja.gmobin13921 -> 12028 bytes
-rw-r--r--po/ja.po155
-rw-r--r--po/ko.gmobin1382 -> 1382 bytes
-rw-r--r--po/ko.po125
-rw-r--r--po/nb.gmobin9484 -> 14742 bytes
-rw-r--r--po/nb.po279
-rw-r--r--po/nl.gmobin15637 -> 15363 bytes
-rw-r--r--po/nl.po190
-rw-r--r--po/pl.gmobin9515 -> 9249 bytes
-rw-r--r--po/pl.po127
-rw-r--r--po/pt.gmobin8692 -> 8692 bytes
-rw-r--r--po/pt.po125
-rw-r--r--po/pt_BR.gmobin15940 -> 15657 bytes
-rw-r--r--po/pt_BR.po174
-rw-r--r--po/ro.gmobin7820 -> 7820 bytes
-rw-r--r--po/ro.po125
-rw-r--r--po/ru.gmobin20080 -> 17406 bytes
-rw-r--r--po/ru.po164
-rw-r--r--po/sed.pot127
-rw-r--r--po/sk.gmobin15848 -> 15596 bytes
-rw-r--r--po/sk.po171
-rw-r--r--po/sl.gmobin8959 -> 8691 bytes
-rw-r--r--po/sl.po127
-rw-r--r--po/sr.gmobin18868 -> 16254 bytes
-rw-r--r--po/sr.po164
-rw-r--r--po/sv.gmobin9718 -> 15120 bytes
-rw-r--r--po/sv.po283
-rw-r--r--po/tr.gmobin8983 -> 8704 bytes
-rw-r--r--po/tr.po127
-rw-r--r--po/uk.gmobin19993 -> 19563 bytes
-rw-r--r--po/uk.po172
-rw-r--r--po/vi.gmobin17239 -> 16905 bytes
-rw-r--r--po/vi.po172
-rw-r--r--po/zh_CN.gmobin7918 -> 10947 bytes
-rw-r--r--po/zh_CN.po266
-rw-r--r--po/zh_TW.gmobin8632 -> 8372 bytes
-rw-r--r--po/zh_TW.po127
-rw-r--r--sed/compile.c55
-rw-r--r--sed/execute.c20
-rw-r--r--sed/local.mk4
-rw-r--r--sed/mbcs.c2
-rw-r--r--sed/regexp.c11
-rw-r--r--sed/sed.c8
-rw-r--r--sed/sed.h10
-rw-r--r--sed/utils.c2
-rw-r--r--sed/utils.h2
-rw-r--r--testsuite/0range.good1
-rw-r--r--testsuite/0range.inp6
-rw-r--r--testsuite/0range.sed1
-rw-r--r--testsuite/8bit.sed21
-rwxr-xr-xtestsuite/8bit.sh57
-rw-r--r--testsuite/8to7.good14
-rw-r--r--testsuite/8to7.inp9
-rw-r--r--testsuite/8to7.sed1
-rwxr-xr-xtestsuite/8to7.sh74
-rw-r--r--testsuite/BOOST.tests2
-rw-r--r--testsuite/Coreutils.pm620
-rw-r--r--testsuite/CuSkip.pm39
-rw-r--r--testsuite/CuTmpdir.pm114
-rw-r--r--testsuite/Makefile.tests228
-rw-r--r--testsuite/allsub.good1
-rw-r--r--testsuite/allsub.inp1
-rw-r--r--testsuite/allsub.sed1
-rw-r--r--testsuite/amp-escape.good1
-rw-r--r--testsuite/amp-escape.inp1
-rw-r--r--testsuite/amp-escape.sed1
-rw-r--r--testsuite/appquit.good2
-rw-r--r--testsuite/appquit.inp1
-rw-r--r--testsuite/appquit.sed4
-rw-r--r--testsuite/badenc.good9
-rw-r--r--testsuite/badenc.inp9
-rw-r--r--testsuite/badenc.sed1
-rwxr-xr-xtestsuite/badenc.sh46
-rw-r--r--testsuite/binary.good8
-rw-r--r--testsuite/binary.inp4
-rwxr-xr-xtestsuite/binary.sh63
-rw-r--r--testsuite/bkslashes.good2
-rw-r--r--testsuite/bkslashes.inp1
-rw-r--r--testsuite/bkslashes.sed3
-rw-r--r--testsuite/brackets.good1
-rw-r--r--testsuite/brackets.inp1
-rw-r--r--testsuite/brackets.sed8
-rw-r--r--testsuite/bsd-wrapper.sh33
-rw-r--r--testsuite/bug-regex10.c63
-rw-r--r--testsuite/bug-regex11.c141
-rw-r--r--testsuite/bug-regex12.c79
-rw-r--r--testsuite/bug-regex13.c109
-rw-r--r--testsuite/bug-regex14.c60
-rw-r--r--testsuite/bug-regex15.c49
-rw-r--r--testsuite/bug-regex16.c37
-rw-r--r--testsuite/bug-regex21.c51
-rw-r--r--testsuite/bug-regex27.c65
-rw-r--r--testsuite/bug-regex28.c76
-rw-r--r--testsuite/bug-regex7.c94
-rw-r--r--testsuite/bug-regex8.c86
-rw-r--r--testsuite/bug-regex9.c73
-rw-r--r--testsuite/classes.good4
-rw-r--r--testsuite/classes.inp6
-rw-r--r--testsuite/classes.sed2
-rw-r--r--testsuite/cmd-R.sh4
-rwxr-xr-xtestsuite/cmd-l.sh4
-rwxr-xr-xtestsuite/colon-with-no-label.sh4
-rw-r--r--testsuite/command-endings.sh137
-rw-r--r--testsuite/comment-n.sh4
-rw-r--r--testsuite/compile-errors.sh4
-rw-r--r--testsuite/compile-tests.sh4
-rwxr-xr-xtestsuite/convert-number.sh4
-rw-r--r--testsuite/cv-vars.good4
-rw-r--r--testsuite/cv-vars.inp6
-rw-r--r--testsuite/cv-vars.sed2
-rw-r--r--testsuite/dc.good3
-rw-r--r--testsuite/dc.inp14
-rwxr-xr-xtestsuite/dc.sh65
-rw-r--r--testsuite/distrib.good29
-rw-r--r--testsuite/distrib.sed56
-rw-r--r--testsuite/distrib.sh100
-rw-r--r--testsuite/dollar.good4
-rw-r--r--testsuite/dollar.inp4
-rw-r--r--testsuite/dollar.sed1
-rw-r--r--testsuite/empty.good2
-rw-r--r--testsuite/empty.inp2
-rw-r--r--testsuite/empty.sed1
-rw-r--r--testsuite/enable.good3
-rw-r--r--testsuite/enable.inp3
-rw-r--r--testsuite/enable.sed2
-rw-r--r--testsuite/envvar-check4
-rw-r--r--testsuite/eval.good40
-rw-r--r--testsuite/eval.inp5
-rw-r--r--testsuite/eval.sed46
-rwxr-xr-xtestsuite/eval.sh144
-rw-r--r--testsuite/execute-tests.sh4
-rw-r--r--testsuite/factor.good15
-rw-r--r--testsuite/factor.inp8
-rw-r--r--testsuite/factor.sed76
-rw-r--r--testsuite/fasts.good14
-rw-r--r--testsuite/fasts.inp1
-rw-r--r--testsuite/fasts.sed43
-rw-r--r--testsuite/flipcase.good25
-rw-r--r--testsuite/flipcase.inp25
-rw-r--r--testsuite/flipcase.sed1
-rwxr-xr-xtestsuite/follow-symlinks-stdin.sh4
-rw-r--r--testsuite/follow-symlinks.sh4
-rw-r--r--testsuite/get-mb-cur-max.c2
-rw-r--r--testsuite/head.good3
-rw-r--r--testsuite/head.inp9
-rw-r--r--testsuite/head.sed1
-rwxr-xr-xtestsuite/help-version.sh4
-rw-r--r--testsuite/help.sh41
-rwxr-xr-xtestsuite/in-place-hyphen.sh4
-rw-r--r--testsuite/in-place-suffix-backup.sh4
-rw-r--r--testsuite/inclib.good34
-rw-r--r--testsuite/inclib.inp34
-rw-r--r--testsuite/inclib.sed2
-rw-r--r--testsuite/init.sh27
-rw-r--r--testsuite/inplace-hold.sh34
-rwxr-xr-xtestsuite/inplace-selinux.sh53
-rw-r--r--testsuite/insens.good2
-rw-r--r--testsuite/insens.inp1
-rw-r--r--testsuite/insens.sed4
-rw-r--r--testsuite/insert.good3
-rw-r--r--testsuite/insert.inp2
-rw-r--r--testsuite/insert.sed1
-rwxr-xr-xtestsuite/invalid-mb-seq-UMR.sh4
-rw-r--r--testsuite/khadafy.good32
-rw-r--r--testsuite/khadafy.inp32
-rw-r--r--testsuite/khadafy.sed2
-rw-r--r--testsuite/linecnt.good110
-rw-r--r--testsuite/linecnt.inp55
-rw-r--r--testsuite/linecnt.sed1
-rw-r--r--testsuite/local.mk274
-rwxr-xr-xtestsuite/mac-mf.sh32
-rwxr-xr-xtestsuite/madding.sh32
-rw-r--r--testsuite/manis.good22
-rw-r--r--testsuite/manis.inp22
-rw-r--r--testsuite/manis.sed6
-rwxr-xr-xtestsuite/mb-bad-delim.sh4
-rwxr-xr-xtestsuite/mb-charclass-non-utf8.sh4
-rwxr-xr-xtestsuite/mb-match-slash.sh4
-rwxr-xr-xtestsuite/mb-y-translate.sh4
-rw-r--r--testsuite/middle.good3
-rw-r--r--testsuite/middle.inp9
-rw-r--r--testsuite/middle.sed1
-rw-r--r--testsuite/misc.pl1206
-rw-r--r--testsuite/modulo.good22
-rw-r--r--testsuite/modulo.inp22
-rw-r--r--testsuite/modulo.sed1
-rw-r--r--testsuite/newjis.good4
-rw-r--r--testsuite/newjis.inp4
-rw-r--r--testsuite/newjis.sed1
-rwxr-xr-xtestsuite/newjis.sh50
-rw-r--r--testsuite/newline-anchor.good3
-rw-r--r--testsuite/newline-anchor.inp3
-rw-r--r--testsuite/newline-anchor.sed6
-rwxr-xr-xtestsuite/newline-dfa-bug.sh4
-rw-r--r--testsuite/noeol.good3
-rw-r--r--testsuite/noeol.inp3
-rw-r--r--testsuite/noeol.sed1
-rw-r--r--testsuite/noeolw.1good7
-rw-r--r--testsuite/noeolw.2good3
-rw-r--r--testsuite/noeolw.good12
-rw-r--r--testsuite/noeolw.sed10
-rw-r--r--testsuite/normalize-text.sh4
-rwxr-xr-xtestsuite/nulldata.sh4
-rw-r--r--testsuite/numsub.good1
-rw-r--r--testsuite/numsub.inp2
-rw-r--r--testsuite/numsub.sed7
-rw-r--r--testsuite/numsub2.good0
-rw-r--r--testsuite/numsub2.inp1
-rw-r--r--testsuite/numsub2.sed1
-rw-r--r--testsuite/numsub3.good0
-rw-r--r--testsuite/numsub3.inp1
-rw-r--r--testsuite/numsub3.sed1
-rw-r--r--testsuite/numsub4.good0
-rw-r--r--testsuite/numsub4.inp1
-rw-r--r--testsuite/numsub4.sed1
-rw-r--r--testsuite/numsub5.good0
-rw-r--r--testsuite/numsub5.inp1
-rw-r--r--testsuite/numsub5.sed1
-rw-r--r--testsuite/panic-tests.sh6
-rw-r--r--testsuite/posix-char-class.sh4
-rw-r--r--testsuite/posix-mode-ERE.sh54
-rwxr-xr-xtestsuite/posix-mode-N.sh4
-rw-r--r--testsuite/posix-mode-addr.sh4
-rwxr-xr-xtestsuite/posix-mode-bad-ref.sh6
-rw-r--r--testsuite/posix-mode-s.sh4
-rwxr-xr-xtestsuite/range-overlap.sh4
-rw-r--r--testsuite/readin.good19
-rw-r--r--testsuite/readin.inp14
-rw-r--r--testsuite/readin.sed2
-rw-r--r--testsuite/recall.good7
-rw-r--r--testsuite/recall.inp1
-rw-r--r--testsuite/recall.sed7
-rw-r--r--testsuite/recall2.good1
-rw-r--r--testsuite/recall2.inp1
-rw-r--r--testsuite/recall2.sed5
-rw-r--r--testsuite/recursive-escape-c.sh4
-rw-r--r--testsuite/regex-errors.sh4
-rwxr-xr-xtestsuite/regex-max-int.sh51
-rw-r--r--testsuite/runptests.c125
-rwxr-xr-xtestsuite/runtest25
-rw-r--r--testsuite/runtests.c140
-rwxr-xr-xtestsuite/sandbox.sh4
-rw-r--r--testsuite/sep.good3
-rw-r--r--testsuite/sep.inp3
-rw-r--r--testsuite/sep.sed4
-rw-r--r--testsuite/space.good2
-rw-r--r--testsuite/space.inp2
-rw-r--r--testsuite/space.sed1
-rw-r--r--testsuite/stdin-prog.sh4
-rwxr-xr-xtestsuite/stdin.sh39
-rwxr-xr-xtestsuite/subst-mb-incomplete.sh4
-rw-r--r--testsuite/subst-options.sh4
-rw-r--r--testsuite/subst-replacement.sh4
-rw-r--r--testsuite/subwrite.inp4
-rw-r--r--testsuite/subwrite.sed1
-rw-r--r--testsuite/subwrt1.good4
-rw-r--r--testsuite/subwrt2.good2
-rwxr-xr-xtestsuite/temp-file-cleanup.sh4
-rw-r--r--testsuite/test-mbrtowc.c2
-rwxr-xr-xtestsuite/title-case.sh4
-rw-r--r--testsuite/tst-boost.c233
-rw-r--r--testsuite/tst-pcre.c247
-rw-r--r--testsuite/tst-regex2.c207
-rw-r--r--testsuite/tst-rxspencer.c558
-rw-r--r--testsuite/unbuffered.sh4
-rw-r--r--testsuite/uniq.sh32
-rw-r--r--testsuite/utf8-1.good1
-rw-r--r--testsuite/utf8-1.inp1
-rw-r--r--testsuite/utf8-1.sed1
-rw-r--r--testsuite/utf8-2.good1
-rw-r--r--testsuite/utf8-2.inp1
-rw-r--r--testsuite/utf8-2.sed1
-rw-r--r--testsuite/utf8-3.good1
-rw-r--r--testsuite/utf8-3.inp1
-rw-r--r--testsuite/utf8-3.sed1
-rw-r--r--testsuite/utf8-4.good1
-rw-r--r--testsuite/utf8-4.inp1
-rw-r--r--testsuite/utf8-4.sed1
-rw-r--r--testsuite/utf8-ru.sh126
-rw-r--r--testsuite/writeout.inp4
-rw-r--r--testsuite/writeout.sed1
-rw-r--r--testsuite/wrtout1.good4
-rw-r--r--testsuite/wrtout2.good2
-rw-r--r--testsuite/xabcx.good4
-rw-r--r--testsuite/xabcx.inp4
-rw-r--r--testsuite/xabcx.sed2
-rw-r--r--testsuite/xbxcx.good7
-rw-r--r--testsuite/xbxcx.inp7
-rw-r--r--testsuite/xbxcx.sed2
-rw-r--r--testsuite/xbxcx3.good7
-rw-r--r--testsuite/xbxcx3.inp7
-rw-r--r--testsuite/xbxcx3.sed1
-rw-r--r--testsuite/xemacs.good2
-rw-r--r--testsuite/xemacs.inp2
-rw-r--r--testsuite/xemacs.sed16
-rwxr-xr-xtestsuite/xemacs.sh51
-rw-r--r--testsuite/y-bracket.good1
-rw-r--r--testsuite/y-bracket.inp1
-rw-r--r--testsuite/y-bracket.sed1
-rw-r--r--testsuite/y-newline.good1
-rw-r--r--testsuite/y-newline.inp1
-rw-r--r--testsuite/y-newline.sed3
-rw-r--r--testsuite/y-zero.goodbin4 -> 0 bytes
-rw-r--r--testsuite/y-zero.inp1
-rw-r--r--testsuite/y-zero.sed1
-rw-r--r--testsuite/zero-anchor.goodbin14 -> 0 bytes
-rw-r--r--testsuite/zero-anchor.inpbin6 -> 0 bytes
-rw-r--r--testsuite/zero-anchor.sed6
998 files changed, 37377 insertions, 16449 deletions
diff --git a/.tarball-version b/.tarball-version
index 515be8f..4caecc7 100644
--- a/.tarball-version
+++ b/.tarball-version
@@ -1 +1 @@
-4.4
+4.5
diff --git a/.version b/.version
index 515be8f..4caecc7 100644
--- a/.version
+++ b/.version
@@ -1 +1 @@
-4.4
+4.5
diff --git a/COPYING b/COPYING
index 94a9ed0..e600086 100644
--- a/COPYING
+++ b/COPYING
@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
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/>.
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
@@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
+<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+<https://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/ChangeLog b/ChangeLog
index 17e9003..03c3e23 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,1016 @@
+2018-03-31 Jim Meyering <meyering@fb.com>
+
+ version 4.5
+ * NEWS: Record release date.
+
+2018-03-30 Jim Meyering <meyering@fb.com>
+
+ tests: port inplace-selinux.sh to Centos7 and Fedora 25
+ * testsuite/inplace-selinux.sh: Set the user (-u) portion of the security
+ context rather than the type (-t), and use system_u and user_u, which
+ appear to be reliably available, since some coreutils's tests use those.
+ Assaf Gordon reported that this test failed on those systems in
+ https://lists.gnu.org/r/sed-devel/2018-03/msg00018.html
+ Also, correct copyright date to include this year.
+
+2018-03-28 Jim Meyering <meyering@fb.com>
+
+ build: update gnulib to latest
+
+ maint: fix preceding change so "make dist" works
+ * testsuite/local.mk (EXTRA_DIST): Also remove runtest, here.
+
+2018-03-27 Jim Meyering <meyering@fb.com>
+
+ tests: don't run $(check_PROGRAMS) directly
+ testsuite/runtest was not portable to Solaris 10 /bin/sh, but was
+ used only to keep automake test machinery from running two compiled
+ binaries stand-alone. We can inhibit that more cleanly by removing
+ those two files from the list of TESTS to run and then just remove
+ the offending script.
+ * testsuite/local.mk (LOG_COMPILER): Set to false.
+ (TESTS): Don't put $(check_PROGRAMS) on this list.
+ * testsuite/runtest: Remove file.
+ Nelson H.F. Beebe reported the Solaris 10 /bin/sh failure.
+
+ tests: port to solaris 10's /bin/sh
+ * testsuite/runtest (test): Accommodate Solaris 10 /bin/sh
+ by sourcing init.sh, as is already done in many other shell
+ scripts in this directory, to handle (or skip test upon)
+ use of this construct: ${1##*/}. Reported by Nelson H.F. Beebe.
+
+2018-03-23 Jim Meyering <meyering@fb.com>
+
+ maint: remove old definition of UNUSED: use _GL_UNUSED instead
+ * sed/execute.c (UNUSED): Remove macro definition.
+ (read_always_fail): Use _GL_UNUSED instead.
+
+2018-03-23 Assaf Gordon <assafgordon@gmail.com>
+
+ sed: reject RE searches on buffers larger than INT_MAX
+ Sed uses 'size_t' internally, but gnulib's re_search uses 'signed int'.
+ If the buffer is larger than INT_MAX, reject it (panic, exit code 4).
+
+ The test is marked 'very expensive' and skipped by default (due to
+ creating a 2GB input file). To run it, use:
+
+ make check SUBDIRS=. RUN_VERY_EXPENSIVE_TESTS=yes \
+ TESTS=testsuite/regex-max-int.sh
+
+ Reported by YushiOMOTE in https://bugs.gnu.org/30520 .
+
+ * NEWS: Mention this.
+ * Makefile.am (check-expensive, check-very-expensive): New targets.
+ * init.cfg (expensive_, very_expensive_): Copied from coreutils.
+ * sed/regexp.c (match_regex): Check buffer length and panic if too large.
+ * testsuite/regex-max-int.sh: New test.
+ * testsuite/local.mk (T): Add new test.
+
+2018-03-22 Jim Meyering <meyering@fb.com>
+
+ maint: ignore more artifacts
+ * .gitignore: Also ignore sed-*.tar.xz.sig files.
+ * lib/.gitignore: Ignore more gnulib-provided sources.
+
+ build: update gnulib to latest
+ * gnulib: Update submodule.
+ * bootstrap: Update from gnulib.
+ * testsuite/init.sh: Likewise.
+
+2018-03-14 0xddaa <0xddaa@gmail.com>
+
+ sed: treat '\x5c' as literal backslash
+ Sed incorrectly treated '\x5c' (ASCII 92, backslash) as an escape character.
+
+ Old behavior:
+ $ echo z | sed -E 's/(z)/\x5c1/' # identical to 's/(z)/\1/'
+ z
+
+ New behavior:
+ $ echo z | sed -E 's/(z)/\x5c1/'
+ \1
+
+ Reported in https://bugs.gnu.org/30794.
+
+ * NEWS: Mention bug fix.
+ * sed/compile.c (normalize_text): Pass backslash as literal character.
+ * testsuite/misc.pl: Add tests.
+
+2018-03-02 Mike Frysinger <vapier@chromium.org> (tiny change)
+
+ sed: improve sandbox description in --help output
+ * sed/sed.c (usage): Add "(disable e/r/w commands)" to --sandbox text.
+
+2018-02-15 Jim Meyering <meyering@fb.com>
+
+ doc: small improvements
+ * doc/sed.texi: s/only accepts/accepts only/.
+ (BRE vs ERE): Tweak ERE and BRE definitions, and convert a
+ passive-voice sentence to active voice. Insert a comma.
+
+2018-02-13 Assaf Gordon <assafgordon@gmail.com>
+
+ doc: change URLs to https
+ * doc/config.texi, doc/sed-dummy.1, doc/sed.texi: Change http to https for
+ GNU URLs. External links (e.g. sed.sf.net, autsingroup.org) currently do
+ not support https and kept as-is.
+
+ maint: change http to https in license headers
+ * all files: Change http to https for all licenses URL.
+
+ sed: use https in usage screen contact information
+ * sed/sed.c (contact): Change http to https.
+
+2018-02-04 Jim Meyering <meyering@fb.com>
+
+ build: update gnulib to latest
+ * gnulib: This fixes a syntax-check failure that was due to the
+ new use of "/proc/filesystems" in init.cfg.
+
+2018-01-31 Jim Meyering <meyering@fb.com>
+
+ maint: make cfg.mk slightly more generic
+ * cfg.mk (announcement_Cc_): Don't hard-code "sed-devel@".
+ Use "$(PACKAGE)-devel@" instead.
+
+2018-01-09 Jakub Martisko <jamartis@redhat.com>
+
+ sed: with --in-place and selinux, use the symlink's context
+ When editing a file in place, the SELinux context (if exists)
+ should be based on the link instead of the target file itself.
+ --follow-symlinks option remains unchanged.
+
+ Bug reported by Jakub Jelen, fix proposed by Petr Lautrbach,
+ discussed in https://lists.gnu.org/r/sed-devel/2017-12/msg00000.html
+
+ * NEWS: Mention this.
+ * sed/execute.c (open_next_file): Use lgetfilecon (instead of getfilecon)
+ to get the context of the symlink instead of the target file.
+ * testsuite/inplace-selinux.sh: Test the above change.
+ * testsuite/local.mk (T): Add new test file.
+ * init.cfg (require_selinux_): Copied from coreutils, skip the test if
+ selinux is not available.
+
+2018-01-02 Assaf Gordon <assafgordon@gmail.com>
+
+ maint: update gnulib and copyright dates for 2018
+ * gnulib: Update to latest.
+ * all files: Run "make update-copyright".
+
+2017-11-22 Jim Meyering <meyering@fb.com>
+
+ maint: update to work with GCC7's -Werror=implicit-fallthrough=
+ * sed/sed.h (FALLTHROUGH): Define.
+ * sed/execute.c (execute_program): Use new FALLTHROUGH macro in place
+ of each comment.
+ * sed/compile.c (mark_subst_opts, compile_program): Likewise.
+
+2017-10-28 Assaf Gordon <assafgordon@gmail.com>
+
+ doc: fix incorrect line-wrapping example
+ Reported by Bamber Ward in https://bugs.gnu.org/28140 .
+
+ * doc/sed.texi (Line length adjustment): Fix sed script;
+ Rewrite example to long script with inlined comments;
+ Remove second example.
+
+2017-10-17 Assaf Gordon <assafgordon@gmail.com>
+
+ doc: fix missing slash in example
+ Reported by Nick Chambers in https://bugs.gnu.org/28881 .
+
+ * doc/sed.texi (Invoking sed::overview): Add missing slash in
+ 's/hello/world/' command.
+
+2017-10-05 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: skip utf8-ru test if required locale is not found
+ Reported by Dennis Clarke in https://bugs.gnu.org/28665#14 .
+
+ * init.cfg (require_ru_utf8_locale_): New function.
+ * testsuite/utf8-ru.sh: Skip test is required locale was not found.
+
+2017-10-05 Assaf Gordon <assafgordon@gmail.com>
+
+ build: require texinfo v6.1 for development builds
+ For development builds (using ./bootstrap), require texinfo version 6.1
+ or later (Same as GNU coreutils).
+ Sed's manual uses texinfo's @U{} command, introduced in texinfo-6.0.
+ This should not affect building from released tarballs, as the info
+ manual is pre-built and pre-packaged in the tar archive.
+ Reported by Dennis Clarke in https://bugs.gnu.org/28665#14 .
+
+ * bootstrap.conf: Require makeinfo 6.1 (up from 4.13).
+
+2017-10-05 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: remove non-functional regex C tests
+ These C-based tests were not updated since 2004, and were not included
+ by default. Enabling them with "./configure --enable-regex-tests"
+ resulted in false positives:
+ https://bugs.gnu.org/28665 , https://bugs.gnu.org/25381 .
+
+ This patch removes them completely.
+
+ * configure.ac: Remove "--with-regex-tests" option.
+ * local.mk (check_PROGRAMS): Remove tests.
+ * bug-regex10.c,
+ bug-regex11.c,
+ bug-regex12.c,
+ bug-regex13.c,
+ bug-regex14.c,
+ bug-regex15.c,
+ bug-regex16.c,
+ bug-regex21.c,
+ bug-regex27.c,
+ bug-regex28.c,
+ bug-regex7.c,
+ bug-regex8.c,
+ bug-regex9.c,
+ runptests.c,
+ runtests.c,
+ tst-boost.c,
+ tst-pcre.c,
+ tst-regex.c,
+ tst-regex2.c,
+ tst-rxspencer.c: Remove files.
+
+2017-05-13 Jim Meyering <meyering@fb.com>
+
+ maint: stop using @acronym{...} in texinfo sources
+ * doc/sed.texi, doc/config.texi: Remove all uses of @acronym{...},
+ per recommendation by Karl Berry.
+ * cfg.mk (local-checks-to-skip): Remove exemption, enabling
+ the @acronym{-prohibiting syntax-check rule.
+
+ gnulib: update to latest
+
+2017-05-10 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: fix various misspellings
+ Reported by Jim Meyering in
+ https://lists.gnu.org/archive/html/sed-devel/2017-05/msg00001.html .
+
+ * testsuite/BOOST.tests,
+ testsuite/posix-mode-bad-ref.sh,
+ testsuite/runptests.c,
+ testsuite/runtests.c,
+ testsuite/tst-pcre.c: Fix misspellings.
+
+2017-05-10 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: remove the 'Makefile.tests' used for old-style tests
+ * testsuite/Makefile.tests: Removed.
+ * testsuite/runtest: Remove code to run old-style tests.
+ * testsuite/local.mk (EXTRA_DIST): Remove MAkefile.tests.
+
+ tests: convert "noeolw" test to new framework
+ * testsuite/misc.pl (Tests): Add noeolw.
+ * testsuite/noeolw.good: Delete file.
+ * testsuite/noeolw.1good: Likewise.
+ * testsuite/noeolw.2good: Likewise
+ * testsuite/noeolw.inp: Likewise.
+ * testsuite/noeolw.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "noeolw".
+
+2017-05-10 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: convert "mac-mf" test to new framework
+ All input files (mac-mf.{inp,good,sed}) are large and are kept as-is.
+
+ * testsuite/mac-mf.sh: New test.
+ * testsuite/local.mk (SEDTEST): Remove mac-mf. (T): Add mac-mf.sh
+
+2017-05-10 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: convert "newjis" test to new framework
+ * testsuite/newjis.sh: New test.
+ * testsuite/newjis.{good,inp,sed}: Removed.
+ * testsuite/local.mk (EXTRA_DIST): Remove unneeded files.
+ (SEDTEST): Remove newjis. (T): Add newjis.sh
+
+ tests: convert "8to7" test to new framework
+ * testsuite/8to7.sh: New test.
+ * testsuite/8to7.{good,inp,sed}: Removed.
+ * testsuite/local.mk (EXTRA_DIST): Remove unneeded files.
+ (SEDTEST): Remove 8to7. (T): Add 8to7.sh
+
+2017-05-10 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: convert "madding" test to new framework
+ All input files (madding.{inp,good,sed}) contain very long lines and
+ are kept as-is (to avoid failing 'make syntax-check').
+
+ * testsuite/madding.sh: New test.
+ * testsuite/local.mk (SEDTEST): Remove madding. (T): Add madding.sh
+
+2017-05-10 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: convert "badenc" test to new framework
+ * testsuite/badenc.sh: New test.
+ * testsuite/distrib.{good,inp,sed}: Removed.
+ * testsuite/local.mk (EXTRA_DIST): Remove unneeded files.
+ (SEDTEST) Remove badenc. (T): Add badenc.sh
+
+2017-05-10 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: convert "distrib" test to new framework
+ The input file 'distrib.inp' has lines wider than 80 characters,
+ and is kept as a separate file.
+ The existing file 'distrib.sh' (which contained the same sed program as
+ in 'distrib.sed') was never used, and is completely rewritten.
+
+ * testsuite/distrib.sh: Rewritten as a new test.
+ * testsuite/distrib.{good,sed}: Removed.
+ * testsuite/local.mk (EXTRA_DIST): Remove unneeded files.
+ (SEDTEST) Remove distrib. (T): Add distrib.sh
+
+2017-05-10 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: convert "inplace-hold" test to new framework
+ * testsuite/inplace-hold.sh: New test.
+ * testsuite/local.mk (SEDTEST) Remove inplace-hold.
+ (T): Add inplace-hold.sh.
+
+ tests: convert "stdin" test to new framework
+ * testsuite/stdin.sh: New test.
+ * testsuite/local.mk (SEDTEST) Remove stdin.
+ (T): Add stdin.sh.
+
+ tests: convert "eval" test to new framework
+ * testsuite/eval.sh: New test.
+ * testsuite/eval.{sed,inp,good}: Removed.
+ * testsuite/local.mk (EXTRA_DIST): Remove unneeded files.
+ (SEDTEST) Remove eval.sed.
+ (T): Add eval.sh.
+
+2017-05-10 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: convert 'bsd' test to new framework
+ The 'bsd.sh' is a long shell script (imported from NetBSD) which runs
+ multiple tests, then compares the output to 'bsd.good'.
+ The 'bsd.sh' is not modified. Instead, a new script 'bsd-wrapper.sh'
+ is created to work with the newer init.sh-style testing framework.
+
+ * testsuite/bsd-wrapper.sh: New test.
+ * testsuite/local.mk (SEDTESTS): Remove old test. (T): Add new test.
+
+2017-05-10 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: convert 'xemacs' test to new framework
+ Keep input/expected output files (xemacs.inp/xemacs.good) as they contain
+ lines longar than 80 characters (which will fail 'make syntax-check').
+
+ * testsuite/xemacs.sed: Remove.
+ * testsuite/xemacs.sh: New test.
+ * testsuite/local.mk (EXTRA_DIST): Remove xemacs.sed.
+ (SEDTESTS): Remove old xemacs test.
+ (T): Add new xemacs.sh test.
+
+2017-05-10 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: convert 'help' test to new framework
+ The 'help' test was implemented directly in 'Makefile.tests' - no
+ external files to remove/adapt.
+
+ * testsuite/help.sh: New tests.
+ * testsuite/local.mk (SEDTESTS): Remove old test.
+ (T): Add new test.
+
+2017-05-10 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: convert 'uniq' test to new framework
+ Add a simple init.sh-stype wrapper to run the 'uniq' tests.
+ 'uniq.sed' is a valid stand-alone script - keep it as-is.
+ The input/expected output files (uniq.inp/uniq.good) are large - keep
+ them as well instead of embedding them in the shell script.
+
+ * testsuite/uniq.sh: New test.
+ * testsuite/local.mk (SEDTESTS): Remove uniq.sed
+ (T): Add uniq.sh.
+
+2017-05-10 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: convert 'utf8-*' tests to new framework
+ Merge utf8-{1,2,3,4} into utf8-ru.sh script.
+
+ * testsuite/utf8-ru.sh: New test.
+ * testsuite/utf8-1.inp,
+ testsuite/utf8-1.good,
+ testsuite/utf8-1.sed,
+ testsuite/utf8-2.inp,
+ testsuite/utf8-2.good,
+ testsuite/utf8-2.sed,
+ testsuite/utf8-3.inp,
+ testsuite/utf8-3.good,
+ testsuite/utf8-3.sed,
+ testsuite/utf8-4.inp,
+ testsuite/utf8-4.good,
+ testsuite/utf8-4.sed: Removed files.
+ * testsuite/local.mk (EXTRA_DIST): Remove deleted inp/sed/good files.
+ (SEDTESTS): Remove utf8-{1,2,3,4} tests.
+ (T): Add new test.
+
+2017-05-10 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: convert "dc" test to new framework
+ The 'dc.sed' program (implementing dc calculator in sed) is kept as-is.
+ The input (dc.inp) and expected output (dc.good) are merged into the
+ new shell script.
+ The old-style test executed two calculations at once (Easter 2002 and
+ square root of 2). They are now separated into two invocations of
+ 'dc.sed'.
+
+ * testsuite/dc.sh: New test.
+ * testsuite/dc.inp, testuite/dc.good: Removed.
+ * testsuite/local.mk (EXTRA_DIST): Remove inp/good files.
+ (SEDTEST): Remove dc.sed.
+ (T): Add dc.sh.
+
+2017-05-10 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: convert "binary/2/3" tests to new framework
+ The sed scripts (binary.sed, binary2.sed, binary3.sed) are large and
+ could function as stand-alone programs - there are kept as separate
+ files. The input/expected output are removed, and a new script is
+ added to run the tests.
+
+ * testsuite/binary.sh: New script.
+ * testsuite/binary.inp, testsuite/binary.good: Removed.
+ * testsuite/local.mk (EXTRA_DIST): Remove inp/good files.
+ (SEDTEST): Remove tests.
+ (T): Add new test.
+
+2017-05-10 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: convert "8bit" test to new framework
+ The input (8bit.inp) and expected output (8bit.good) contains non-ascii
+ octets, and are kept as-is. The sed program is converted to newer
+ init.sh-style tests.
+
+ * testsuite/8bit.sed: Removed.
+ * testsuite/8bit.sh: New test.
+ * testsuite/local.mk (EXTRA_DIST): Remove 8bit.sed.
+ (SEDTEST) Remove 8bit.sed.
+ (T): Add 8bit.sh.
+
+2017-05-10 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: new function remove_cr_inplace in init.cfg
+ When testing on Windows OSes, remove any CR (\r) characters
+ from output files (before comparing them to expected output).
+
+ This functionality was used by the old-style tests, embedded
+ directly in 'Makefile.tests'.
+
+ * init.cfg: (remove_cr_inplace): New function.
+
+2017-05-10 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: convert "subwrite" test to new framework
+ * testsuite/misc.pl (Tests): Add subwrite.
+ * testsuite/subwrite.inp: Likewise.
+ * testsuite/subwrite.sed: Likewise.
+ * testsuite/subwrt1.good: Delete file.
+ * testsuite/subwrt2.good: Delete file.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "subwrite".
+
+ tests: convert "writeout" test to new framework
+ * testsuite/misc.pl (Tests): Add writeout.
+ * testsuite/writeout.inp: Likewise.
+ * testsuite/writeout.sed: Likewise.
+ * testsuite/wrtout1.good: Delete file.
+ * testsuite/wrtout2.good: Delete file.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "writeout".
+
+ tests: convert 'quiet'/'file' tests to new framework
+ * testsuite/local.mk: (SEDTESTS): Remove tests.
+ * testsuite/misc.pl: Add tests.
+
+ tests: convert "brackets" test to new framework
+ * testsuite/misc.pl (Tests): Add brackets.
+ * testsuite/brackets.good: Delete file.
+ * testsuite/brackets.inp: Likewise.
+ * testsuite/brackets.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "brackets".
+
+ tests: convert "sep" test to new framework
+ * testsuite/misc.pl (Tests): Add sep.
+ * testsuite/sep.good: Delete file.
+ * testsuite/sep.inp: Likewise.
+ * testsuite/sep.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "sep".
+
+ tests: convert "readin" test to new framework
+ * testsuite/misc.pl (Tests): Add readin.
+ * testsuite/readin.good: Delete file.
+ * testsuite/readin.inp: Likewise.
+ * testsuite/readin.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "readin".
+
+ tests: convert "numsub" test to new framework
+ * testsuite/misc.pl (Tests): Add numsub.
+ * testsuite/numsub.good: Delete file.
+ * testsuite/numsub.inp: Likewise.
+ * testsuite/numsub.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "numsub".
+
+ tests: convert "numsub5" test to new framework
+ * testsuite/misc.pl (Tests): Add numsub5.
+ * testsuite/numsub5.good: Delete file.
+ * testsuite/numsub5.inp: Likewise.
+ * testsuite/numsub5.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "numsub5".
+
+ tests: convert "numsub4" test to new framework
+ * testsuite/misc.pl (Tests): Add numsub4.
+ * testsuite/numsub4.good: Delete file.
+ * testsuite/numsub4.inp: Likewise.
+ * testsuite/numsub4.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "numsub4".
+
+ tests: convert "numsub3" test to new framework
+ * testsuite/misc.pl (Tests): Add numsub3.
+ * testsuite/numsub3.good: Delete file.
+ * testsuite/numsub3.inp: Likewise.
+ * testsuite/numsub3.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "numsub3".
+
+ tests: convert "numsub2" test to new framework
+ * testsuite/misc.pl (Tests): Add numsub2.
+ * testsuite/numsub2.good: Delete file.
+ * testsuite/numsub2.inp: Likewise.
+ * testsuite/numsub2.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "numsub2".
+
+ tests: convert "newline-anchor" test to new framework
+ * testsuite/misc.pl (Tests): Add newline-anchor.
+ * testsuite/newline-anchor.good: Delete file.
+ * testsuite/newline-anchor.inp: Likewise.
+ * testsuite/newline-anchor.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "newline-anchor".
+
+ tests: convert "middle" test to new framework
+ * testsuite/misc.pl (Tests): Add middle.
+ * testsuite/middle.good: Delete file.
+ * testsuite/middle.inp: Likewise.
+ * testsuite/middle.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "middle".
+
+ tests: convert "xabcx" test to new framework
+ * testsuite/misc.pl (Tests): Add xabcx.
+ * testsuite/xabcx.good: Delete file.
+ * testsuite/xabcx.inp: Likewise.
+ * testsuite/xabcx.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "xabcx".
+
+ tests: convert "manis" test to new framework
+ * testsuite/misc.pl (Tests): Add manis.
+ * testsuite/manis.good: Delete file.
+ * testsuite/manis.inp: Likewise.
+ * testsuite/manis.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "manis".
+
+ tests: convert "linecnt" test to new framework
+ * testsuite/misc.pl (Tests): Add linecnt.
+ * testsuite/linecnt.good: Delete file.
+ * testsuite/linecnt.inp: Likewise.
+ * testsuite/linecnt.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "linecnt".
+
+ tests: convert "khadafy" test to new framework
+ * testsuite/misc.pl (Tests): Add khadafy.
+ * testsuite/khadafy.good: Delete file.
+ * testsuite/khadafy.inp: Likewise.
+ * testsuite/khadafy.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "khadafy".
+
+ tests: convert "inclib" test to new framework
+ * testsuite/misc.pl (Tests): Add inclib.
+ * testsuite/inclib.good: Delete file.
+ * testsuite/inclib.inp: Likewise.
+ * testsuite/inclib.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "inclib".
+
+ tests: convert "factor" test to new framework
+ * testsuite/misc.pl (Tests): Add factor.
+ * testsuite/factor.good: Delete file.
+ * testsuite/factor.inp: Likewise.
+ * testsuite/factor.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "factor".
+
+ tests: convert "flipcase" test to new framework
+ * testsuite/misc.pl (Tests): Add flipcase.
+ * testsuite/flipcase.good: Delete file.
+ * testsuite/flipcase.inp: Likewise.
+ * testsuite/flipcase.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "flipcase".
+
+ tests: convert "fasts" test to new framework
+ * testsuite/misc.pl (Tests): Add fasts.
+ * testsuite/fasts.good: Delete file.
+ * testsuite/fasts.inp: Likewise.
+ * testsuite/fasts.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "fasts".
+
+ tests: convert "enable" test to new framework
+ * testsuite/misc.pl (Tests): Add enable.
+ * testsuite/enable.good: Delete file.
+ * testsuite/enable.inp: Likewise.
+ * testsuite/enable.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "enable".
+
+ tests: convert "cv-vars" test to new framework
+ * testsuite/misc.pl (Tests): Add cv-vars.
+ * testsuite/cv-vars.good: Delete file.
+ * testsuite/cv-vars.inp: Likewise.
+ * testsuite/cv-vars.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "cv-vars".
+
+ tests: convert "classes" test to new framework
+ * testsuite/misc.pl (Tests): Add classes.
+ * testsuite/classes.good: Delete file.
+ * testsuite/classes.inp: Likewise.
+ * testsuite/classes.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "classes".
+
+ tests: convert "bkslashes" test to new framework
+ * testsuite/misc.pl (Tests): Add bkslashes.
+ * testsuite/bkslashes.good: Delete file.
+ * testsuite/bkslashes.inp: Likewise.
+ * testsuite/bkslashes.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "bkslashes".
+
+ tests: convert "amp-escape" test to new framework
+ * testsuite/misc.pl (Tests): Add amp-escape.
+ * testsuite/amp-escape.good: Delete file.
+ * testsuite/amp-escape.inp: Likewise.
+ * testsuite/amp-escape.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "amp-escape".
+
+ tests: convert "appquit" test to new framework
+ * testsuite/misc.pl (Tests): Add appquit.
+ * testsuite/appquit.good: Delete file.
+ * testsuite/appquit.inp: Likewise.
+ * testsuite/appquit.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "appquit".
+
+ tests: convert "0range" test to new framework
+ * testsuite/misc.pl (Tests): Add 0range.
+ * testsuite/0range.good: Delete file.
+ * testsuite/0range.inp: Likewise.
+ * testsuite/0range.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "0range".
+
+ tests: convert "dollar" test to new framework
+ * testsuite/misc.pl (Tests): Add dollar.
+ * testsuite/dollar.good: Delete file.
+ * testsuite/dollar.inp: Likewise.
+ * testsuite/dollar.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "dollar".
+
+ tests: convert "xbxcx3" test to new framework
+ * testsuite/misc.pl (Tests): Add xbxcx3.
+ * testsuite/xbxcx3.good: Delete file.
+ * testsuite/xbxcx3.inp: Likewise.
+ * testsuite/xbxcx3.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "xbxcx3".
+
+ tests: convert "xabcx" test to new framework
+ * testsuite/misc.pl (Tests): Add xabcx.
+ * testsuite/xabcx.good: Delete file.
+ * testsuite/xabcx.inp: Likewise.
+ * testsuite/xabcx.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "xabcx".
+
+ tests: convert "xbxcx" test to new framework
+ * testsuite/misc.pl (Tests): Add xbxcx.
+ * testsuite/xbxcx.good: Delete file.
+ * testsuite/xbxcx.inp: Likewise.
+ * testsuite/xbxcx.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "xbxcx".
+
+2017-05-09 Jim Meyering <meyering@fb.com>
+
+ tests: convert "recall2" test to new framework
+ * testsuite/misc.pl (Tests): Add recall2.
+ * testsuite/recall2.good: Delete file.
+ * testsuite/recall2.inp: Likewise.
+ * testsuite/recall2.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "recall2".
+
+ tests: convert "recall" test to new framework
+ * testsuite/misc.pl (Tests): Add recall.
+ * testsuite/recall.good: Delete file.
+ * testsuite/recall.inp: Likewise.
+ * testsuite/recall.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "recall".
+
+ tests: convert "insert" test to new framework
+ * testsuite/misc.pl (Tests): Add insert-nl.
+ * testsuite/insert.good: Delete file.
+ * testsuite/insert.inp: Likewise.
+ * testsuite/insert.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "insert".
+
+ tests: convert "allsub" test to new framework
+ * testsuite/misc.pl (Tests): Add allsub.
+ * testsuite/allsub.good: Delete file.
+ * testsuite/allsub.inp: Likewise.
+ * testsuite/allsub.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "allsub".
+
+ tests: convert "y-newline" test to new framework
+ * testsuite/misc.pl (Tests): Add y-newline.
+ * testsuite/y-newline.good: Delete file.
+ * testsuite/y-newline.inp: Likewise.
+ * testsuite/y-newline.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "y-newline".
+
+ tests: convert "y-zero" test to new framework
+ * testsuite/misc.pl (Tests): Add y-zero.
+ * testsuite/y-zero.good: Delete file.
+ * testsuite/y-zero.inp: Likewise.
+ * testsuite/y-zero.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "y-zero".
+
+ tests: convert "y-bracket" test to new framework
+ * testsuite/misc.pl (Tests): Add y-bracket.
+ * testsuite/y-bracket.good: Delete file.
+ * testsuite/y-bracket.inp: Likewise.
+ * testsuite/y-bracket.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "y-bracket".
+
+ tests: convert "noeol" to new framework
+ * testsuite/misc.pl (preserve-missing-EOL-at-EOF): New test,
+ replacing...
+ * testsuite/noeol.good: Delete file.
+ * testsuite/noeol.inp: Likewise.
+ * testsuite/noeol.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "noeol".
+ * testsuite/Makefile.tests (noeol): Remove target.
+ We also require this additional change, since the noeolw test
+ used the just-deleted noeol.inp input file:
+ * testsuite/noeolw.inp: New file, renamed from testsuite/noeol.inp.
+ * testsuite/Makefile.tests: Use noeolw.inp, not the other test's file.
+ (EXTRA_DIST): Add testsuite/noeolw.inp.
+
+ tests: convert "insens" to new framework
+ * testsuite/misc.pl (case-insensitive): New test, replacing...
+ * testsuite/insens.good: Delete file.
+ * testsuite/insens.inp: Likewise.
+ * testsuite/insens.sed: Likewise.
+ * testsuite/local.mk (EXTRA_DIST): Remove their names.
+ (SEDTESTS): Remove "insens".
+
+ tests: begin migrating test triples into perl framework
+ * testsuite/head.good: Delete file.
+ * testsuite/head.inp: Likewise.
+ * testsuite/head.sed: Likewise.
+ * testsuite/space.good: Likewise
+ * testsuite/space.inp: Likewise.
+ * testsuite/space.sed: Likewise.
+ * testsuite/empty.good: Likewise
+ * testsuite/empty.inp: Likewise.
+ * testsuite/empty.sed: Likewise.
+ * testsuite/zero-anchor.good: Likewise
+ * testsuite/zero-anchor.inp: Likewise.
+ * testsuite/zero-anchor.sed: Likewise.
+ * testsuite/misc.pl: New file, subsuming the above, with one test
+ for each of the test file triples (input, output, sed commands).
+ (empty, empty2, head, space, zero-anchor): Converted tests.
+ * testsuite/local.mk: Remove references to deleted files.
+ (T): Add misc.pl.
+
+2017-05-09 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: keep temporary directory if SAVE_TEMPS requested
+ When developers run 'make check SAVE_TEMPS=yes' the 'Coreutils.pm'
+ module does not delete the temporary files, but the CuTmpdir.pm still
+ deletes the temp directory. With this change, the temp directory is
+ kept, and printed to the log file (e.g. test-suite.log).
+
+ * testsuite/CuTmpdir.pm: if $EMV{SAVE_TEMPS} is not empty, don't
+ auto-delete the temp directory, and print it to the log.
+
+2017-05-09 Assaf Gordon <assafgordon@gmail.com>
+
+ maint: fix wrong PATH in testsuite
+ The switch to non-recursive make in v4.2.2-129-g3b29bec used a wrong
+ directory name in the PATH construction of automake's TESTS_ENVIRONMENT
+ variable ('/src/' instead of '/sed').
+ This had no effect as each test shell script appended the ./sed/ path
+ independently. However, switching to perl-based tests - this will be
+ noticed as the just-built sed binary will not be in the PATH.
+
+ * testsuite/local.mk: Fix $PATH variable in test environment.
+
+2017-04-22 Jim Meyering <meyering@fb.com>
+
+ maint: ignore more
+ * .gitignore: Ignore a bunch of doc/*.* texinfo artifacts and sort.
+
+ tests: support perl-based tests like those of grep and coreutils
+ * configure.ac: Define HAVE_PERL.
+ * testsuite/Coreutils.pm: New file. From grep.
+ * testsuite/CuSkip.pm: Likewise.
+ * testsuite/CuTmpdir.pm: Likewise.
+ * testsuite/local.mk (, TEST_EXTENSIONS): Add .pl.
+ (TESTSUITE_PERL, TESTSUITE_PERL_OPTIONS): Define.
+ (PL_LOG_COMPILER): Define.
+ (EXTRA_DIST): Add the new .pm files.
+
+2017-04-18 Assaf Gordon <assafgordon@gmail.com>
+
+ sed: enable special meaning of '+' with '-E --posix'
+ in sed-4.2 and later, '--posix' option wrongly disabled the special meaning
+ of '+' even in ERE mode (--posix should only disable it in BRE mode,
+ since it is a GNU extension in BRE). Bug introduced in the original
+ implementation of --posix in v4.1a-5-gba68fb4.
+ Reported by Jordan Torbiak in https://bugs.gnu.org/26409 .
+
+ * NEWS: Mention bug fix.
+ * sed/regexp.c (compile_regex_1): In --posix mode, set RE_LIMITED_OPS
+ only in BRE mode.
+ * testsuite/posix-mode-ERE.sh: New test.
+ * testsuite/local.mk: Add new test.
+
+2017-03-21 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: test comments, braces after commands
+ Test multiple combinations of comments, spaces, braces after commands,
+ to validate recently added function 'read_end_of_cmd()'.
+ See discussion in https://bugs.gnu.org/22460 .
+
+ * testsuite/command-endings.sh: New test, including y/// bug.
+ * testsuite/local.mk: Add new test.
+
+2017-03-21 Assaf Gordon <assafgordon@gmail.com>
+
+ sed: refactor end-of-line parsing
+ Follow-up to bug#22460: extract repeated code to parse end of lines
+ (while saving comments, braces) into a new function.
+ See discussion in https://bugs.gnu.org/22460 .
+
+ * sec/compile.c (read_end_of_cmd): New function, consumes sed script
+ input until newline, EOF, semicolon, closing brace or comment is found.
+ (compile_program): Call new function instead of duplicating code.
+
+2017-03-21 Thorsten Heymann <hek2mgl@metashock.net>
+
+ sed: allow comments, braces after y///
+ sed-4.4 and earlier rejected the following:
+ $ sed 'y/1/a/ #f'
+ sed: -e expression #1, char 8: extra characters after command
+
+ See https://bugs.gnu.org/22460 .
+
+ * sed/compile.c (compile_program): Handle comments, braces after 'y' command.
+ * NEWS: Mention it.
+
+2017-03-19 Kent Fredric <kentnl@gentoo.org> (tiny change)
+
+ tests: ensure tty device is readable before running test
+ Unreadable tty's fail with a different permissions error
+ instead of failing with "is a tty" error.
+ Reported in https://bugs.gnu.org/25692 .
+
+ * testsuite/panic-tests.sh: Run test if tty device is both readable
+ and writable.
+
+2017-03-07 Assaf Gordon <assafgordon@gmail.com>
+
+ doc: expand "locale considerations" (multibyte) section
+ Show examples of processing valid and invalid characters.
+ Mention \L,\U for s/// command.
+ Combines reports from:
+ https://bugs.debian.org/500501
+ https://lists.gnu.org/archive/html/coreutils/2017-02/msg00039.html
+
+ * doc/sed.texi (Locale Consideration): Expand section.
+ * doc/config.texi: Add variables to render unicode characters portably.
+
+2017-02-23 Assaf Gordon <assafgordon@gmail.com>
+
+ doc: warn against misuse of -i with other options
+ 'sed -iE' is not the same as 'sed -Ei'. 'sed -ni' is dangerous.
+ From https://bugs.debian.org/832088
+
+ * doc/sed.texi (Command-Line Options): Explain and add examples
+ to '-i/--in-place' item.
+
+2017-02-23 Assaf Gordon <assafgordon@gmail.com>
+
+ doc: elaborate about regex matching on pattern space
+ Regex addresses work on current pattern space, not on the original
+ input lines. From https://bugs.debian.org/284646
+
+ * doc/sed.texi (Regexp Addresses): Add a paragraph and an example.
+ * doc/sed.x (Addresses): Add a sentence about regexp.
+
+2017-02-23 Assaf Gordon <assafgordon@gmail.com>
+
+ doc: mention escape-sequence precedence
+ Unescaping takes place before passing the pattern to the regex engine:
+ $ echo 'a^c' | sed -e 's/\x5e/b/'
+ ba^c
+
+ From: https://bugs.debian.org/605142
+
+ * doc/sed.texi (Escaping Precedence): Add new subsection under 'escape
+ sequences' with examples.
+
+2017-02-16 Assaf Gordon <assafgordon@gmail.com>
+
+ build: fix 'install-html' target
+ Switching to non-recursive makefiles broke the 'install-html' target:
+ The gettext plumbing requires an 'install-html' target in po/Makefile.
+ This was fixed in gettext v0.19.8.1-41-ge5a008a, but packages using
+ older gettext need to manually patch po/Makefile.in.in.
+ Report and suggested fix by Eric Blake in https://debbugs.gnu.org/25690 .
+
+ * bootstrap.conf (bootstrap_epilogue): Add 'install-{html,pdf,dvi,ps}'
+ targets to po/Makefile.in.in (if needed).
+
+2017-02-09 Alexandre Jasmin <alexandre.jasmin@gmail.com>
+
+ doc: reference the i command in /regexp/I
+ Remove "TODO: add @code{pxref}" in the text and add the ref.
+
+ * doc/sed.texi (selecting lines by text matching): Add reference.
+
+2017-02-09 Alexandre Jasmin <alexandre.jasmin@gmail.com>
+
+ doc: rework BRE/ERE table to fit PDF manual
+ Sample code in the basic/extended table was too wide to fit on a Letter
+ size printout. Text was overlapping and unreadable. Remove margin,
+ split commands in two lines and change the column with.
+
+ * doc/sed.texi (Basic and extended regexp): Rework table.
+
+2017-02-07 Alexandre Jasmin <alexandre.jasmin@gmail.com> (tiny change)
+
+ doc: change description of the r command
+ "Reads text file a file" was probably a typo. Also remove "Example: " in
+ the summary as there's no example there.
+
+ * doc/sed.texi (sed scripts): Fix r command description.
+
+2017-02-07 Alexandre Jasmin <alexandre.jasmin@gmail.com> (tiny change)
+
+ doc: fix copy-pasted examples of regexp
+ The samples commands demonstrating '\B' and '\S' were both using '\w'.
+ The commands output is correct.
+
+ * doc/sed.texi (Regular Expression Extensions): Use the proper commands.
+
2017-02-03 Jim Meyering <meyering@fb.com>
+ maint: post-release administrivia
+ * NEWS: Add header line for next release.
+ * .prev-version: Record previous version.
+ * cfg.mk (old_NEWS_hash): Auto-update.
+
version 4.4
* NEWS: Record release date.
diff --git a/GNUmakefile b/GNUmakefile
index a2f8111..7ee0965 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -5,7 +5,7 @@
# It is necessary if you want to build targets usually of interest
# only to the maintainer.
-# Copyright (C) 2001, 2003, 2006-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2006-2018 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 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# If the user runs GNU make but has not yet run ./configure,
# give them a diagnostic.
diff --git a/Makefile.am b/Makefile.am
index 77ea85a..0bf4d34 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright (C) 1990-2017 Free Software Foundation, Inc.
+# Copyright (C) 1990-2018 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
@@ -11,7 +11,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
PACKAGE = sed
@@ -138,3 +138,9 @@ include $(top_srcdir)/testsuite/local.mk
distclean-local:
test x$(srcdir) = x$(builddir) || rm -f $(dist_man_MANS)
rm -f lib/.deps/getfilecon.Po lib/.deps/obstack.Po
+
+# Shortcut targets to make it easier to run (very) expensive tests.
+check-expensive:
+ $(MAKE) check RUN_EXPENSIVE_TESTS=yes
+check-very-expensive:
+ $(MAKE) check-expensive RUN_VERY_EXPENSIVE_TESTS=yes
diff --git a/Makefile.in b/Makefile.in
index d8ee6df..82c299b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.99a from Makefile.am.
+# Makefile.in generated by automake 1.16a from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2015 Free Software Foundation, Inc.
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,7 @@
@SET_MAKE@
-# Copyright (C) 1990-2017 Free Software Foundation, Inc.
+# Copyright (C) 1990-2018 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,9 +27,9 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
-# Copyright 1997-2017 Free Software Foundation, Inc.
+# Copyright 1997-2018 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
@@ -42,10 +42,10 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
-# Copyright (C) 2002-2017 Free Software Foundation, Inc.
+# Copyright (C) 2002-2018 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
@@ -58,7 +58,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this file. If not, see <http://www.gnu.org/licenses/>.
+# along with this file. If not, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License,
# this file may be distributed as part of a program that
@@ -68,7 +68,7 @@
# Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --local-dir=gl --lib=libsed --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=gnulib-tests --aux-dir=build-aux --with-tests --avoid=lock-tests --makefile-name=gnulib.mk --no-conditional-dependencies --no-libtool --macro-prefix=gl acl alloca btowc c-ctype closeout dfa extensions fdl fwriting getdelim getopt gettext-h git-version-gen gitlog-to-changelog ignore-value localcharset manywarnings mbrlen mbrtowc mbsinit memchr memrchr mkostemp non-recursive-gnulib-prefix-hack obstack progname readme-release regex rename selinux-h ssize_t stat-macros stdalign stdbool strerror strverscmp threadlib unlocked-io update-copyright verify version-etc-fsf wcrtomb wctob
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -81,9 +81,9 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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,9 +96,9 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -111,7 +111,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
@@ -193,22 +193,15 @@ bin_PROGRAMS = sed/sed$(EXEEXT)
@TEST_SYMLINKS_TRUE@am__append_1 = testsuite/follow-symlinks.sh \
@TEST_SYMLINKS_TRUE@ testsuite/follow-symlinks-stdin.sh
+TESTS = $(am__EXEEXT_1) $(T)
check_PROGRAMS = testsuite/get-mb-cur-max$(EXEEXT) \
- testsuite/test-mbrtowc$(EXEEXT) $(am__EXEEXT_1)
-@TEST_REGEX_TRUE@am__append_2 = testsuite/bug-regex7 \
-@TEST_REGEX_TRUE@ testsuite/bug-regex8 testsuite/bug-regex9 testsuite/bug-regex10 \
-@TEST_REGEX_TRUE@ testsuite/bug-regex11 testsuite/bug-regex12 testsuite/bug-regex13 \
-@TEST_REGEX_TRUE@ testsuite/bug-regex14 testsuite/bug-regex15 testsuite/bug-regex16 \
-@TEST_REGEX_TRUE@ testsuite/bug-regex21 testsuite/bug-regex27 testsuite/bug-regex28 \
-@TEST_REGEX_TRUE@ testsuite/tst-pcre testsuite/tst-boost testsuite/runtests \
-@TEST_REGEX_TRUE@ testsuite/runptests testsuite/tst-rxspencer testsuite/tst-regex2
-
-@TEST_REGEX_TRUE@am__append_3 = space
+ testsuite/test-mbrtowc$(EXEEXT)
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/acl.m4 \
- $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/assert.m4 \
+ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \
+ $(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/assert.m4 \
$(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/builtin-expect.m4 \
$(top_srcdir)/m4/canonicalize.m4 \
$(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \
@@ -221,12 +214,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/errno_h.m4 $(top_srcdir)/m4/error.m4 \
$(top_srcdir)/m4/extensions.m4 \
$(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/fcntl-o.m4 \
- $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopen.m4 \
- $(top_srcdir)/m4/fflush.m4 $(top_srcdir)/m4/flexmember.m4 \
- $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fpurge.m4 \
- $(top_srcdir)/m4/freading.m4 $(top_srcdir)/m4/fseek.m4 \
- $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \
- $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \
+ $(top_srcdir)/m4/fcntl.m4 $(top_srcdir)/m4/fcntl_h.m4 \
+ $(top_srcdir)/m4/fdopen.m4 $(top_srcdir)/m4/fflush.m4 \
+ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/fpending.m4 \
+ $(top_srcdir)/m4/fpurge.m4 $(top_srcdir)/m4/freading.m4 \
+ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \
+ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/ftell.m4 \
+ $(top_srcdir)/m4/ftello.m4 $(top_srcdir)/m4/ftruncate.m4 \
$(top_srcdir)/m4/fwriting.m4 $(top_srcdir)/m4/getcwd.m4 \
$(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdtablesize.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \
@@ -234,19 +228,21 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \
$(top_srcdir)/m4/gnulib-common.m4 \
$(top_srcdir)/m4/gnulib-comp.m4 \
- $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/include_next.m4 \
+ $(top_srcdir)/m4/hard-locale.m4 \
+ $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_pton.m4 \
$(top_srcdir)/m4/intlmacosx.m4 \
$(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \
- $(top_srcdir)/m4/isblank.m4 $(top_srcdir)/m4/langinfo_h.m4 \
- $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lcmessage.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/limits-h.m4 \
- $(top_srcdir)/m4/link.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/localename.m4 $(top_srcdir)/m4/lock.m4 \
+ $(top_srcdir)/m4/ioctl.m4 $(top_srcdir)/m4/isblank.m4 \
+ $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \
+ $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/limits-h.m4 $(top_srcdir)/m4/link.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/localename.m4 \
+ $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \
$(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \
$(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \
$(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/manywarnings.m4 \
@@ -257,36 +253,45 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/mkostemp.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 \
+ $(top_srcdir)/m4/nanosleep.m4 $(top_srcdir)/m4/netinet_in_h.m4 \
$(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/nocrash.m4 \
$(top_srcdir)/m4/non-recursive-gnulib-prefix-hack.m4 \
$(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/off_t.m4 \
- $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/opendir.m4 \
- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
- $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/m4/open-cloexec.m4 $(top_srcdir)/m4/open.m4 \
+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \
+ $(top_srcdir)/m4/perror.m4 $(top_srcdir)/m4/pipe.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \
$(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \
- $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/read-file.m4 \
- $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readlink.m4 \
- $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \
- $(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/rmdir.m4 \
- $(top_srcdir)/m4/secure_getenv.m4 \
+ $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/raise.m4 \
+ $(top_srcdir)/m4/read-file.m4 $(top_srcdir)/m4/readdir.m4 \
+ $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/realloc.m4 \
+ $(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/rename.m4 \
+ $(top_srcdir)/m4/rmdir.m4 $(top_srcdir)/m4/select.m4 \
$(top_srcdir)/m4/selinux-context-h.m4 \
$(top_srcdir)/m4/selinux-selinux-h.m4 \
$(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/setlocale.m4 \
- $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat.m4 \
- $(top_srcdir)/m4/std-gnu11.m4 $(top_srcdir)/m4/stdalign.m4 \
- $(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \
- $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \
- $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
- $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+ $(top_srcdir)/m4/sigaction.m4 $(top_srcdir)/m4/signal_h.m4 \
+ $(top_srcdir)/m4/signalblocking.m4 $(top_srcdir)/m4/sleep.m4 \
+ $(top_srcdir)/m4/socketlib.m4 $(top_srcdir)/m4/sockets.m4 \
+ $(top_srcdir)/m4/socklen.m4 $(top_srcdir)/m4/sockpfaf.m4 \
+ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat-time.m4 \
+ $(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/std-gnu11.m4 \
+ $(top_srcdir)/m4/stdalign.m4 $(top_srcdir)/m4/stdarg.m4 \
+ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \
+ $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdio_h.m4 \
+ $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strdup.m4 \
+ $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/strerror_r.m4 \
$(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strverscmp.m4 \
- $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_socket_h.m4 \
+ $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_ioctl_h.m4 \
+ $(top_srcdir)/m4/sys_select_h.m4 \
+ $(top_srcdir)/m4/sys_socket_h.m4 \
$(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \
- $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/tempname.m4 \
- $(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/time_h.m4 \
- $(top_srcdir)/m4/ungetc.m4 $(top_srcdir)/m4/unistd_h.m4 \
- $(top_srcdir)/m4/unlocked-io.m4 \
+ $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/sys_uio_h.m4 \
+ $(top_srcdir)/m4/tempname.m4 $(top_srcdir)/m4/threadlib.m4 \
+ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/ungetc.m4 \
+ $(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/unlocked-io.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 \
@@ -306,6 +311,9 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" \
+ "$(DESTDIR)$(man1dir)"
+PROGRAMS = $(bin_PROGRAMS)
LIBRARIES = $(noinst_LIBRARIES)
AM_V_AR = $(am__v_AR_@AM_V@)
am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
@@ -314,7 +322,7 @@ am__v_AR_1 =
lib_libsed_a_AR = $(AR) $(ARFLAGS)
am__DEPENDENCIES_1 =
LIBOBJDIR = lib/
-am__dirstamp = .dirstamp
+am__dirstamp = $(am__leading_dot)dirstamp
am_lib_libsed_a_OBJECTS = lib/copy-acl.$(OBJEXT) lib/set-acl.$(OBJEXT) \
lib/acl-errno-valid.$(OBJEXT) lib/acl-internal.$(OBJEXT) \
lib/get-permissions.$(OBJEXT) lib/set-permissions.$(OBJEXT) \
@@ -329,109 +337,31 @@ am_lib_libsed_a_OBJECTS = lib/copy-acl.$(OBJEXT) lib/set-acl.$(OBJEXT) \
lib/progname.$(OBJEXT) lib/qcopy-acl.$(OBJEXT) \
lib/qset-acl.$(OBJEXT) lib/quotearg.$(OBJEXT) \
lib/se-context.$(OBJEXT) lib/se-selinux.$(OBJEXT) \
- lib/tempname.$(OBJEXT) lib/glthread/threadlib.$(OBJEXT) \
- lib/unistd.$(OBJEXT) lib/version-etc.$(OBJEXT) \
- lib/version-etc-fsf.$(OBJEXT) lib/wctype-h.$(OBJEXT) \
- lib/xmalloc.$(OBJEXT) lib/xalloc-die.$(OBJEXT)
+ lib/stat-time.$(OBJEXT) lib/tempname.$(OBJEXT) \
+ lib/glthread/threadlib.$(OBJEXT) lib/unistd.$(OBJEXT) \
+ lib/version-etc.$(OBJEXT) lib/version-etc-fsf.$(OBJEXT) \
+ lib/wctype-h.$(OBJEXT) lib/xmalloc.$(OBJEXT) \
+ lib/xalloc-die.$(OBJEXT)
lib_libsed_a_OBJECTS = $(am_lib_libsed_a_OBJECTS)
sed_libver_a_AR = $(AR) $(ARFLAGS)
sed_libver_a_LIBADD =
nodist_sed_libver_a_OBJECTS = sed/version.$(OBJEXT)
sed_libver_a_OBJECTS = $(nodist_sed_libver_a_OBJECTS)
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" \
- "$(DESTDIR)$(man1dir)"
-@TEST_REGEX_TRUE@am__EXEEXT_1 = testsuite/bug-regex7$(EXEEXT) \
-@TEST_REGEX_TRUE@ testsuite/bug-regex8$(EXEEXT) \
-@TEST_REGEX_TRUE@ testsuite/bug-regex9$(EXEEXT) \
-@TEST_REGEX_TRUE@ testsuite/bug-regex10$(EXEEXT) \
-@TEST_REGEX_TRUE@ testsuite/bug-regex11$(EXEEXT) \
-@TEST_REGEX_TRUE@ testsuite/bug-regex12$(EXEEXT) \
-@TEST_REGEX_TRUE@ testsuite/bug-regex13$(EXEEXT) \
-@TEST_REGEX_TRUE@ testsuite/bug-regex14$(EXEEXT) \
-@TEST_REGEX_TRUE@ testsuite/bug-regex15$(EXEEXT) \
-@TEST_REGEX_TRUE@ testsuite/bug-regex16$(EXEEXT) \
-@TEST_REGEX_TRUE@ testsuite/bug-regex21$(EXEEXT) \
-@TEST_REGEX_TRUE@ testsuite/bug-regex27$(EXEEXT) \
-@TEST_REGEX_TRUE@ testsuite/bug-regex28$(EXEEXT) \
-@TEST_REGEX_TRUE@ testsuite/tst-pcre$(EXEEXT) \
-@TEST_REGEX_TRUE@ testsuite/tst-boost$(EXEEXT) \
-@TEST_REGEX_TRUE@ testsuite/runtests$(EXEEXT) \
-@TEST_REGEX_TRUE@ testsuite/runptests$(EXEEXT) \
-@TEST_REGEX_TRUE@ testsuite/tst-rxspencer$(EXEEXT) \
-@TEST_REGEX_TRUE@ testsuite/tst-regex2$(EXEEXT)
-PROGRAMS = $(bin_PROGRAMS)
-am_sed_sed_OBJECTS = sed/sed_sed-compile.$(OBJEXT) \
- sed/sed_sed-execute.$(OBJEXT) sed/sed_sed-mbcs.$(OBJEXT) \
- sed/sed_sed-regexp.$(OBJEXT) sed/sed_sed-sed.$(OBJEXT) \
- sed/sed_sed-utils.$(OBJEXT)
+am_sed_sed_OBJECTS = sed/sed-compile.$(OBJEXT) \
+ sed/sed-execute.$(OBJEXT) sed/sed-mbcs.$(OBJEXT) \
+ sed/sed-regexp.$(OBJEXT) sed/sed-sed.$(OBJEXT) \
+ sed/sed-utils.$(OBJEXT)
sed_sed_OBJECTS = $(am_sed_sed_OBJECTS)
sed_sed_LINK = $(CCLD) $(sed_sed_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
-testsuite_bug_regex10_SOURCES = testsuite/bug-regex10.c
-testsuite_bug_regex10_OBJECTS = testsuite/bug-regex10.$(OBJEXT)
-testsuite_bug_regex10_LDADD = $(LDADD)
-testsuite_bug_regex11_SOURCES = testsuite/bug-regex11.c
-testsuite_bug_regex11_OBJECTS = testsuite/bug-regex11.$(OBJEXT)
-testsuite_bug_regex11_LDADD = $(LDADD)
-testsuite_bug_regex12_SOURCES = testsuite/bug-regex12.c
-testsuite_bug_regex12_OBJECTS = testsuite/bug-regex12.$(OBJEXT)
-testsuite_bug_regex12_LDADD = $(LDADD)
-testsuite_bug_regex13_SOURCES = testsuite/bug-regex13.c
-testsuite_bug_regex13_OBJECTS = testsuite/bug-regex13.$(OBJEXT)
-testsuite_bug_regex13_LDADD = $(LDADD)
-testsuite_bug_regex14_SOURCES = testsuite/bug-regex14.c
-testsuite_bug_regex14_OBJECTS = testsuite/bug-regex14.$(OBJEXT)
-testsuite_bug_regex14_LDADD = $(LDADD)
-testsuite_bug_regex15_SOURCES = testsuite/bug-regex15.c
-testsuite_bug_regex15_OBJECTS = testsuite/bug-regex15.$(OBJEXT)
-testsuite_bug_regex15_LDADD = $(LDADD)
-testsuite_bug_regex16_SOURCES = testsuite/bug-regex16.c
-testsuite_bug_regex16_OBJECTS = testsuite/bug-regex16.$(OBJEXT)
-testsuite_bug_regex16_LDADD = $(LDADD)
-testsuite_bug_regex21_SOURCES = testsuite/bug-regex21.c
-testsuite_bug_regex21_OBJECTS = testsuite/bug-regex21.$(OBJEXT)
-testsuite_bug_regex21_LDADD = $(LDADD)
-testsuite_bug_regex27_SOURCES = testsuite/bug-regex27.c
-testsuite_bug_regex27_OBJECTS = testsuite/bug-regex27.$(OBJEXT)
-testsuite_bug_regex27_LDADD = $(LDADD)
-testsuite_bug_regex28_SOURCES = testsuite/bug-regex28.c
-testsuite_bug_regex28_OBJECTS = testsuite/bug-regex28.$(OBJEXT)
-testsuite_bug_regex28_LDADD = $(LDADD)
-testsuite_bug_regex7_SOURCES = testsuite/bug-regex7.c
-testsuite_bug_regex7_OBJECTS = testsuite/bug-regex7.$(OBJEXT)
-testsuite_bug_regex7_LDADD = $(LDADD)
-testsuite_bug_regex8_SOURCES = testsuite/bug-regex8.c
-testsuite_bug_regex8_OBJECTS = testsuite/bug-regex8.$(OBJEXT)
-testsuite_bug_regex8_LDADD = $(LDADD)
-testsuite_bug_regex9_SOURCES = testsuite/bug-regex9.c
-testsuite_bug_regex9_OBJECTS = testsuite/bug-regex9.$(OBJEXT)
-testsuite_bug_regex9_LDADD = $(LDADD)
testsuite_get_mb_cur_max_SOURCES = testsuite/get-mb-cur-max.c
testsuite_get_mb_cur_max_OBJECTS = testsuite/get-mb-cur-max.$(OBJEXT)
testsuite_get_mb_cur_max_DEPENDENCIES = lib/libsed.a \
$(am__DEPENDENCIES_1)
-testsuite_runptests_SOURCES = testsuite/runptests.c
-testsuite_runptests_OBJECTS = testsuite/runptests.$(OBJEXT)
-testsuite_runptests_LDADD = $(LDADD)
-testsuite_runtests_SOURCES = testsuite/runtests.c
-testsuite_runtests_OBJECTS = testsuite/runtests.$(OBJEXT)
-testsuite_runtests_LDADD = $(LDADD)
testsuite_test_mbrtowc_SOURCES = testsuite/test-mbrtowc.c
testsuite_test_mbrtowc_OBJECTS = testsuite/test-mbrtowc.$(OBJEXT)
testsuite_test_mbrtowc_DEPENDENCIES = lib/libsed.a \
$(am__DEPENDENCIES_1)
-testsuite_tst_boost_SOURCES = testsuite/tst-boost.c
-testsuite_tst_boost_OBJECTS = testsuite/tst-boost.$(OBJEXT)
-testsuite_tst_boost_LDADD = $(LDADD)
-testsuite_tst_pcre_SOURCES = testsuite/tst-pcre.c
-testsuite_tst_pcre_OBJECTS = testsuite/tst-pcre.$(OBJEXT)
-testsuite_tst_pcre_LDADD = $(LDADD)
-testsuite_tst_regex2_SOURCES = testsuite/tst-regex2.c
-testsuite_tst_regex2_OBJECTS = testsuite/tst-regex2.$(OBJEXT)
-testsuite_tst_regex2_LDADD = $(LDADD)
-testsuite_tst_rxspencer_SOURCES = testsuite/tst-rxspencer.c
-testsuite_tst_rxspencer_OBJECTS = testsuite/tst-rxspencer.$(OBJEXT)
-testsuite_tst_rxspencer_LDADD = $(LDADD)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
@@ -464,21 +394,22 @@ am__depfiles_remade = lib/$(DEPDIR)/acl-errno-valid.Po \
lib/$(DEPDIR)/gettimeofday.Po lib/$(DEPDIR)/hard-locale.Po \
lib/$(DEPDIR)/isblank.Po lib/$(DEPDIR)/localcharset.Po \
lib/$(DEPDIR)/localeconv.Po lib/$(DEPDIR)/localeinfo.Po \
- lib/$(DEPDIR)/lstat.Po lib/$(DEPDIR)/malloc.Po \
- lib/$(DEPDIR)/malloca.Po lib/$(DEPDIR)/mbrlen.Po \
- lib/$(DEPDIR)/mbrtowc.Po lib/$(DEPDIR)/mbsinit.Po \
- lib/$(DEPDIR)/mbtowc.Po lib/$(DEPDIR)/memchr.Po \
- lib/$(DEPDIR)/memrchr.Po lib/$(DEPDIR)/mkostemp.Po \
- lib/$(DEPDIR)/msvc-inval.Po lib/$(DEPDIR)/msvc-nothrow.Po \
- lib/$(DEPDIR)/nl_langinfo.Po lib/$(DEPDIR)/obstack.Po \
- lib/$(DEPDIR)/progname.Po lib/$(DEPDIR)/qcopy-acl.Po \
- lib/$(DEPDIR)/qset-acl.Po lib/$(DEPDIR)/quotearg.Po \
- lib/$(DEPDIR)/readlink.Po lib/$(DEPDIR)/regcomp.Po \
- lib/$(DEPDIR)/regex.Po lib/$(DEPDIR)/regex_internal.Po \
- lib/$(DEPDIR)/regexec.Po lib/$(DEPDIR)/rename.Po \
- lib/$(DEPDIR)/rmdir.Po lib/$(DEPDIR)/se-context.Po \
- lib/$(DEPDIR)/se-selinux.Po lib/$(DEPDIR)/secure_getenv.Po \
+ lib/$(DEPDIR)/localtime-buffer.Po lib/$(DEPDIR)/lstat.Po \
+ lib/$(DEPDIR)/malloc.Po lib/$(DEPDIR)/malloca.Po \
+ lib/$(DEPDIR)/mbrlen.Po lib/$(DEPDIR)/mbrtowc.Po \
+ lib/$(DEPDIR)/mbsinit.Po lib/$(DEPDIR)/mbtowc.Po \
+ lib/$(DEPDIR)/memchr.Po lib/$(DEPDIR)/memrchr.Po \
+ lib/$(DEPDIR)/mkostemp.Po lib/$(DEPDIR)/msvc-inval.Po \
+ lib/$(DEPDIR)/msvc-nothrow.Po lib/$(DEPDIR)/nl_langinfo.Po \
+ lib/$(DEPDIR)/obstack.Po lib/$(DEPDIR)/progname.Po \
+ lib/$(DEPDIR)/qcopy-acl.Po lib/$(DEPDIR)/qset-acl.Po \
+ lib/$(DEPDIR)/quotearg.Po lib/$(DEPDIR)/readlink.Po \
+ lib/$(DEPDIR)/regcomp.Po lib/$(DEPDIR)/regex.Po \
+ lib/$(DEPDIR)/regex_internal.Po lib/$(DEPDIR)/regexec.Po \
+ lib/$(DEPDIR)/rename.Po lib/$(DEPDIR)/rmdir.Po \
+ lib/$(DEPDIR)/se-context.Po lib/$(DEPDIR)/se-selinux.Po \
lib/$(DEPDIR)/set-acl.Po lib/$(DEPDIR)/set-permissions.Po \
+ lib/$(DEPDIR)/stat-time.Po lib/$(DEPDIR)/stat-w32.Po \
lib/$(DEPDIR)/stat.Po lib/$(DEPDIR)/strerror-override.Po \
lib/$(DEPDIR)/strerror.Po lib/$(DEPDIR)/stripslash.Po \
lib/$(DEPDIR)/strverscmp.Po lib/$(DEPDIR)/tempname.Po \
@@ -488,33 +419,12 @@ am__depfiles_remade = lib/$(DEPDIR)/acl-errno-valid.Po \
lib/$(DEPDIR)/wctype-h.Po lib/$(DEPDIR)/xalloc-die.Po \
lib/$(DEPDIR)/xmalloc.Po lib/glthread/$(DEPDIR)/lock.Po \
lib/glthread/$(DEPDIR)/threadlib.Po \
- sed/$(DEPDIR)/sed_sed-compile.Po \
- sed/$(DEPDIR)/sed_sed-execute.Po sed/$(DEPDIR)/sed_sed-mbcs.Po \
- sed/$(DEPDIR)/sed_sed-regexp.Po sed/$(DEPDIR)/sed_sed-sed.Po \
- sed/$(DEPDIR)/sed_sed-utils.Po sed/$(DEPDIR)/version.Po \
- testsuite/$(DEPDIR)/bug-regex10.Po \
- testsuite/$(DEPDIR)/bug-regex11.Po \
- testsuite/$(DEPDIR)/bug-regex12.Po \
- testsuite/$(DEPDIR)/bug-regex13.Po \
- testsuite/$(DEPDIR)/bug-regex14.Po \
- testsuite/$(DEPDIR)/bug-regex15.Po \
- testsuite/$(DEPDIR)/bug-regex16.Po \
- testsuite/$(DEPDIR)/bug-regex21.Po \
- testsuite/$(DEPDIR)/bug-regex27.Po \
- testsuite/$(DEPDIR)/bug-regex28.Po \
- testsuite/$(DEPDIR)/bug-regex7.Po \
- testsuite/$(DEPDIR)/bug-regex8.Po \
- testsuite/$(DEPDIR)/bug-regex9.Po \
- testsuite/$(DEPDIR)/get-mb-cur-max.Po \
- testsuite/$(DEPDIR)/runptests.Po \
- testsuite/$(DEPDIR)/runtests.Po \
- testsuite/$(DEPDIR)/test-mbrtowc.Po \
- testsuite/$(DEPDIR)/tst-boost.Po \
- testsuite/$(DEPDIR)/tst-pcre.Po \
- testsuite/$(DEPDIR)/tst-regex2.Po \
- testsuite/$(DEPDIR)/tst-rxspencer.Po
+ sed/$(DEPDIR)/sed-compile.Po sed/$(DEPDIR)/sed-execute.Po \
+ sed/$(DEPDIR)/sed-mbcs.Po sed/$(DEPDIR)/sed-regexp.Po \
+ sed/$(DEPDIR)/sed-sed.Po sed/$(DEPDIR)/sed-utils.Po \
+ sed/$(DEPDIR)/version.Po testsuite/$(DEPDIR)/get-mb-cur-max.Po \
+ testsuite/$(DEPDIR)/test-mbrtowc.Po
am__mv = mv -f
-am__set_depbase = depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.[^.]*$$||'`
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
@@ -533,29 +443,10 @@ am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(lib_libsed_a_SOURCES) $(EXTRA_lib_libsed_a_SOURCES) \
$(nodist_sed_libver_a_SOURCES) $(sed_sed_SOURCES) \
- testsuite/bug-regex10.c testsuite/bug-regex11.c \
- testsuite/bug-regex12.c testsuite/bug-regex13.c \
- testsuite/bug-regex14.c testsuite/bug-regex15.c \
- testsuite/bug-regex16.c testsuite/bug-regex21.c \
- testsuite/bug-regex27.c testsuite/bug-regex28.c \
- testsuite/bug-regex7.c testsuite/bug-regex8.c \
- testsuite/bug-regex9.c testsuite/get-mb-cur-max.c \
- testsuite/runptests.c testsuite/runtests.c \
- testsuite/test-mbrtowc.c testsuite/tst-boost.c \
- testsuite/tst-pcre.c testsuite/tst-regex2.c \
- testsuite/tst-rxspencer.c
+ testsuite/get-mb-cur-max.c testsuite/test-mbrtowc.c
DIST_SOURCES = $(lib_libsed_a_SOURCES) $(EXTRA_lib_libsed_a_SOURCES) \
- $(sed_sed_SOURCES) testsuite/bug-regex10.c \
- testsuite/bug-regex11.c testsuite/bug-regex12.c \
- testsuite/bug-regex13.c testsuite/bug-regex14.c \
- testsuite/bug-regex15.c testsuite/bug-regex16.c \
- testsuite/bug-regex21.c testsuite/bug-regex27.c \
- testsuite/bug-regex28.c testsuite/bug-regex7.c \
- testsuite/bug-regex8.c testsuite/bug-regex9.c \
- testsuite/get-mb-cur-max.c testsuite/runptests.c \
- testsuite/runtests.c testsuite/test-mbrtowc.c \
- testsuite/tst-boost.c testsuite/tst-pcre.c \
- testsuite/tst-regex2.c testsuite/tst-rxspencer.c
+ $(sed_sed_SOURCES) testsuite/get-mb-cur-max.c \
+ testsuite/test-mbrtowc.c
AM_V_DVIPS = $(am__v_DVIPS_@AM_V@)
am__v_DVIPS_ = $(am__v_DVIPS_@AM_DEFAULT_V@)
am__v_DVIPS_0 = @echo " DVIPS " $@;
@@ -648,7 +539,8 @@ am__recursive_targets = \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
- cscope check recheck distdir dist dist-all distcheck
+ cscope check recheck distdir distdir-am dist dist-all \
+ distcheck
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
$(LISP)config_h.in
# Read a list of newline-separated strings from the standard input,
@@ -826,9 +718,13 @@ am__set_TESTS_bases = \
bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
bases=`echo $$bases`
RECHECK_LOGS = $(TEST_LOGS)
+am__EXEEXT_1 =
TEST_SUITE_LOG = test-suite.log
-LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
-LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+am__test_logs3 = $(am__test_logs2:.sh.log=.log)
+SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
+SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS)
am__set_b = \
case '$@' in \
*/*) \
@@ -839,16 +735,13 @@ am__set_b = \
*) \
b='$*';; \
esac
-am__test_logs1 = $(TESTS:=.log)
-am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
-TEST_LOGS = $(am__test_logs2:.sh.log=.log)
-SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
-SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS)
+TEST_LOGS = $(am__test_logs3:.pl.log=.log)
+PL_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
+PL_LOG_COMPILE = $(PL_LOG_COMPILER) $(AM_PL_LOG_FLAGS) $(PL_LOG_FLAGS)
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(dist_man_MANS) $(doc_sed_TEXINFOS) \
$(srcdir)/Makefile.in $(srcdir)/config_h.in \
- $(srcdir)/lib/gnulib.mk $(top_srcdir)/build-aux/ar-lib \
- $(top_srcdir)/build-aux/config.guess \
+ $(srcdir)/lib/gnulib.mk $(top_srcdir)/build-aux/config.guess \
$(top_srcdir)/build-aux/config.rpath \
$(top_srcdir)/build-aux/config.sub \
$(top_srcdir)/build-aux/depcomp \
@@ -945,13 +838,17 @@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
ERRNO_H = @ERRNO_H@
EXEEXT = @EXEEXT@
+GETOPT_CDEFS_H = @GETOPT_CDEFS_H@
GETOPT_H = @GETOPT_H@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GLIBC21 = @GLIBC21@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ACCEPT = @GNULIB_ACCEPT@
+GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@
GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BIND = @GNULIB_BIND@
GNULIB_BTOWC = @GNULIB_BTOWC@
GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
@@ -959,6 +856,8 @@ GNULIB_CHDIR = @GNULIB_CHDIR@
GNULIB_CHOWN = @GNULIB_CHOWN@
GNULIB_CLOSE = @GNULIB_CLOSE@
GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@
+GNULIB_CONNECT = @GNULIB_CONNECT@
+GNULIB_CTIME = @GNULIB_CTIME@
GNULIB_DIRFD = @GNULIB_DIRFD@
GNULIB_DPRINTF = @GNULIB_DPRINTF@
GNULIB_DUP = @GNULIB_DUP@
@@ -967,6 +866,7 @@ GNULIB_DUP3 = @GNULIB_DUP3@
GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
GNULIB_ENVIRON = @GNULIB_ENVIRON@
GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@
GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
GNULIB_FCHDIR = @GNULIB_FCHDIR@
GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
@@ -1013,6 +913,9 @@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
+GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@
+GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@
+GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@
GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
@@ -1021,6 +924,9 @@ GNULIB_GRANTPT = @GNULIB_GRANTPT@
GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
GNULIB_IMAXABS = @GNULIB_IMAXABS@
GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+GNULIB_INET_NTOP = @GNULIB_INET_NTOP@
+GNULIB_INET_PTON = @GNULIB_INET_PTON@
+GNULIB_IOCTL = @GNULIB_IOCTL@
GNULIB_ISATTY = @GNULIB_ISATTY@
GNULIB_ISBLANK = @GNULIB_ISBLANK@
GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
@@ -1029,7 +935,9 @@ GNULIB_LCHMOD = @GNULIB_LCHMOD@
GNULIB_LCHOWN = @GNULIB_LCHOWN@
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@
@@ -1076,6 +984,7 @@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
GNULIB_OPEN = @GNULIB_OPEN@
GNULIB_OPENAT = @GNULIB_OPENAT@
GNULIB_OPENDIR = @GNULIB_OPENDIR@
+GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@
GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@
GNULIB_PCLOSE = @GNULIB_PCLOSE@
GNULIB_PERROR = @GNULIB_PERROR@
@@ -1086,6 +995,8 @@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
GNULIB_PREAD = @GNULIB_PREAD@
GNULIB_PRINTF = @GNULIB_PRINTF@
GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PSELECT = @GNULIB_PSELECT@
+GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@
GNULIB_PTSNAME = @GNULIB_PTSNAME@
GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
GNULIB_PUTC = @GNULIB_PUTC@
@@ -1094,6 +1005,7 @@ GNULIB_PUTENV = @GNULIB_PUTENV@
GNULIB_PUTS = @GNULIB_PUTS@
GNULIB_PWRITE = @GNULIB_PWRITE@
GNULIB_QSORT_R = @GNULIB_QSORT_R@
+GNULIB_RAISE = @GNULIB_RAISE@
GNULIB_RANDOM = @GNULIB_RANDOM@
GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
@@ -1101,8 +1013,11 @@ GNULIB_READ = @GNULIB_READ@
GNULIB_READDIR = @GNULIB_READDIR@
GNULIB_READLINK = @GNULIB_READLINK@
GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOCARRAY = @GNULIB_REALLOCARRAY@
GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_RECV = @GNULIB_RECV@
+GNULIB_RECVFROM = @GNULIB_RECVFROM@
GNULIB_REMOVE = @GNULIB_REMOVE@
GNULIB_RENAME = @GNULIB_RENAME@
GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
@@ -1112,11 +1027,20 @@ GNULIB_RPMATCH = @GNULIB_RPMATCH@
GNULIB_SCANDIR = @GNULIB_SCANDIR@
GNULIB_SCANF = @GNULIB_SCANF@
GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
+GNULIB_SELECT = @GNULIB_SELECT@
+GNULIB_SEND = @GNULIB_SEND@
+GNULIB_SENDTO = @GNULIB_SENDTO@
GNULIB_SETENV = @GNULIB_SETENV@
GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
+GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@
+GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@
+GNULIB_SIGACTION = @GNULIB_SIGACTION@
+GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
+GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
GNULIB_SLEEP = @GNULIB_SLEEP@
GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SOCKET = @GNULIB_SOCKET@
GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
GNULIB_STAT = @GNULIB_STAT@
GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@
@@ -1128,6 +1052,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@
@@ -1152,7 +1077,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@
@@ -1182,6 +1109,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@
@@ -1210,13 +1138,16 @@ GNULIB_WMEMSET = @GNULIB_WMEMSET@
GNULIB_WRITE = @GNULIB_WRITE@
GNULIB__EXIT = @GNULIB__EXIT@
GREP = @GREP@
+HAVE_ACCEPT4 = @HAVE_ACCEPT4@
HAVE_ALPHASORT = @HAVE_ALPHASORT@
+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_CLOSEDIR = @HAVE_CLOSEDIR@
+HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@
HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
@@ -1235,12 +1166,16 @@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
+HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@
+HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@
+HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@
HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
+HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@
HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
@@ -1261,6 +1196,7 @@ HAVE_DUP2 = @HAVE_DUP2@
HAVE_DUP3 = @HAVE_DUP3@
HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
HAVE_FACCESSAT = @HAVE_FACCESSAT@
HAVE_FCHDIR = @HAVE_FCHDIR@
HAVE_FCHMODAT = @HAVE_FCHMODAT@
@@ -1291,6 +1227,7 @@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
HAVE_ISBLANK = @HAVE_ISBLANK@
HAVE_ISWBLANK = @HAVE_ISWBLANK@
HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
+HAVE_LANGINFO_ALTMON = @HAVE_LANGINFO_ALTMON@
HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@
HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@
HAVE_LANGINFO_H = @HAVE_LANGINFO_H@
@@ -1323,6 +1260,7 @@ HAVE_MKSTEMP = @HAVE_MKSTEMP@
HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
+HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@
HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
HAVE_OPENAT = @HAVE_OPENAT@
HAVE_OPENDIR = @HAVE_OPENDIR@
@@ -1332,11 +1270,15 @@ HAVE_PIPE = @HAVE_PIPE@
HAVE_PIPE2 = @HAVE_PIPE2@
HAVE_POPEN = @HAVE_POPEN@
HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
+HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
HAVE_PREAD = @HAVE_PREAD@
+HAVE_PSELECT = @HAVE_PSELECT@
+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@
HAVE_RANDOM_R = @HAVE_RANDOM_R@
@@ -1344,17 +1286,23 @@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
HAVE_READDIR = @HAVE_READDIR@
HAVE_READLINK = @HAVE_READLINK@
HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALLOCARRAY = @HAVE_REALLOCARRAY@
HAVE_REALPATH = @HAVE_REALPATH@
HAVE_RENAMEAT = @HAVE_RENAMEAT@
HAVE_REWINDDIR = @HAVE_REWINDDIR@
HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@
HAVE_SCANDIR = @HAVE_SCANDIR@
HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
HAVE_SETENV = @HAVE_SETENV@
HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
+HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
+HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+HAVE_SIGSET_T = @HAVE_SIGSET_T@
HAVE_SLEEP = @HAVE_SLEEP@
HAVE_STDINT_H = @HAVE_STDINT_H@
HAVE_STPCPY = @HAVE_STPCPY@
@@ -1368,18 +1316,29 @@ HAVE_STRTOD = @HAVE_STRTOD@
HAVE_STRTOLL = @HAVE_STRTOLL@
HAVE_STRTOULL = @HAVE_STRTOULL@
HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
+HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@
+HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@
+HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@
HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
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@
HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@
+HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
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@
@@ -1401,6 +1360,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@
@@ -1426,11 +1386,15 @@ HAVE_WMEMCMP = @HAVE_WMEMCMP@
HAVE_WMEMCPY = @HAVE_WMEMCPY@
HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
HAVE_WMEMSET = @HAVE_WMEMSET@
+HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
HAVE__BOOL = @HAVE__BOOL@
HAVE__EXIT = @HAVE__EXIT@
+HOST_CPU = @HOST_CPU@
+HOST_CPU_C_ABI = @HOST_CPU_C_ABI@
INCLUDE_NEXT = @INCLUDE_NEXT@
INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INET_PTON_LIB = @INET_PTON_LIB@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -1450,10 +1414,13 @@ LIBPTH_PREFIX = @LIBPTH_PREFIX@
LIBS = @LIBS@
LIBSED_LIBDEPS = @LIBSED_LIBDEPS@
LIBSED_LTLIBDEPS = @LIBSED_LTLIBDEPS@
+LIBSOCKET = @LIBSOCKET@
LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
LIBTHREAD = @LIBTHREAD@
LIB_ACL = @LIB_ACL@
LIB_HAS_ACL = @LIB_HAS_ACL@
+LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LIB_SELECT = @LIB_SELECT@
LIB_SELINUX = @LIB_SELINUX@
LIMITS_H = @LIMITS_H@
LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
@@ -1473,6 +1440,9 @@ MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
+NETINET_IN_H = @NETINET_IN_H@
+NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@
+NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@
NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@
NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
@@ -1482,16 +1452,22 @@ 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_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@
+NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@
NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@
NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@
NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@
NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@
NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@
NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@
NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
@@ -1505,16 +1481,22 @@ 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_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@
+NEXT_SIGNAL_H = @NEXT_SIGNAL_H@
NEXT_STDARG_H = @NEXT_STDARG_H@
NEXT_STDDEF_H = @NEXT_STDDEF_H@
NEXT_STDINT_H = @NEXT_STDINT_H@
NEXT_STDIO_H = @NEXT_STDIO_H@
NEXT_STDLIB_H = @NEXT_STDLIB_H@
NEXT_STRING_H = @NEXT_STRING_H@
+NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@
+NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@
+NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@
+NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@
NEXT_TIME_H = @NEXT_TIME_H@
NEXT_UNISTD_H = @NEXT_UNISTD_H@
NEXT_WCHAR_H = @NEXT_WCHAR_H@
@@ -1543,11 +1525,13 @@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
+REPLACE_CTIME = @REPLACE_CTIME@
REPLACE_DIRFD = @REPLACE_DIRFD@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_FACCESSAT = @REPLACE_FACCESSAT@
REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
REPLACE_FCLOSE = @REPLACE_FCLOSE@
REPLACE_FCNTL = @REPLACE_FCNTL@
@@ -1576,6 +1560,9 @@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
REPLACE_GMTIME = @REPLACE_GMTIME@
+REPLACE_INET_NTOP = @REPLACE_INET_NTOP@
+REPLACE_INET_PTON = @REPLACE_INET_PTON@
+REPLACE_IOCTL = @REPLACE_IOCTL@
REPLACE_ISATTY = @REPLACE_ISATTY@
REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
@@ -1613,11 +1600,14 @@ REPLACE_PERROR = @REPLACE_PERROR@
REPLACE_POPEN = @REPLACE_POPEN@
REPLACE_PREAD = @REPLACE_PREAD@
REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_PSELECT = @REPLACE_PSELECT@
+REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@
REPLACE_PTSNAME = @REPLACE_PTSNAME@
REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
REPLACE_PUTENV = @REPLACE_PUTENV@
REPLACE_PWRITE = @REPLACE_PWRITE@
REPLACE_QSORT_R = @REPLACE_QSORT_R@
+REPLACE_RAISE = @REPLACE_RAISE@
REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
REPLACE_READ = @REPLACE_READ@
REPLACE_READLINK = @REPLACE_READLINK@
@@ -1628,6 +1618,7 @@ REPLACE_REMOVE = @REPLACE_REMOVE@
REPLACE_RENAME = @REPLACE_RENAME@
REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_SELECT = @REPLACE_SELECT@
REPLACE_SETENV = @REPLACE_SETENV@
REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
REPLACE_SLEEP = @REPLACE_SLEEP@
@@ -1642,6 +1633,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@
@@ -1658,7 +1650,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@
@@ -1671,6 +1665,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@
@@ -1690,6 +1685,8 @@ STDBOOL_H = @STDBOOL_H@
STDDEF_H = @STDDEF_H@
STDINT_H = @STDINT_H@
STRIP = @STRIP@
+SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@
+SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
@@ -1706,6 +1703,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@
XFAIL_TESTS = @XFAIL_TESTS@
XGETTEXT = @XGETTEXT@
@@ -1716,9 +1715,9 @@ 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__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
@@ -1778,33 +1777,17 @@ AM_CPPFLAGS = -I$(top_srcdir) \
-I$(top_builddir)/sed
AM_CFLAGS =
-
-# 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 = .version $(ALLOCA_H) lib/configmake.h lib/ctype.h \
- $(ERRNO_H) lib/fcntl.h $(GETOPT_H) lib/langinfo.h $(LIMITS_H) \
- lib/locale.h lib/selinux/selinux.h $(SELINUX_CONTEXT_H) \
- lib/arg-nonnull.h lib/c++defs.h lib/unused-parameter.h \
- lib/warn-on-use.h $(STDALIGN_H) $(STDARG_H) $(STDBOOL_H) \
+ $(ERRNO_H) lib/fcntl.h $(GETOPT_H) $(GETOPT_CDEFS_H) \
+ lib/langinfo.h $(LIMITS_H) lib/locale.h lib/selinux/selinux.h \
+ $(SELINUX_CONTEXT_H) $(STDALIGN_H) $(STDARG_H) $(STDBOOL_H) \
$(STDDEF_H) $(STDINT_H) lib/stdio.h lib/stdlib.h lib/string.h \
lib/sys/stat.h lib/sys/time.h lib/sys/types.h lib/time.h \
lib/unistd.h lib/wchar.h lib/wctype.h sed/version.c \
sed/version.h
CLEANFILES = lib/configmake.h lib/configmake.h-t lib/charset.alias \
lib/ref-add.sed lib/ref-del.sed tmp* core *.core \
- $(EXTRA_PROGRAMS) *.*out *.log eval.in2
+ $(EXTRA_PROGRAMS) *.*out *.log
EXTRA_DIST = BUGS THANKS.in .version .mailmap ChangeLog-2014 \
po/ChangeLog-2014 bootstrap bootstrap.conf build-aux/help2man \
thanks-gen lib/acl-internal.h lib/acl.h lib/acl_entries.c \
@@ -1815,12 +1798,14 @@ EXTRA_DIST = BUGS THANKS.in .version .mailmap ChangeLog-2014 \
lib/dirname.h \
$(top_srcdir)/build-aux/do-release-commit-and-tag \
lib/dosname.h lib/errno.in.h lib/error.c lib/error.h \
- lib/exitfail.h lib/fcntl.in.h lib/fpending.c lib/fpending.h \
- lib/stdio-impl.h lib/fstat.c lib/fwriting.c lib/fwriting.h \
- lib/stdio-impl.h $(top_srcdir)/build-aux/gendocs.sh \
- lib/getdelim.c lib/getopt.c lib/getopt.in.h lib/getopt1.c \
- lib/getopt_int.h lib/gettimeofday.c \
- $(top_srcdir)/build-aux/git-version-gen \
+ lib/exitfail.h lib/fcntl.in.h lib/filename.h lib/fpending.c \
+ lib/fpending.h lib/stdio-impl.h lib/fstat.c lib/stat-w32.c \
+ lib/stat-w32.h lib/fwriting.c lib/fwriting.h lib/stdio-impl.h \
+ $(top_srcdir)/build-aux/gendocs.sh lib/getdelim.c \
+ lib/getopt-cdefs.in.h lib/getopt-core.h lib/getopt-ext.h \
+ lib/getopt-pfx-core.h lib/getopt-pfx-ext.h lib/getopt.c \
+ lib/getopt.in.h lib/getopt1.c lib/getopt_int.h \
+ lib/gettimeofday.c $(top_srcdir)/build-aux/git-version-gen \
$(top_srcdir)/build-aux/gitlog-to-changelog \
$(top_srcdir)/build-aux/gnu-web-doc-update \
$(top_srcdir)/GNUmakefile $(top_srcdir)/build-aux/gnupload \
@@ -1828,24 +1813,21 @@ EXTRA_DIST = BUGS THANKS.in .version .mailmap ChangeLog-2014 \
lib/ignore-value.h lib/intprops.h lib/isblank.c \
lib/langinfo.in.h lib/limits.in.h lib/config.charset \
lib/ref-add.sin lib/ref-del.sin lib/locale.in.h \
- lib/localeconv.c lib/lstat.c $(top_srcdir)/maint.mk \
- lib/malloc.c lib/malloca.h lib/malloca.valgrind lib/mbrlen.c \
- lib/mbrtowc.c lib/mbsinit.c lib/mbtowc-impl.h lib/mbtowc.c \
- lib/memchr.c lib/memchr.valgrind lib/memrchr.c lib/mkostemp.c \
- lib/msvc-inval.c lib/msvc-inval.h lib/msvc-nothrow.c \
- lib/msvc-nothrow.h lib/nl_langinfo.c \
+ lib/localeconv.c lib/localtime-buffer.c lib/localtime-buffer.h \
+ lib/lstat.c $(top_srcdir)/maint.mk lib/malloc.c lib/malloca.h \
+ lib/mbrlen.c lib/mbrtowc.c lib/mbsinit.c lib/mbtowc-impl.h \
+ lib/mbtowc.c lib/memchr.c lib/memchr.valgrind lib/memrchr.c \
+ lib/mkostemp.c lib/msvc-inval.c lib/msvc-inval.h \
+ lib/msvc-nothrow.c lib/msvc-nothrow.h lib/nl_langinfo.c \
$(top_srcdir)/build-aux/prefix-gnulib-mk lib/obstack.c \
lib/obstack.h lib/pathmax.h lib/quote.h lib/quote.h \
- lib/quotearg.h lib/readlink.c $(top_srcdir)/README-release \
- lib/regcomp.c lib/regex.c lib/regex.h lib/regex_internal.c \
- lib/regex_internal.h lib/regexec.c lib/rename.c lib/rmdir.c \
- lib/same-inode.h lib/secure_getenv.c lib/getfilecon.c \
- $(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 lib/stat.c \
- lib/stat-macros.h lib/stdalign.in.h lib/stdarg.in.h \
+ lib/quotearg.h lib/readlink.c lib/regcomp.c lib/regex.c \
+ lib/regex.h lib/regex_internal.c lib/regex_internal.h \
+ lib/regexec.c lib/rename.c lib/rmdir.c lib/same-inode.h \
+ lib/getfilecon.c lib/_Noreturn.h lib/arg-nonnull.h \
+ lib/c++defs.h lib/unused-parameter.h lib/warn-on-use.h \
+ lib/stat-w32.c lib/stat-w32.h lib/stat.c lib/stat-macros.h \
+ lib/stat-time.h lib/stdalign.in.h lib/stdarg.in.h \
lib/stdbool.in.h lib/stddef.in.h lib/stdint.in.h \
lib/stdio.in.h lib/stdlib.in.h lib/streq.h lib/strerror.c \
lib/strerror-override.c lib/strerror-override.h \
@@ -1858,116 +1840,38 @@ EXTRA_DIST = BUGS THANKS.in .version .mailmap ChangeLog-2014 \
$(top_srcdir)/build-aux/vc-list-files lib/verify.h \
lib/wchar.in.h lib/wcrtomb.c lib/wctob.c lib/wctomb-impl.h \
lib/wctomb.c lib/wctype.in.h lib/xalloc.h \
- lib/xalloc-oversized.h $(T) testsuite/init.sh init.cfg \
- testsuite/envvar-check testsuite/PCRE.tests \
+ lib/xalloc-oversized.h $(T) testsuite/Coreutils.pm \
+ testsuite/CuSkip.pm testsuite/CuTmpdir.pm testsuite/init.sh \
+ init.cfg testsuite/envvar-check testsuite/PCRE.tests \
testsuite/BOOST.tests testsuite/SPENCER.tests \
- testsuite/runtest testsuite/Makefile.tests \
- testsuite/0range.good testsuite/0range.inp \
- testsuite/0range.sed testsuite/8bit.good testsuite/8bit.inp \
- testsuite/8bit.sed testsuite/8to7.good testsuite/8to7.inp \
- testsuite/8to7.sed testsuite/allsub.good testsuite/allsub.inp \
- testsuite/allsub.sed testsuite/amp-escape.good \
- testsuite/amp-escape.inp testsuite/amp-escape.sed \
- testsuite/appquit.good testsuite/appquit.inp \
- testsuite/appquit.sed testsuite/binary.good \
- testsuite/binary.inp testsuite/binary.sed \
- testsuite/binary2.sed testsuite/binary3.sed \
- testsuite/bkslashes.good testsuite/bkslashes.inp \
- testsuite/bkslashes.sed testsuite/brackets.good \
- testsuite/brackets.inp testsuite/brackets.sed \
- testsuite/bsd.good testsuite/bsd.sh testsuite/cv-vars.good \
- testsuite/cv-vars.inp testsuite/cv-vars.sed \
- testsuite/classes.good testsuite/classes.inp \
- testsuite/classes.sed testsuite/dc.good testsuite/dc.inp \
- testsuite/dc.sed testsuite/distrib.good testsuite/distrib.inp \
- testsuite/distrib.sed testsuite/distrib.sh \
- testsuite/dollar.good testsuite/dollar.inp \
- testsuite/dollar.sed testsuite/empty.good testsuite/empty.inp \
- testsuite/empty.sed testsuite/enable.good testsuite/enable.inp \
- testsuite/enable.sed testsuite/eval.good testsuite/eval.inp \
- testsuite/eval.sed testsuite/factor.good testsuite/factor.inp \
- testsuite/factor.sed testsuite/fasts.good testsuite/fasts.inp \
- testsuite/fasts.sed testsuite/flipcase.good \
- testsuite/flipcase.inp testsuite/flipcase.sed \
- testsuite/head.good testsuite/head.inp testsuite/head.sed \
- testsuite/inclib.good testsuite/inclib.inp \
- testsuite/inclib.sed testsuite/insens.good \
- testsuite/insens.inp testsuite/insens.sed \
- testsuite/insert.good testsuite/insert.inp \
- testsuite/insert.sed testsuite/khadafy.good \
- testsuite/khadafy.inp testsuite/khadafy.sed \
- testsuite/linecnt.good testsuite/linecnt.inp \
- testsuite/linecnt.sed testsuite/space.good testsuite/space.inp \
- testsuite/space.sed testsuite/mac-mf.good testsuite/mac-mf.inp \
+ testsuite/8bit.good testsuite/8bit.inp testsuite/binary.sed \
+ testsuite/binary2.sed testsuite/binary3.sed testsuite/bsd.good \
+ testsuite/bsd.sh testsuite/dc.sed testsuite/distrib.inp \
+ testsuite/mac-mf.good testsuite/mac-mf.inp \
testsuite/mac-mf.sed testsuite/madding.good \
testsuite/madding.inp testsuite/madding.sed \
- testsuite/manis.good testsuite/manis.inp testsuite/manis.sed \
- testsuite/middle.good testsuite/middle.sed \
- testsuite/middle.inp testsuite/modulo.good \
- testsuite/modulo.sed testsuite/modulo.inp \
- testsuite/newjis.good testsuite/newjis.inp \
- testsuite/newjis.sed testsuite/newline-anchor.good \
- testsuite/newline-anchor.inp testsuite/newline-anchor.sed \
- testsuite/noeol.good testsuite/noeol.inp testsuite/noeol.sed \
- testsuite/noeolw.good testsuite/noeolw.1good \
- testsuite/noeolw.2good testsuite/noeolw.sed \
- testsuite/numsub.good testsuite/numsub.inp \
- testsuite/numsub.sed testsuite/numsub2.good \
- testsuite/numsub2.inp testsuite/numsub2.sed \
- testsuite/numsub3.good testsuite/numsub3.inp \
- testsuite/numsub3.sed testsuite/numsub4.good \
- testsuite/numsub4.inp testsuite/numsub4.sed \
- testsuite/numsub5.good testsuite/numsub5.inp \
- testsuite/numsub5.sed testsuite/readin.good \
- testsuite/readin.inp testsuite/readin.sed \
- testsuite/recall.good testsuite/recall.inp \
- testsuite/recall.sed testsuite/recall2.good \
- testsuite/recall2.inp testsuite/recall2.sed testsuite/sep.good \
- testsuite/sep.inp testsuite/sep.sed testsuite/subwrite.inp \
- testsuite/subwrite.sed testsuite/subwrt1.good \
- testsuite/subwrt2.good testsuite/uniq.good testsuite/uniq.inp \
- testsuite/uniq.sed testsuite/utf8-1.good testsuite/utf8-1.inp \
- testsuite/utf8-1.sed testsuite/utf8-2.good \
- testsuite/utf8-2.inp testsuite/utf8-2.sed \
- testsuite/utf8-3.good testsuite/utf8-3.inp \
- testsuite/utf8-3.sed testsuite/utf8-4.good \
- testsuite/utf8-4.inp testsuite/utf8-4.sed \
- testsuite/badenc.good testsuite/badenc.inp \
- testsuite/badenc.sed testsuite/writeout.inp \
- testsuite/writeout.sed testsuite/wrtout1.good \
- testsuite/wrtout2.good testsuite/xabcx.good \
- testsuite/xabcx.inp testsuite/xabcx.sed testsuite/xbxcx.good \
- testsuite/xbxcx.inp testsuite/xbxcx.sed testsuite/xbxcx3.good \
- testsuite/xbxcx3.inp testsuite/xbxcx3.sed \
- testsuite/xemacs.good testsuite/xemacs.inp \
- testsuite/xemacs.sed testsuite/y-bracket.good \
- testsuite/y-bracket.sed testsuite/y-bracket.inp \
- testsuite/y-zero.good testsuite/y-zero.sed \
- testsuite/y-zero.inp testsuite/y-newline.good \
- testsuite/y-newline.sed testsuite/y-newline.inp \
- testsuite/zero-anchor.good testsuite/zero-anchor.sed \
- testsuite/zero-anchor.inp
+ testsuite/uniq.good testsuite/uniq.inp testsuite/uniq.sed \
+ testsuite/xemacs.good testsuite/xemacs.inp
MAINTAINERCLEANFILES =
MOSTLYCLEANDIRS = lib/selinux lib/sys
MOSTLYCLEANFILES = lib/core lib/*.stackdump lib/alloca.h \
lib/alloca.h-t lib/ctype.h lib/ctype.h-t lib/errno.h \
lib/errno.h-t lib/fcntl.h lib/fcntl.h-t lib/getopt.h \
- lib/getopt.h-t lib/langinfo.h lib/langinfo.h-t lib/limits.h \
- lib/limits.h-t lib/locale.h lib/locale.h-t \
- lib/selinux/selinux.h lib/selinux/selinux.h-t \
- lib/selinux/context.h lib/selinux/context.h-t \
- lib/arg-nonnull.h lib/arg-nonnull.h-t lib/c++defs.h \
- lib/c++defs.h-t lib/unused-parameter.h \
- lib/unused-parameter.h-t lib/warn-on-use.h lib/warn-on-use.h-t \
- lib/stdalign.h lib/stdalign.h-t lib/stdarg.h lib/stdarg.h-t \
- lib/stdbool.h lib/stdbool.h-t lib/stddef.h lib/stddef.h-t \
- lib/stdint.h lib/stdint.h-t lib/stdio.h lib/stdio.h-t \
- lib/stdlib.h lib/stdlib.h-t lib/string.h lib/string.h-t \
- lib/sys/stat.h lib/sys/stat.h-t lib/sys/time.h \
- lib/sys/time.h-t lib/sys/types.h lib/sys/types.h-t lib/time.h \
- lib/time.h-t lib/unistd.h lib/unistd.h-t lib/wchar.h \
- lib/wchar.h-t lib/wctype.h lib/wctype.h-t
+ lib/getopt.h-t lib/getopt-cdefs.h lib/getopt-cdefs.h-t \
+ lib/langinfo.h lib/langinfo.h-t lib/limits.h lib/limits.h-t \
+ lib/locale.h lib/locale.h-t lib/selinux/selinux.h \
+ lib/selinux/selinux.h-t lib/selinux/context.h \
+ lib/selinux/context.h-t lib/stdalign.h lib/stdalign.h-t \
+ lib/stdarg.h lib/stdarg.h-t lib/stdbool.h lib/stdbool.h-t \
+ lib/stddef.h lib/stddef.h-t lib/stdint.h lib/stdint.h-t \
+ lib/stdio.h lib/stdio.h-t lib/stdlib.h lib/stdlib.h-t \
+ lib/string.h lib/string.h-t lib/sys/stat.h lib/sys/stat.h-t \
+ lib/sys/time.h lib/sys/time.h-t lib/sys/types.h \
+ lib/sys/types.h-t lib/time.h lib/time.h-t lib/unistd.h \
+ lib/unistd.h-t lib/wchar.h lib/wchar.h-t lib/wctype.h \
+ lib/wctype.h-t
SUFFIXES =
+# No GNU Make output.
noinst_LIBRARIES = lib/libsed.a sed/libver.a
noinst_DATA =
noinst_HEADERS = basicdefs.h sed/sed.h sed/utils.h \
@@ -1996,23 +1900,23 @@ lib_libsed_a_SOURCES = lib/copy-acl.c lib/set-acl.c \
lib/malloca.c lib/minmax.h lib/progname.h lib/progname.c \
lib/qcopy-acl.c lib/qset-acl.c lib/quotearg.c \
lib/se-context.in.h lib/se-selinux.in.h lib/se-context.c \
- lib/se-selinux.c lib/tempname.c lib/glthread/threadlib.c \
- lib/unistd.c lib/version-etc.h lib/version-etc.c \
- lib/version-etc-fsf.c lib/wctype-h.c lib/xmalloc.c \
- lib/xalloc-die.c
+ lib/se-selinux.c lib/stat-time.c lib/tempname.c \
+ lib/glthread/threadlib.c lib/unistd.c lib/version-etc.h \
+ lib/version-etc.c lib/version-etc-fsf.c lib/wctype-h.c \
+ lib/xmalloc.c lib/xalloc-die.c
lib_libsed_a_LIBADD = $(gl_LIBOBJS) @ALLOCA@
lib_libsed_a_DEPENDENCIES = $(gl_LIBOBJS) @ALLOCA@
EXTRA_lib_libsed_a_SOURCES = lib/acl_entries.c lib/alloca.c \
lib/btowc.c lib/canonicalize-lgpl.c lib/error.c lib/fpending.c \
- lib/fstat.c lib/fwriting.c lib/getdelim.c lib/getopt.c \
- lib/getopt1.c lib/gettimeofday.c lib/isblank.c \
- lib/localeconv.c lib/lstat.c lib/malloc.c lib/mbrlen.c \
- lib/mbrtowc.c lib/mbsinit.c lib/mbtowc.c lib/memchr.c \
- lib/memrchr.c lib/mkostemp.c lib/msvc-inval.c \
- lib/msvc-nothrow.c lib/nl_langinfo.c lib/obstack.c \
- lib/readlink.c lib/regcomp.c lib/regex.c lib/regex_internal.c \
- lib/regexec.c lib/rename.c lib/rmdir.c lib/secure_getenv.c \
- lib/getfilecon.c lib/stat.c lib/strerror.c \
+ lib/fstat.c lib/stat-w32.c lib/fwriting.c lib/getdelim.c \
+ lib/getopt.c lib/getopt1.c lib/gettimeofday.c lib/isblank.c \
+ lib/localeconv.c lib/localtime-buffer.c lib/lstat.c \
+ lib/malloc.c lib/mbrlen.c lib/mbrtowc.c lib/mbsinit.c \
+ lib/mbtowc.c lib/memchr.c lib/memrchr.c lib/mkostemp.c \
+ lib/msvc-inval.c lib/msvc-nothrow.c lib/nl_langinfo.c \
+ lib/obstack.c lib/readlink.c lib/regcomp.c lib/regex.c \
+ lib/regex_internal.c lib/regexec.c lib/rename.c lib/rmdir.c \
+ lib/getfilecon.c lib/stat-w32.c lib/stat.c lib/strerror.c \
lib/strerror-override.c lib/strverscmp.c lib/wcrtomb.c \
lib/wctob.c lib/wctomb.c
@@ -2024,13 +1928,29 @@ charset_alias = $(DESTDIR)$(libdir)/charset.alias
charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
# 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)/lib/_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 = $(top_srcdir)/lib/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 = $(top_srcdir)/lib/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 = lib/arg-nonnull.h
-CXXDEFS_H = lib/c++defs.h
-UNUSED_PARAMETER_H = lib/unused-parameter.h
-WARN_ON_USE_H = lib/warn-on-use.h
+UNUSED_PARAMETER_H = $(top_srcdir)/lib/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 = $(top_srcdir)/lib/warn-on-use.h
sed_sed_SOURCES = \
sed/compile.c \
sed/execute.c \
@@ -2051,55 +1971,57 @@ dist_noinst_DATA = doc/sed.x doc/sed-dummy.1
HELP2MAN = $(top_srcdir)/build-aux/help2man
SEDBIN = sed/sed
AM_MAKEINFOHTMLFLAGS = --no-split
-TEST_EXTENSIONS = .sh
+TEST_EXTENSIONS = .sh .pl
+@HAVE_PERL_FALSE@TESTSUITE_PERL = $(SHELL) $(srcdir)/no-perl
+@HAVE_PERL_TRUE@TESTSUITE_PERL = $(PERL)
+
+# Options passed to the perl invocations running the perl test scripts.
+# '$f' is set by the Automake-generated test harness to the path of the
+# current test script stripped of VPATH components, and is used by the
+# CuTmpdir module to determine the name of the temporary files to be
+# used. Note that $f is a shell variable, not a make macro, so the use
+# of '$$f' below is correct, and not a typo.
+TESTSUITE_PERL_OPTIONS = -w -I$(srcdir)/testsuite -MCuSkip -MCoreutils \
+ -M"CuTmpdir qw($$f)"
SH_LOG_COMPILER = $(SHELL)
+PL_LOG_COMPILER = $(TESTSUITE_PERL) $(TESTSUITE_PERL_OPTIONS)
+
+# Ensure that anything not covered by the above evokes failure.
+LOG_COMPILER = false
# Put new, init.sh-using tests here, so that each name
# is listed in only one place.
-T = testsuite/cmd-l.sh testsuite/cmd-R.sh \
+
+# Old tests converted to newer init.sh style
+T = testsuite/misc.pl testsuite/cmd-l.sh testsuite/cmd-R.sh \
testsuite/colon-with-no-label.sh testsuite/comment-n.sh \
testsuite/compile-errors.sh testsuite/compile-tests.sh \
- testsuite/convert-number.sh testsuite/execute-tests.sh \
- testsuite/help-version.sh testsuite/in-place-hyphen.sh \
+ testsuite/convert-number.sh testsuite/command-endings.sh \
+ testsuite/execute-tests.sh testsuite/help-version.sh \
+ testsuite/in-place-hyphen.sh \
testsuite/in-place-suffix-backup.sh \
- testsuite/invalid-mb-seq-UMR.sh testsuite/mb-bad-delim.sh \
- testsuite/mb-charclass-non-utf8.sh testsuite/mb-match-slash.sh \
- testsuite/mb-y-translate.sh testsuite/newline-dfa-bug.sh \
- testsuite/normalize-text.sh testsuite/nulldata.sh \
- testsuite/panic-tests.sh testsuite/posix-char-class.sh \
- testsuite/posix-mode-addr.sh testsuite/posix-mode-bad-ref.sh \
+ testsuite/inplace-selinux.sh testsuite/invalid-mb-seq-UMR.sh \
+ testsuite/mb-bad-delim.sh testsuite/mb-charclass-non-utf8.sh \
+ testsuite/mb-match-slash.sh testsuite/mb-y-translate.sh \
+ testsuite/newline-dfa-bug.sh testsuite/normalize-text.sh \
+ testsuite/nulldata.sh testsuite/panic-tests.sh \
+ testsuite/posix-char-class.sh testsuite/posix-mode-addr.sh \
+ testsuite/posix-mode-bad-ref.sh testsuite/posix-mode-ERE.sh \
testsuite/posix-mode-s.sh testsuite/posix-mode-N.sh \
testsuite/range-overlap.sh testsuite/recursive-escape-c.sh \
- testsuite/regex-errors.sh testsuite/sandbox.sh \
- testsuite/stdin-prog.sh testsuite/subst-options.sh \
- testsuite/subst-mb-incomplete.sh \
+ testsuite/regex-errors.sh testsuite/regex-max-int.sh \
+ testsuite/sandbox.sh testsuite/stdin-prog.sh \
+ testsuite/subst-options.sh testsuite/subst-mb-incomplete.sh \
testsuite/subst-replacement.sh testsuite/temp-file-cleanup.sh \
testsuite/title-case.sh testsuite/unbuffered.sh \
- $(am__append_1)
-TESTS = $(check_PROGRAMS) $(SEDTESTS) $(T)
-SEDTESTS = $(am__append_3) testsuite/appquit testsuite/enable \
- testsuite/sep testsuite/inclib testsuite/8bit testsuite/newjis \
- testsuite/xabcx testsuite/dollar testsuite/noeol \
- testsuite/noeolw testsuite/modulo testsuite/numsub \
- testsuite/numsub2 testsuite/numsub3 testsuite/numsub4 \
- testsuite/numsub5 testsuite/0range testsuite/bkslashes \
- testsuite/head testsuite/madding testsuite/mac-mf \
- testsuite/empty testsuite/xbxcx testsuite/xbxcx3 \
- testsuite/recall testsuite/recall2 testsuite/xemacs \
- testsuite/fasts testsuite/uniq testsuite/manis \
- testsuite/khadafy testsuite/linecnt testsuite/eval \
- testsuite/distrib testsuite/8to7 testsuite/y-bracket \
- testsuite/y-newline testsuite/y-zero testsuite/allsub \
- testsuite/cv-vars testsuite/classes testsuite/middle \
- testsuite/bsd testsuite/stdin testsuite/flipcase \
- testsuite/insens testsuite/subwrite testsuite/writeout \
- testsuite/readin testsuite/insert testsuite/utf8-1 \
- testsuite/utf8-2 testsuite/utf8-3 testsuite/utf8-4 \
- testsuite/badenc testsuite/inplace-hold testsuite/brackets \
- testsuite/amp-escape testsuite/help testsuite/file \
- testsuite/quiet testsuite/factor testsuite/binary3 \
- testsuite/binary2 testsuite/binary testsuite/dc \
- testsuite/newline-anchor testsuite/zero-anchor
+ $(am__append_1) testsuite/8bit.sh testsuite/8to7.sh \
+ testsuite/badenc.sh testsuite/binary.sh \
+ testsuite/bsd-wrapper.sh testsuite/dc.sh testsuite/distrib.sh \
+ testsuite/eval.sh testsuite/help.sh testsuite/inplace-hold.sh \
+ testsuite/mac-mf.sh testsuite/madding.sh testsuite/newjis.sh \
+ testsuite/stdin.sh testsuite/utf8-ru.sh testsuite/uniq.sh \
+ testsuite/xemacs.sh
+SEDTESTS =
testsuite_get_mb_cur_max_LDADD = lib/libsed.a $(INTLLIBS)
testsuite_test_mbrtowc_LDADD = lib/libsed.a $(INTLLIBS)
@@ -2150,16 +2072,15 @@ TESTS_ENVIRONMENT = \
PACKAGE_VERSION=$(PACKAGE_VERSION) \
PERL='$(PERL)' \
SHELL='$(SHELL)' \
- PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH" \
+ PATH='$(abs_top_builddir)/sed$(PATH_SEPARATOR)'"$$PATH" \
$(LOCALCHARSET_TESTS_ENVIRONMENT) \
; 9>&2
-LOG_COMPILER = $(top_srcdir)/testsuite/runtest
all: $(BUILT_SOURCES) config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
-.SUFFIXES: .c .dvi .log .o .obj .ps .sed .sh .sh$(EXEEXT) .sin .trs
+.SUFFIXES: .c .dvi .log .o .obj .pl .pl$(EXEEXT) .ps .sed .sh .sh$(EXEEXT) .sin .trs
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/lib/local.mk $(srcdir)/lib/gnulib.mk $(top_srcdir)/sed/local.mk $(top_srcdir)/doc/local.mk $(top_srcdir)/testsuite/local.mk $(am__configure_deps)
@@ -2209,12 +2130,58 @@ $(srcdir)/config_h.in: $(am__configure_deps)
distclean-hdr:
-rm -f config.h stamp-h1
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ fi; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p \
+ ; then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' \
+ -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+clean-checkPROGRAMS:
+ -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
lib/$(am__dirstamp):
- @$(MKDIR_P) lib
+ @$(MKDIR_P) lib/
@: > lib/$(am__dirstamp)
+lib/alloca.$(OBJEXT): lib/$(am__dirstamp)
lib/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) lib/$(DEPDIR)
@: > lib/$(DEPDIR)/$(am__dirstamp)
@@ -2279,6 +2246,8 @@ lib/se-context.$(OBJEXT): lib/$(am__dirstamp) \
lib/$(DEPDIR)/$(am__dirstamp)
lib/se-selinux.$(OBJEXT): lib/$(am__dirstamp) \
lib/$(DEPDIR)/$(am__dirstamp)
+lib/stat-time.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
lib/tempname.$(OBJEXT): lib/$(am__dirstamp) \
lib/$(DEPDIR)/$(am__dirstamp)
lib/glthread/threadlib.$(OBJEXT): lib/glthread/$(am__dirstamp) \
@@ -2306,6 +2275,8 @@ lib/error.$(OBJEXT): lib/$(am__dirstamp) lib/$(DEPDIR)/$(am__dirstamp)
lib/fpending.$(OBJEXT): lib/$(am__dirstamp) \
lib/$(DEPDIR)/$(am__dirstamp)
lib/fstat.$(OBJEXT): lib/$(am__dirstamp) lib/$(DEPDIR)/$(am__dirstamp)
+lib/stat-w32.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
lib/fwriting.$(OBJEXT): lib/$(am__dirstamp) \
lib/$(DEPDIR)/$(am__dirstamp)
lib/getdelim.$(OBJEXT): lib/$(am__dirstamp) \
@@ -2320,6 +2291,8 @@ lib/isblank.$(OBJEXT): lib/$(am__dirstamp) \
lib/$(DEPDIR)/$(am__dirstamp)
lib/localeconv.$(OBJEXT): lib/$(am__dirstamp) \
lib/$(DEPDIR)/$(am__dirstamp)
+lib/localtime-buffer.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
lib/lstat.$(OBJEXT): lib/$(am__dirstamp) lib/$(DEPDIR)/$(am__dirstamp)
lib/malloc.$(OBJEXT): lib/$(am__dirstamp) \
lib/$(DEPDIR)/$(am__dirstamp)
@@ -2357,8 +2330,6 @@ lib/regexec.$(OBJEXT): lib/$(am__dirstamp) \
lib/rename.$(OBJEXT): lib/$(am__dirstamp) \
lib/$(DEPDIR)/$(am__dirstamp)
lib/rmdir.$(OBJEXT): lib/$(am__dirstamp) lib/$(DEPDIR)/$(am__dirstamp)
-lib/secure_getenv.$(OBJEXT): lib/$(am__dirstamp) \
- lib/$(DEPDIR)/$(am__dirstamp)
lib/getfilecon.$(OBJEXT): lib/$(am__dirstamp) \
lib/$(DEPDIR)/$(am__dirstamp)
lib/stat.$(OBJEXT): lib/$(am__dirstamp) lib/$(DEPDIR)/$(am__dirstamp)
@@ -2391,62 +2362,17 @@ sed/libver.a: $(sed_libver_a_OBJECTS) $(sed_libver_a_DEPENDENCIES) $(EXTRA_sed_l
$(AM_V_at)-rm -f sed/libver.a
$(AM_V_AR)$(sed_libver_a_AR) sed/libver.a $(sed_libver_a_OBJECTS) $(sed_libver_a_LIBADD)
$(AM_V_at)$(RANLIB) sed/libver.a
-install-binPROGRAMS: $(bin_PROGRAMS)
- @$(NORMAL_INSTALL)
- @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
- fi; \
- for p in $$list; do echo "$$p $$p"; done | \
- sed 's/$(EXEEXT)$$//' | \
- while read p p1; do if test -f $$p \
- ; then echo "$$p"; echo "$$p"; else :; fi; \
- done | \
- sed -e 'p;s,.*/,,;n;h' \
- -e 's|.*|.|' \
- -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
- sed 'N;N;N;s,\n, ,g' | \
- $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
- { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
- if ($$2 == $$4) files[d] = files[d] " " $$1; \
- else { print "f", $$3 "/" $$4, $$1; } } \
- END { for (d in files) print "f", d, files[d] }' | \
- while read type dir files; do \
- if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
- test -z "$$files" || { \
- echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
- $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
- } \
- ; done
-
-uninstall-binPROGRAMS:
- @$(NORMAL_UNINSTALL)
- @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
- files=`for p in $$list; do echo "$$p"; done | \
- sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
- -e 's/$$/$(EXEEXT)/' \
- `; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(bindir)" && rm -f $$files
-
-clean-binPROGRAMS:
- -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-
-clean-checkPROGRAMS:
- -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
-sed/sed_sed-compile.$(OBJEXT): sed/$(am__dirstamp) \
+sed/sed-compile.$(OBJEXT): sed/$(am__dirstamp) \
sed/$(DEPDIR)/$(am__dirstamp)
-sed/sed_sed-execute.$(OBJEXT): sed/$(am__dirstamp) \
+sed/sed-execute.$(OBJEXT): sed/$(am__dirstamp) \
sed/$(DEPDIR)/$(am__dirstamp)
-sed/sed_sed-mbcs.$(OBJEXT): sed/$(am__dirstamp) \
+sed/sed-mbcs.$(OBJEXT): sed/$(am__dirstamp) \
sed/$(DEPDIR)/$(am__dirstamp)
-sed/sed_sed-regexp.$(OBJEXT): sed/$(am__dirstamp) \
+sed/sed-regexp.$(OBJEXT): sed/$(am__dirstamp) \
sed/$(DEPDIR)/$(am__dirstamp)
-sed/sed_sed-sed.$(OBJEXT): sed/$(am__dirstamp) \
+sed/sed-sed.$(OBJEXT): sed/$(am__dirstamp) \
sed/$(DEPDIR)/$(am__dirstamp)
-sed/sed_sed-utils.$(OBJEXT): sed/$(am__dirstamp) \
+sed/sed-utils.$(OBJEXT): sed/$(am__dirstamp) \
sed/$(DEPDIR)/$(am__dirstamp)
sed/sed$(EXEEXT): $(sed_sed_OBJECTS) $(sed_sed_DEPENDENCIES) $(EXTRA_sed_sed_DEPENDENCIES) sed/$(am__dirstamp)
@@ -2458,132 +2384,18 @@ testsuite/$(am__dirstamp):
testsuite/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) testsuite/$(DEPDIR)
@: > testsuite/$(DEPDIR)/$(am__dirstamp)
-testsuite/bug-regex10.$(OBJEXT): testsuite/$(am__dirstamp) \
- testsuite/$(DEPDIR)/$(am__dirstamp)
-
-testsuite/bug-regex10$(EXEEXT): $(testsuite_bug_regex10_OBJECTS) $(testsuite_bug_regex10_DEPENDENCIES) $(EXTRA_testsuite_bug_regex10_DEPENDENCIES) testsuite/$(am__dirstamp)
- @rm -f testsuite/bug-regex10$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(testsuite_bug_regex10_OBJECTS) $(testsuite_bug_regex10_LDADD) $(LIBS)
-testsuite/bug-regex11.$(OBJEXT): testsuite/$(am__dirstamp) \
- testsuite/$(DEPDIR)/$(am__dirstamp)
-
-testsuite/bug-regex11$(EXEEXT): $(testsuite_bug_regex11_OBJECTS) $(testsuite_bug_regex11_DEPENDENCIES) $(EXTRA_testsuite_bug_regex11_DEPENDENCIES) testsuite/$(am__dirstamp)
- @rm -f testsuite/bug-regex11$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(testsuite_bug_regex11_OBJECTS) $(testsuite_bug_regex11_LDADD) $(LIBS)
-testsuite/bug-regex12.$(OBJEXT): testsuite/$(am__dirstamp) \
- testsuite/$(DEPDIR)/$(am__dirstamp)
-
-testsuite/bug-regex12$(EXEEXT): $(testsuite_bug_regex12_OBJECTS) $(testsuite_bug_regex12_DEPENDENCIES) $(EXTRA_testsuite_bug_regex12_DEPENDENCIES) testsuite/$(am__dirstamp)
- @rm -f testsuite/bug-regex12$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(testsuite_bug_regex12_OBJECTS) $(testsuite_bug_regex12_LDADD) $(LIBS)
-testsuite/bug-regex13.$(OBJEXT): testsuite/$(am__dirstamp) \
- testsuite/$(DEPDIR)/$(am__dirstamp)
-
-testsuite/bug-regex13$(EXEEXT): $(testsuite_bug_regex13_OBJECTS) $(testsuite_bug_regex13_DEPENDENCIES) $(EXTRA_testsuite_bug_regex13_DEPENDENCIES) testsuite/$(am__dirstamp)
- @rm -f testsuite/bug-regex13$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(testsuite_bug_regex13_OBJECTS) $(testsuite_bug_regex13_LDADD) $(LIBS)
-testsuite/bug-regex14.$(OBJEXT): testsuite/$(am__dirstamp) \
- testsuite/$(DEPDIR)/$(am__dirstamp)
-
-testsuite/bug-regex14$(EXEEXT): $(testsuite_bug_regex14_OBJECTS) $(testsuite_bug_regex14_DEPENDENCIES) $(EXTRA_testsuite_bug_regex14_DEPENDENCIES) testsuite/$(am__dirstamp)
- @rm -f testsuite/bug-regex14$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(testsuite_bug_regex14_OBJECTS) $(testsuite_bug_regex14_LDADD) $(LIBS)
-testsuite/bug-regex15.$(OBJEXT): testsuite/$(am__dirstamp) \
- testsuite/$(DEPDIR)/$(am__dirstamp)
-
-testsuite/bug-regex15$(EXEEXT): $(testsuite_bug_regex15_OBJECTS) $(testsuite_bug_regex15_DEPENDENCIES) $(EXTRA_testsuite_bug_regex15_DEPENDENCIES) testsuite/$(am__dirstamp)
- @rm -f testsuite/bug-regex15$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(testsuite_bug_regex15_OBJECTS) $(testsuite_bug_regex15_LDADD) $(LIBS)
-testsuite/bug-regex16.$(OBJEXT): testsuite/$(am__dirstamp) \
- testsuite/$(DEPDIR)/$(am__dirstamp)
-
-testsuite/bug-regex16$(EXEEXT): $(testsuite_bug_regex16_OBJECTS) $(testsuite_bug_regex16_DEPENDENCIES) $(EXTRA_testsuite_bug_regex16_DEPENDENCIES) testsuite/$(am__dirstamp)
- @rm -f testsuite/bug-regex16$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(testsuite_bug_regex16_OBJECTS) $(testsuite_bug_regex16_LDADD) $(LIBS)
-testsuite/bug-regex21.$(OBJEXT): testsuite/$(am__dirstamp) \
- testsuite/$(DEPDIR)/$(am__dirstamp)
-
-testsuite/bug-regex21$(EXEEXT): $(testsuite_bug_regex21_OBJECTS) $(testsuite_bug_regex21_DEPENDENCIES) $(EXTRA_testsuite_bug_regex21_DEPENDENCIES) testsuite/$(am__dirstamp)
- @rm -f testsuite/bug-regex21$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(testsuite_bug_regex21_OBJECTS) $(testsuite_bug_regex21_LDADD) $(LIBS)
-testsuite/bug-regex27.$(OBJEXT): testsuite/$(am__dirstamp) \
- testsuite/$(DEPDIR)/$(am__dirstamp)
-
-testsuite/bug-regex27$(EXEEXT): $(testsuite_bug_regex27_OBJECTS) $(testsuite_bug_regex27_DEPENDENCIES) $(EXTRA_testsuite_bug_regex27_DEPENDENCIES) testsuite/$(am__dirstamp)
- @rm -f testsuite/bug-regex27$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(testsuite_bug_regex27_OBJECTS) $(testsuite_bug_regex27_LDADD) $(LIBS)
-testsuite/bug-regex28.$(OBJEXT): testsuite/$(am__dirstamp) \
- testsuite/$(DEPDIR)/$(am__dirstamp)
-
-testsuite/bug-regex28$(EXEEXT): $(testsuite_bug_regex28_OBJECTS) $(testsuite_bug_regex28_DEPENDENCIES) $(EXTRA_testsuite_bug_regex28_DEPENDENCIES) testsuite/$(am__dirstamp)
- @rm -f testsuite/bug-regex28$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(testsuite_bug_regex28_OBJECTS) $(testsuite_bug_regex28_LDADD) $(LIBS)
-testsuite/bug-regex7.$(OBJEXT): testsuite/$(am__dirstamp) \
- testsuite/$(DEPDIR)/$(am__dirstamp)
-
-testsuite/bug-regex7$(EXEEXT): $(testsuite_bug_regex7_OBJECTS) $(testsuite_bug_regex7_DEPENDENCIES) $(EXTRA_testsuite_bug_regex7_DEPENDENCIES) testsuite/$(am__dirstamp)
- @rm -f testsuite/bug-regex7$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(testsuite_bug_regex7_OBJECTS) $(testsuite_bug_regex7_LDADD) $(LIBS)
-testsuite/bug-regex8.$(OBJEXT): testsuite/$(am__dirstamp) \
- testsuite/$(DEPDIR)/$(am__dirstamp)
-
-testsuite/bug-regex8$(EXEEXT): $(testsuite_bug_regex8_OBJECTS) $(testsuite_bug_regex8_DEPENDENCIES) $(EXTRA_testsuite_bug_regex8_DEPENDENCIES) testsuite/$(am__dirstamp)
- @rm -f testsuite/bug-regex8$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(testsuite_bug_regex8_OBJECTS) $(testsuite_bug_regex8_LDADD) $(LIBS)
-testsuite/bug-regex9.$(OBJEXT): testsuite/$(am__dirstamp) \
- testsuite/$(DEPDIR)/$(am__dirstamp)
-
-testsuite/bug-regex9$(EXEEXT): $(testsuite_bug_regex9_OBJECTS) $(testsuite_bug_regex9_DEPENDENCIES) $(EXTRA_testsuite_bug_regex9_DEPENDENCIES) testsuite/$(am__dirstamp)
- @rm -f testsuite/bug-regex9$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(testsuite_bug_regex9_OBJECTS) $(testsuite_bug_regex9_LDADD) $(LIBS)
testsuite/get-mb-cur-max.$(OBJEXT): testsuite/$(am__dirstamp) \
testsuite/$(DEPDIR)/$(am__dirstamp)
testsuite/get-mb-cur-max$(EXEEXT): $(testsuite_get_mb_cur_max_OBJECTS) $(testsuite_get_mb_cur_max_DEPENDENCIES) $(EXTRA_testsuite_get_mb_cur_max_DEPENDENCIES) testsuite/$(am__dirstamp)
@rm -f testsuite/get-mb-cur-max$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(testsuite_get_mb_cur_max_OBJECTS) $(testsuite_get_mb_cur_max_LDADD) $(LIBS)
-testsuite/runptests.$(OBJEXT): testsuite/$(am__dirstamp) \
- testsuite/$(DEPDIR)/$(am__dirstamp)
-
-testsuite/runptests$(EXEEXT): $(testsuite_runptests_OBJECTS) $(testsuite_runptests_DEPENDENCIES) $(EXTRA_testsuite_runptests_DEPENDENCIES) testsuite/$(am__dirstamp)
- @rm -f testsuite/runptests$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(testsuite_runptests_OBJECTS) $(testsuite_runptests_LDADD) $(LIBS)
-testsuite/runtests.$(OBJEXT): testsuite/$(am__dirstamp) \
- testsuite/$(DEPDIR)/$(am__dirstamp)
-
-testsuite/runtests$(EXEEXT): $(testsuite_runtests_OBJECTS) $(testsuite_runtests_DEPENDENCIES) $(EXTRA_testsuite_runtests_DEPENDENCIES) testsuite/$(am__dirstamp)
- @rm -f testsuite/runtests$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(testsuite_runtests_OBJECTS) $(testsuite_runtests_LDADD) $(LIBS)
testsuite/test-mbrtowc.$(OBJEXT): testsuite/$(am__dirstamp) \
testsuite/$(DEPDIR)/$(am__dirstamp)
testsuite/test-mbrtowc$(EXEEXT): $(testsuite_test_mbrtowc_OBJECTS) $(testsuite_test_mbrtowc_DEPENDENCIES) $(EXTRA_testsuite_test_mbrtowc_DEPENDENCIES) testsuite/$(am__dirstamp)
@rm -f testsuite/test-mbrtowc$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(testsuite_test_mbrtowc_OBJECTS) $(testsuite_test_mbrtowc_LDADD) $(LIBS)
-testsuite/tst-boost.$(OBJEXT): testsuite/$(am__dirstamp) \
- testsuite/$(DEPDIR)/$(am__dirstamp)
-
-testsuite/tst-boost$(EXEEXT): $(testsuite_tst_boost_OBJECTS) $(testsuite_tst_boost_DEPENDENCIES) $(EXTRA_testsuite_tst_boost_DEPENDENCIES) testsuite/$(am__dirstamp)
- @rm -f testsuite/tst-boost$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(testsuite_tst_boost_OBJECTS) $(testsuite_tst_boost_LDADD) $(LIBS)
-testsuite/tst-pcre.$(OBJEXT): testsuite/$(am__dirstamp) \
- testsuite/$(DEPDIR)/$(am__dirstamp)
-
-testsuite/tst-pcre$(EXEEXT): $(testsuite_tst_pcre_OBJECTS) $(testsuite_tst_pcre_DEPENDENCIES) $(EXTRA_testsuite_tst_pcre_DEPENDENCIES) testsuite/$(am__dirstamp)
- @rm -f testsuite/tst-pcre$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(testsuite_tst_pcre_OBJECTS) $(testsuite_tst_pcre_LDADD) $(LIBS)
-testsuite/tst-regex2.$(OBJEXT): testsuite/$(am__dirstamp) \
- testsuite/$(DEPDIR)/$(am__dirstamp)
-
-testsuite/tst-regex2$(EXEEXT): $(testsuite_tst_regex2_OBJECTS) $(testsuite_tst_regex2_DEPENDENCIES) $(EXTRA_testsuite_tst_regex2_DEPENDENCIES) testsuite/$(am__dirstamp)
- @rm -f testsuite/tst-regex2$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(testsuite_tst_regex2_OBJECTS) $(testsuite_tst_regex2_LDADD) $(LIBS)
-testsuite/tst-rxspencer.$(OBJEXT): testsuite/$(am__dirstamp) \
- testsuite/$(DEPDIR)/$(am__dirstamp)
-
-testsuite/tst-rxspencer$(EXEEXT): $(testsuite_tst_rxspencer_OBJECTS) $(testsuite_tst_rxspencer_DEPENDENCIES) $(EXTRA_testsuite_tst_rxspencer_DEPENDENCIES) testsuite/$(am__dirstamp)
- @rm -f testsuite/tst-rxspencer$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(testsuite_tst_rxspencer_OBJECTS) $(testsuite_tst_rxspencer_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -2627,6 +2439,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/localcharset.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/localeconv.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/localeinfo.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/localtime-buffer.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lstat.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/malloc.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/malloca.Po@am__quote@ # am--include-marker
@@ -2654,9 +2467,10 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/rmdir.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/se-context.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/se-selinux.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/secure_getenv.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/set-acl.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/set-permissions.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/stat-time.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/stat-w32.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/stat.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/strerror-override.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/strerror.Po@am__quote@ # am--include-marker
@@ -2674,34 +2488,15 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/xmalloc.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@lib/glthread/$(DEPDIR)/lock.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@lib/glthread/$(DEPDIR)/threadlib.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@sed/$(DEPDIR)/sed_sed-compile.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@sed/$(DEPDIR)/sed_sed-execute.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@sed/$(DEPDIR)/sed_sed-mbcs.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@sed/$(DEPDIR)/sed_sed-regexp.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@sed/$(DEPDIR)/sed_sed-sed.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@sed/$(DEPDIR)/sed_sed-utils.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@sed/$(DEPDIR)/sed-compile.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@sed/$(DEPDIR)/sed-execute.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@sed/$(DEPDIR)/sed-mbcs.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@sed/$(DEPDIR)/sed-regexp.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@sed/$(DEPDIR)/sed-sed.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@sed/$(DEPDIR)/sed-utils.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@sed/$(DEPDIR)/version.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/bug-regex10.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/bug-regex11.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/bug-regex12.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/bug-regex13.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/bug-regex14.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/bug-regex15.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/bug-regex16.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/bug-regex21.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/bug-regex27.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/bug-regex28.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/bug-regex7.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/bug-regex8.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/bug-regex9.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/get-mb-cur-max.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/runptests.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/runtests.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/test-mbrtowc.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/tst-boost.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/tst-pcre.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/tst-regex2.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/tst-rxspencer.Po@am__quote@ # am--include-marker
$(am__depfiles_remade):
@$(MKDIR_P) $(@D)
@@ -2710,139 +2505,129 @@ $(am__depfiles_remade):
am--depfiles: $(am__depfiles_remade)
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(am__set_depbase) && \
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $<; \
-@am__fastdepCC_TRUE@ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \
-@am__fastdepCC_TRUE@ else rm -f $$depbase.Tpo; false; fi
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(am__set_depbase) && \
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $$($(CYGPATH_W) $<); \
-@am__fastdepCC_TRUE@ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \
-@am__fastdepCC_TRUE@ else rm -f $$depbase.Tpo; false; fi
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $$($(CYGPATH_W) $<)
-
-sed/sed_sed-compile.o: sed/compile.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(am__set_depbase) && \
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `test -f 'sed/compile.c' || echo '$(srcdir)/'`sed/compile.c; \
-@am__fastdepCC_TRUE@ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \
-@am__fastdepCC_TRUE@ else rm -f $$depbase.Tpo; false; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/compile.c' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+sed/sed-compile.o: sed/compile.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT sed/sed-compile.o -MD -MP -MF sed/$(DEPDIR)/sed-compile.Tpo -c -o sed/sed-compile.o `test -f 'sed/compile.c' || echo '$(srcdir)/'`sed/compile.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sed/$(DEPDIR)/sed-compile.Tpo sed/$(DEPDIR)/sed-compile.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/compile.c' object='sed/sed-compile.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o $@ `test -f 'sed/compile.c' || echo '$(srcdir)/'`sed/compile.c
-
-sed/sed_sed-compile.obj: sed/compile.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(am__set_depbase) && \
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $$($(CYGPATH_W) `test -f 'sed/compile.c' || echo '$(srcdir)/'`sed/compile.c); \
-@am__fastdepCC_TRUE@ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \
-@am__fastdepCC_TRUE@ else rm -f $$depbase.Tpo; false; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/compile.c' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o sed/sed-compile.o `test -f 'sed/compile.c' || echo '$(srcdir)/'`sed/compile.c
+
+sed/sed-compile.obj: sed/compile.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT sed/sed-compile.obj -MD -MP -MF sed/$(DEPDIR)/sed-compile.Tpo -c -o sed/sed-compile.obj `if test -f 'sed/compile.c'; then $(CYGPATH_W) 'sed/compile.c'; else $(CYGPATH_W) '$(srcdir)/sed/compile.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sed/$(DEPDIR)/sed-compile.Tpo sed/$(DEPDIR)/sed-compile.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/compile.c' object='sed/sed-compile.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o $@ $$($(CYGPATH_W) `test -f 'sed/compile.c' || echo '$(srcdir)/'`sed/compile.c)
-
-sed/sed_sed-execute.o: sed/execute.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(am__set_depbase) && \
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `test -f 'sed/execute.c' || echo '$(srcdir)/'`sed/execute.c; \
-@am__fastdepCC_TRUE@ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \
-@am__fastdepCC_TRUE@ else rm -f $$depbase.Tpo; false; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/execute.c' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o sed/sed-compile.obj `if test -f 'sed/compile.c'; then $(CYGPATH_W) 'sed/compile.c'; else $(CYGPATH_W) '$(srcdir)/sed/compile.c'; fi`
+
+sed/sed-execute.o: sed/execute.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT sed/sed-execute.o -MD -MP -MF sed/$(DEPDIR)/sed-execute.Tpo -c -o sed/sed-execute.o `test -f 'sed/execute.c' || echo '$(srcdir)/'`sed/execute.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sed/$(DEPDIR)/sed-execute.Tpo sed/$(DEPDIR)/sed-execute.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/execute.c' object='sed/sed-execute.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o $@ `test -f 'sed/execute.c' || echo '$(srcdir)/'`sed/execute.c
-
-sed/sed_sed-execute.obj: sed/execute.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(am__set_depbase) && \
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $$($(CYGPATH_W) `test -f 'sed/execute.c' || echo '$(srcdir)/'`sed/execute.c); \
-@am__fastdepCC_TRUE@ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \
-@am__fastdepCC_TRUE@ else rm -f $$depbase.Tpo; false; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/execute.c' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o sed/sed-execute.o `test -f 'sed/execute.c' || echo '$(srcdir)/'`sed/execute.c
+
+sed/sed-execute.obj: sed/execute.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT sed/sed-execute.obj -MD -MP -MF sed/$(DEPDIR)/sed-execute.Tpo -c -o sed/sed-execute.obj `if test -f 'sed/execute.c'; then $(CYGPATH_W) 'sed/execute.c'; else $(CYGPATH_W) '$(srcdir)/sed/execute.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sed/$(DEPDIR)/sed-execute.Tpo sed/$(DEPDIR)/sed-execute.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/execute.c' object='sed/sed-execute.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o $@ $$($(CYGPATH_W) `test -f 'sed/execute.c' || echo '$(srcdir)/'`sed/execute.c)
-
-sed/sed_sed-mbcs.o: sed/mbcs.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(am__set_depbase) && \
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `test -f 'sed/mbcs.c' || echo '$(srcdir)/'`sed/mbcs.c; \
-@am__fastdepCC_TRUE@ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \
-@am__fastdepCC_TRUE@ else rm -f $$depbase.Tpo; false; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/mbcs.c' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o sed/sed-execute.obj `if test -f 'sed/execute.c'; then $(CYGPATH_W) 'sed/execute.c'; else $(CYGPATH_W) '$(srcdir)/sed/execute.c'; fi`
+
+sed/sed-mbcs.o: sed/mbcs.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT sed/sed-mbcs.o -MD -MP -MF sed/$(DEPDIR)/sed-mbcs.Tpo -c -o sed/sed-mbcs.o `test -f 'sed/mbcs.c' || echo '$(srcdir)/'`sed/mbcs.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sed/$(DEPDIR)/sed-mbcs.Tpo sed/$(DEPDIR)/sed-mbcs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/mbcs.c' object='sed/sed-mbcs.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o $@ `test -f 'sed/mbcs.c' || echo '$(srcdir)/'`sed/mbcs.c
-
-sed/sed_sed-mbcs.obj: sed/mbcs.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(am__set_depbase) && \
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $$($(CYGPATH_W) `test -f 'sed/mbcs.c' || echo '$(srcdir)/'`sed/mbcs.c); \
-@am__fastdepCC_TRUE@ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \
-@am__fastdepCC_TRUE@ else rm -f $$depbase.Tpo; false; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/mbcs.c' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o sed/sed-mbcs.o `test -f 'sed/mbcs.c' || echo '$(srcdir)/'`sed/mbcs.c
+
+sed/sed-mbcs.obj: sed/mbcs.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT sed/sed-mbcs.obj -MD -MP -MF sed/$(DEPDIR)/sed-mbcs.Tpo -c -o sed/sed-mbcs.obj `if test -f 'sed/mbcs.c'; then $(CYGPATH_W) 'sed/mbcs.c'; else $(CYGPATH_W) '$(srcdir)/sed/mbcs.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sed/$(DEPDIR)/sed-mbcs.Tpo sed/$(DEPDIR)/sed-mbcs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/mbcs.c' object='sed/sed-mbcs.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o $@ $$($(CYGPATH_W) `test -f 'sed/mbcs.c' || echo '$(srcdir)/'`sed/mbcs.c)
-
-sed/sed_sed-regexp.o: sed/regexp.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(am__set_depbase) && \
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `test -f 'sed/regexp.c' || echo '$(srcdir)/'`sed/regexp.c; \
-@am__fastdepCC_TRUE@ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \
-@am__fastdepCC_TRUE@ else rm -f $$depbase.Tpo; false; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/regexp.c' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o sed/sed-mbcs.obj `if test -f 'sed/mbcs.c'; then $(CYGPATH_W) 'sed/mbcs.c'; else $(CYGPATH_W) '$(srcdir)/sed/mbcs.c'; fi`
+
+sed/sed-regexp.o: sed/regexp.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT sed/sed-regexp.o -MD -MP -MF sed/$(DEPDIR)/sed-regexp.Tpo -c -o sed/sed-regexp.o `test -f 'sed/regexp.c' || echo '$(srcdir)/'`sed/regexp.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sed/$(DEPDIR)/sed-regexp.Tpo sed/$(DEPDIR)/sed-regexp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/regexp.c' object='sed/sed-regexp.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o $@ `test -f 'sed/regexp.c' || echo '$(srcdir)/'`sed/regexp.c
-
-sed/sed_sed-regexp.obj: sed/regexp.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(am__set_depbase) && \
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $$($(CYGPATH_W) `test -f 'sed/regexp.c' || echo '$(srcdir)/'`sed/regexp.c); \
-@am__fastdepCC_TRUE@ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \
-@am__fastdepCC_TRUE@ else rm -f $$depbase.Tpo; false; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/regexp.c' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o sed/sed-regexp.o `test -f 'sed/regexp.c' || echo '$(srcdir)/'`sed/regexp.c
+
+sed/sed-regexp.obj: sed/regexp.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT sed/sed-regexp.obj -MD -MP -MF sed/$(DEPDIR)/sed-regexp.Tpo -c -o sed/sed-regexp.obj `if test -f 'sed/regexp.c'; then $(CYGPATH_W) 'sed/regexp.c'; else $(CYGPATH_W) '$(srcdir)/sed/regexp.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sed/$(DEPDIR)/sed-regexp.Tpo sed/$(DEPDIR)/sed-regexp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/regexp.c' object='sed/sed-regexp.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o $@ $$($(CYGPATH_W) `test -f 'sed/regexp.c' || echo '$(srcdir)/'`sed/regexp.c)
-
-sed/sed_sed-sed.o: sed/sed.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(am__set_depbase) && \
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `test -f 'sed/sed.c' || echo '$(srcdir)/'`sed/sed.c; \
-@am__fastdepCC_TRUE@ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \
-@am__fastdepCC_TRUE@ else rm -f $$depbase.Tpo; false; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/sed.c' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o sed/sed-regexp.obj `if test -f 'sed/regexp.c'; then $(CYGPATH_W) 'sed/regexp.c'; else $(CYGPATH_W) '$(srcdir)/sed/regexp.c'; fi`
+
+sed/sed-sed.o: sed/sed.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT sed/sed-sed.o -MD -MP -MF sed/$(DEPDIR)/sed-sed.Tpo -c -o sed/sed-sed.o `test -f 'sed/sed.c' || echo '$(srcdir)/'`sed/sed.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sed/$(DEPDIR)/sed-sed.Tpo sed/$(DEPDIR)/sed-sed.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/sed.c' object='sed/sed-sed.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o $@ `test -f 'sed/sed.c' || echo '$(srcdir)/'`sed/sed.c
-
-sed/sed_sed-sed.obj: sed/sed.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(am__set_depbase) && \
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $$($(CYGPATH_W) `test -f 'sed/sed.c' || echo '$(srcdir)/'`sed/sed.c); \
-@am__fastdepCC_TRUE@ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \
-@am__fastdepCC_TRUE@ else rm -f $$depbase.Tpo; false; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/sed.c' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o sed/sed-sed.o `test -f 'sed/sed.c' || echo '$(srcdir)/'`sed/sed.c
+
+sed/sed-sed.obj: sed/sed.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT sed/sed-sed.obj -MD -MP -MF sed/$(DEPDIR)/sed-sed.Tpo -c -o sed/sed-sed.obj `if test -f 'sed/sed.c'; then $(CYGPATH_W) 'sed/sed.c'; else $(CYGPATH_W) '$(srcdir)/sed/sed.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sed/$(DEPDIR)/sed-sed.Tpo sed/$(DEPDIR)/sed-sed.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/sed.c' object='sed/sed-sed.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o $@ $$($(CYGPATH_W) `test -f 'sed/sed.c' || echo '$(srcdir)/'`sed/sed.c)
-
-sed/sed_sed-utils.o: sed/utils.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(am__set_depbase) && \
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `test -f 'sed/utils.c' || echo '$(srcdir)/'`sed/utils.c; \
-@am__fastdepCC_TRUE@ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \
-@am__fastdepCC_TRUE@ else rm -f $$depbase.Tpo; false; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/utils.c' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o sed/sed-sed.obj `if test -f 'sed/sed.c'; then $(CYGPATH_W) 'sed/sed.c'; else $(CYGPATH_W) '$(srcdir)/sed/sed.c'; fi`
+
+sed/sed-utils.o: sed/utils.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT sed/sed-utils.o -MD -MP -MF sed/$(DEPDIR)/sed-utils.Tpo -c -o sed/sed-utils.o `test -f 'sed/utils.c' || echo '$(srcdir)/'`sed/utils.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sed/$(DEPDIR)/sed-utils.Tpo sed/$(DEPDIR)/sed-utils.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/utils.c' object='sed/sed-utils.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o $@ `test -f 'sed/utils.c' || echo '$(srcdir)/'`sed/utils.c
-
-sed/sed_sed-utils.obj: sed/utils.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(am__set_depbase) && \
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $$($(CYGPATH_W) `test -f 'sed/utils.c' || echo '$(srcdir)/'`sed/utils.c); \
-@am__fastdepCC_TRUE@ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \
-@am__fastdepCC_TRUE@ else rm -f $$depbase.Tpo; false; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/utils.c' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o sed/sed-utils.o `test -f 'sed/utils.c' || echo '$(srcdir)/'`sed/utils.c
+
+sed/sed-utils.obj: sed/utils.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT sed/sed-utils.obj -MD -MP -MF sed/$(DEPDIR)/sed-utils.Tpo -c -o sed/sed-utils.obj `if test -f 'sed/utils.c'; then $(CYGPATH_W) 'sed/utils.c'; else $(CYGPATH_W) '$(srcdir)/sed/utils.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sed/$(DEPDIR)/sed-utils.Tpo sed/$(DEPDIR)/sed-utils.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/utils.c' object='sed/sed-utils.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o $@ $$($(CYGPATH_W) `test -f 'sed/utils.c' || echo '$(srcdir)/'`sed/utils.c)
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o sed/sed-utils.obj `if test -f 'sed/utils.c'; then $(CYGPATH_W) 'sed/utils.c'; else $(CYGPATH_W) '$(srcdir)/sed/utils.c'; fi`
doc/$(am__dirstamp):
@$(MKDIR_P) doc
@: > doc/$(am__dirstamp)
$(srcdir)/doc/sed.info: doc/sed.texi $(srcdir)/doc/version.texi $(doc_sed_TEXINFOS)
- $(AM_V_MAKEINFO)$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
- -I doc -I $(srcdir)/doc --no-split -o $@-t \
- $(srcdir)/doc/sed.texi
- $(AM_V_at)mv -f $@-t $@
+ $(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \
+ am__cwd=`pwd` && $(am__cd) $(srcdir) && \
+ rm -rf $$backupdir && mkdir $$backupdir && \
+ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
+ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
+ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
+ done; \
+ else :; fi && \
+ cd "$$am__cwd"; \
+ if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc \
+ -o $@ $(srcdir)/doc/sed.texi; \
+ then \
+ rc=0; \
+ $(am__cd) $(srcdir); \
+ else \
+ rc=$$?; \
+ $(am__cd) $(srcdir) && \
+ $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
+ fi; \
+ rm -rf $$backupdir; exit $$rc
doc/sed.dvi: doc/sed.texi $(srcdir)/doc/version.texi $(doc_sed_TEXINFOS) doc/$(am__dirstamp)
$(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
@@ -2923,9 +2708,10 @@ uninstall-info-am:
@list='$(INFO_DEPS)'; \
for file in $$list; do \
relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
(if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
- echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile"; \
- rm -f $$relfile; \
+ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
+ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
else :; fi); \
done
@@ -2954,14 +2740,15 @@ dist-info: $(INFO_DEPS)
case $$base in \
$(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
esac; \
- if test -f $$base; then \
- file=./$$base; \
- else \
- file=$(srcdir)/$$base; \
- fi; \
- if test -f $$file && test ! -f "$(distdir)/$$base"; then \
- cp -p $$file "$(distdir)/$$base"; \
- fi; \
+ if test -f $$base; then d=.; else d=$(srcdir); fi; \
+ base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
+ for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
+ if test -f $$file; then \
+ relfile=`expr "$$file" : "$$d/\(.*\)"`; \
+ test -f "$(distdir)/$$relfile" || \
+ cp -p $$file "$(distdir)/$$relfile"; \
+ else :; fi; \
+ done; \
done
mostlyclean-aminfo:
@@ -2972,7 +2759,11 @@ clean-aminfo:
|| rm -rf doc/sed.dvi doc/sed.pdf doc/sed.ps doc/sed.html
maintainer-clean-aminfo:
- -test -z "$(INFO_DEPS)" || rm -f $(INFO_DEPS)
+ @list='$(INFO_DEPS)'; for i in $$list; do \
+ i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
+ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
+ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
+ done
install-man1: $(dist_man_MANS)
@$(NORMAL_INSTALL)
@list1=''; \
@@ -3243,7 +3034,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
fi; \
$$success || exit 1
-check-TESTS:
+check-TESTS: $(check_PROGRAMS)
@list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
@@ -3264,636 +3055,6 @@ recheck: all $(check_PROGRAMS)
am__force_recheck=am--force-recheck \
TEST_LOGS="$$log_list"; \
exit $$?
-testsuite/get-mb-cur-max.log: testsuite/get-mb-cur-max$(EXEEXT)
- @p='testsuite/get-mb-cur-max$(EXEEXT)'; \
- b='testsuite/get-mb-cur-max'; \
- $(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)
-testsuite/test-mbrtowc.log: testsuite/test-mbrtowc$(EXEEXT)
- @p='testsuite/test-mbrtowc$(EXEEXT)'; \
- b='testsuite/test-mbrtowc'; \
- $(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)
-testsuite/bug-regex7.log: testsuite/bug-regex7$(EXEEXT)
- @p='testsuite/bug-regex7$(EXEEXT)'; \
- b='testsuite/bug-regex7'; \
- $(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)
-testsuite/bug-regex8.log: testsuite/bug-regex8$(EXEEXT)
- @p='testsuite/bug-regex8$(EXEEXT)'; \
- b='testsuite/bug-regex8'; \
- $(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)
-testsuite/bug-regex9.log: testsuite/bug-regex9$(EXEEXT)
- @p='testsuite/bug-regex9$(EXEEXT)'; \
- b='testsuite/bug-regex9'; \
- $(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)
-testsuite/bug-regex10.log: testsuite/bug-regex10$(EXEEXT)
- @p='testsuite/bug-regex10$(EXEEXT)'; \
- b='testsuite/bug-regex10'; \
- $(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)
-testsuite/bug-regex11.log: testsuite/bug-regex11$(EXEEXT)
- @p='testsuite/bug-regex11$(EXEEXT)'; \
- b='testsuite/bug-regex11'; \
- $(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)
-testsuite/bug-regex12.log: testsuite/bug-regex12$(EXEEXT)
- @p='testsuite/bug-regex12$(EXEEXT)'; \
- b='testsuite/bug-regex12'; \
- $(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)
-testsuite/bug-regex13.log: testsuite/bug-regex13$(EXEEXT)
- @p='testsuite/bug-regex13$(EXEEXT)'; \
- b='testsuite/bug-regex13'; \
- $(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)
-testsuite/bug-regex14.log: testsuite/bug-regex14$(EXEEXT)
- @p='testsuite/bug-regex14$(EXEEXT)'; \
- b='testsuite/bug-regex14'; \
- $(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)
-testsuite/bug-regex15.log: testsuite/bug-regex15$(EXEEXT)
- @p='testsuite/bug-regex15$(EXEEXT)'; \
- b='testsuite/bug-regex15'; \
- $(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)
-testsuite/bug-regex16.log: testsuite/bug-regex16$(EXEEXT)
- @p='testsuite/bug-regex16$(EXEEXT)'; \
- b='testsuite/bug-regex16'; \
- $(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)
-testsuite/bug-regex21.log: testsuite/bug-regex21$(EXEEXT)
- @p='testsuite/bug-regex21$(EXEEXT)'; \
- b='testsuite/bug-regex21'; \
- $(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)
-testsuite/bug-regex27.log: testsuite/bug-regex27$(EXEEXT)
- @p='testsuite/bug-regex27$(EXEEXT)'; \
- b='testsuite/bug-regex27'; \
- $(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)
-testsuite/bug-regex28.log: testsuite/bug-regex28$(EXEEXT)
- @p='testsuite/bug-regex28$(EXEEXT)'; \
- b='testsuite/bug-regex28'; \
- $(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)
-testsuite/tst-pcre.log: testsuite/tst-pcre$(EXEEXT)
- @p='testsuite/tst-pcre$(EXEEXT)'; \
- b='testsuite/tst-pcre'; \
- $(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)
-testsuite/tst-boost.log: testsuite/tst-boost$(EXEEXT)
- @p='testsuite/tst-boost$(EXEEXT)'; \
- b='testsuite/tst-boost'; \
- $(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)
-testsuite/runtests.log: testsuite/runtests$(EXEEXT)
- @p='testsuite/runtests$(EXEEXT)'; \
- b='testsuite/runtests'; \
- $(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)
-testsuite/runptests.log: testsuite/runptests$(EXEEXT)
- @p='testsuite/runptests$(EXEEXT)'; \
- b='testsuite/runptests'; \
- $(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)
-testsuite/tst-rxspencer.log: testsuite/tst-rxspencer$(EXEEXT)
- @p='testsuite/tst-rxspencer$(EXEEXT)'; \
- b='testsuite/tst-rxspencer'; \
- $(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)
-testsuite/tst-regex2.log: testsuite/tst-regex2$(EXEEXT)
- @p='testsuite/tst-regex2$(EXEEXT)'; \
- b='testsuite/tst-regex2'; \
- $(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)
-space.log: space
- @p='space'; \
- b='space'; \
- $(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)
-testsuite/appquit.log: testsuite/appquit
- @p='testsuite/appquit'; \
- b='testsuite/appquit'; \
- $(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)
-testsuite/enable.log: testsuite/enable
- @p='testsuite/enable'; \
- b='testsuite/enable'; \
- $(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)
-testsuite/sep.log: testsuite/sep
- @p='testsuite/sep'; \
- b='testsuite/sep'; \
- $(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)
-testsuite/inclib.log: testsuite/inclib
- @p='testsuite/inclib'; \
- b='testsuite/inclib'; \
- $(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)
-testsuite/8bit.log: testsuite/8bit
- @p='testsuite/8bit'; \
- b='testsuite/8bit'; \
- $(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)
-testsuite/newjis.log: testsuite/newjis
- @p='testsuite/newjis'; \
- b='testsuite/newjis'; \
- $(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)
-testsuite/xabcx.log: testsuite/xabcx
- @p='testsuite/xabcx'; \
- b='testsuite/xabcx'; \
- $(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)
-testsuite/dollar.log: testsuite/dollar
- @p='testsuite/dollar'; \
- b='testsuite/dollar'; \
- $(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)
-testsuite/noeol.log: testsuite/noeol
- @p='testsuite/noeol'; \
- b='testsuite/noeol'; \
- $(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)
-testsuite/noeolw.log: testsuite/noeolw
- @p='testsuite/noeolw'; \
- b='testsuite/noeolw'; \
- $(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)
-testsuite/modulo.log: testsuite/modulo
- @p='testsuite/modulo'; \
- b='testsuite/modulo'; \
- $(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)
-testsuite/numsub.log: testsuite/numsub
- @p='testsuite/numsub'; \
- b='testsuite/numsub'; \
- $(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)
-testsuite/numsub2.log: testsuite/numsub2
- @p='testsuite/numsub2'; \
- b='testsuite/numsub2'; \
- $(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)
-testsuite/numsub3.log: testsuite/numsub3
- @p='testsuite/numsub3'; \
- b='testsuite/numsub3'; \
- $(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)
-testsuite/numsub4.log: testsuite/numsub4
- @p='testsuite/numsub4'; \
- b='testsuite/numsub4'; \
- $(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)
-testsuite/numsub5.log: testsuite/numsub5
- @p='testsuite/numsub5'; \
- b='testsuite/numsub5'; \
- $(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)
-testsuite/0range.log: testsuite/0range
- @p='testsuite/0range'; \
- b='testsuite/0range'; \
- $(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)
-testsuite/bkslashes.log: testsuite/bkslashes
- @p='testsuite/bkslashes'; \
- b='testsuite/bkslashes'; \
- $(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)
-testsuite/head.log: testsuite/head
- @p='testsuite/head'; \
- b='testsuite/head'; \
- $(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)
-testsuite/madding.log: testsuite/madding
- @p='testsuite/madding'; \
- b='testsuite/madding'; \
- $(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)
-testsuite/mac-mf.log: testsuite/mac-mf
- @p='testsuite/mac-mf'; \
- b='testsuite/mac-mf'; \
- $(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)
-testsuite/empty.log: testsuite/empty
- @p='testsuite/empty'; \
- b='testsuite/empty'; \
- $(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)
-testsuite/xbxcx.log: testsuite/xbxcx
- @p='testsuite/xbxcx'; \
- b='testsuite/xbxcx'; \
- $(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)
-testsuite/xbxcx3.log: testsuite/xbxcx3
- @p='testsuite/xbxcx3'; \
- b='testsuite/xbxcx3'; \
- $(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)
-testsuite/recall.log: testsuite/recall
- @p='testsuite/recall'; \
- b='testsuite/recall'; \
- $(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)
-testsuite/recall2.log: testsuite/recall2
- @p='testsuite/recall2'; \
- b='testsuite/recall2'; \
- $(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)
-testsuite/xemacs.log: testsuite/xemacs
- @p='testsuite/xemacs'; \
- b='testsuite/xemacs'; \
- $(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)
-testsuite/fasts.log: testsuite/fasts
- @p='testsuite/fasts'; \
- b='testsuite/fasts'; \
- $(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)
-testsuite/uniq.log: testsuite/uniq
- @p='testsuite/uniq'; \
- b='testsuite/uniq'; \
- $(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)
-testsuite/manis.log: testsuite/manis
- @p='testsuite/manis'; \
- b='testsuite/manis'; \
- $(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)
-testsuite/khadafy.log: testsuite/khadafy
- @p='testsuite/khadafy'; \
- b='testsuite/khadafy'; \
- $(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)
-testsuite/linecnt.log: testsuite/linecnt
- @p='testsuite/linecnt'; \
- b='testsuite/linecnt'; \
- $(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)
-testsuite/eval.log: testsuite/eval
- @p='testsuite/eval'; \
- b='testsuite/eval'; \
- $(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)
-testsuite/distrib.log: testsuite/distrib
- @p='testsuite/distrib'; \
- b='testsuite/distrib'; \
- $(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)
-testsuite/8to7.log: testsuite/8to7
- @p='testsuite/8to7'; \
- b='testsuite/8to7'; \
- $(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)
-testsuite/y-bracket.log: testsuite/y-bracket
- @p='testsuite/y-bracket'; \
- b='testsuite/y-bracket'; \
- $(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)
-testsuite/y-newline.log: testsuite/y-newline
- @p='testsuite/y-newline'; \
- b='testsuite/y-newline'; \
- $(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)
-testsuite/y-zero.log: testsuite/y-zero
- @p='testsuite/y-zero'; \
- b='testsuite/y-zero'; \
- $(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)
-testsuite/allsub.log: testsuite/allsub
- @p='testsuite/allsub'; \
- b='testsuite/allsub'; \
- $(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)
-testsuite/cv-vars.log: testsuite/cv-vars
- @p='testsuite/cv-vars'; \
- b='testsuite/cv-vars'; \
- $(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)
-testsuite/classes.log: testsuite/classes
- @p='testsuite/classes'; \
- b='testsuite/classes'; \
- $(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)
-testsuite/middle.log: testsuite/middle
- @p='testsuite/middle'; \
- b='testsuite/middle'; \
- $(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)
-testsuite/bsd.log: testsuite/bsd
- @p='testsuite/bsd'; \
- b='testsuite/bsd'; \
- $(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)
-testsuite/stdin.log: testsuite/stdin
- @p='testsuite/stdin'; \
- b='testsuite/stdin'; \
- $(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)
-testsuite/flipcase.log: testsuite/flipcase
- @p='testsuite/flipcase'; \
- b='testsuite/flipcase'; \
- $(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)
-testsuite/insens.log: testsuite/insens
- @p='testsuite/insens'; \
- b='testsuite/insens'; \
- $(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)
-testsuite/subwrite.log: testsuite/subwrite
- @p='testsuite/subwrite'; \
- b='testsuite/subwrite'; \
- $(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)
-testsuite/writeout.log: testsuite/writeout
- @p='testsuite/writeout'; \
- b='testsuite/writeout'; \
- $(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)
-testsuite/readin.log: testsuite/readin
- @p='testsuite/readin'; \
- b='testsuite/readin'; \
- $(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)
-testsuite/insert.log: testsuite/insert
- @p='testsuite/insert'; \
- b='testsuite/insert'; \
- $(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)
-testsuite/utf8-1.log: testsuite/utf8-1
- @p='testsuite/utf8-1'; \
- b='testsuite/utf8-1'; \
- $(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)
-testsuite/utf8-2.log: testsuite/utf8-2
- @p='testsuite/utf8-2'; \
- b='testsuite/utf8-2'; \
- $(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)
-testsuite/utf8-3.log: testsuite/utf8-3
- @p='testsuite/utf8-3'; \
- b='testsuite/utf8-3'; \
- $(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)
-testsuite/utf8-4.log: testsuite/utf8-4
- @p='testsuite/utf8-4'; \
- b='testsuite/utf8-4'; \
- $(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)
-testsuite/badenc.log: testsuite/badenc
- @p='testsuite/badenc'; \
- b='testsuite/badenc'; \
- $(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)
-testsuite/inplace-hold.log: testsuite/inplace-hold
- @p='testsuite/inplace-hold'; \
- b='testsuite/inplace-hold'; \
- $(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)
-testsuite/brackets.log: testsuite/brackets
- @p='testsuite/brackets'; \
- b='testsuite/brackets'; \
- $(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)
-testsuite/amp-escape.log: testsuite/amp-escape
- @p='testsuite/amp-escape'; \
- b='testsuite/amp-escape'; \
- $(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)
-testsuite/help.log: testsuite/help
- @p='testsuite/help'; \
- b='testsuite/help'; \
- $(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)
-testsuite/file.log: testsuite/file
- @p='testsuite/file'; \
- b='testsuite/file'; \
- $(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)
-testsuite/quiet.log: testsuite/quiet
- @p='testsuite/quiet'; \
- b='testsuite/quiet'; \
- $(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)
-testsuite/factor.log: testsuite/factor
- @p='testsuite/factor'; \
- b='testsuite/factor'; \
- $(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)
-testsuite/binary3.log: testsuite/binary3
- @p='testsuite/binary3'; \
- b='testsuite/binary3'; \
- $(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)
-testsuite/binary2.log: testsuite/binary2
- @p='testsuite/binary2'; \
- b='testsuite/binary2'; \
- $(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)
-testsuite/binary.log: testsuite/binary
- @p='testsuite/binary'; \
- b='testsuite/binary'; \
- $(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)
-testsuite/dc.log: testsuite/dc
- @p='testsuite/dc'; \
- b='testsuite/dc'; \
- $(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)
-testsuite/newline-anchor.log: testsuite/newline-anchor
- @p='testsuite/newline-anchor'; \
- b='testsuite/newline-anchor'; \
- $(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)
-testsuite/zero-anchor.log: testsuite/zero-anchor
- @p='testsuite/zero-anchor'; \
- b='testsuite/zero-anchor'; \
- $(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)
.sh.log:
@p='$<'; \
$(am__set_b); \
@@ -3908,8 +3069,25 @@ testsuite/zero-anchor.log: testsuite/zero-anchor
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
+.pl.log:
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(PL_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_PL_LOG_DRIVER_FLAGS) $(PL_LOG_DRIVER_FLAGS) -- $(PL_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.pl$(EXEEXT).log:
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(PL_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_PL_LOG_DRIVER_FLAGS) $(PL_LOG_DRIVER_FLAGS) -- $(PL_LOG_COMPILE) \
+@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -3991,6 +3169,20 @@ dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
+dist-tarZ: distdir
+ @echo WARNING: "Support for distribution archives compressed with" \
+ "legacy program 'compress' is deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__post_remove_distdir)
+
+dist-shar: distdir
+ @echo WARNING: "Support for shar distribution archives is" \
+ "deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
+ $(am__post_remove_distdir)
+
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
@@ -4090,7 +3282,7 @@ check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-recursive
-all-am: Makefile $(INFO_DEPS) $(LIBRARIES) $(PROGRAMS) $(MANS) $(DATA) \
+all-am: Makefile $(INFO_DEPS) $(PROGRAMS) $(LIBRARIES) $(MANS) $(DATA) \
$(HEADERS) config.h all-local
installdirs: installdirs-recursive
installdirs-am:
@@ -4118,7 +3310,7 @@ install-strip:
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
- -test -z "$(ALLOCA)" || rm -f $(ALLOCA)
+ -rm -f lib/alloca.$(OBJEXT)
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
@@ -4185,6 +3377,7 @@ distclean: distclean-recursive
-rm -f lib/$(DEPDIR)/localcharset.Po
-rm -f lib/$(DEPDIR)/localeconv.Po
-rm -f lib/$(DEPDIR)/localeinfo.Po
+ -rm -f lib/$(DEPDIR)/localtime-buffer.Po
-rm -f lib/$(DEPDIR)/lstat.Po
-rm -f lib/$(DEPDIR)/malloc.Po
-rm -f lib/$(DEPDIR)/malloca.Po
@@ -4212,9 +3405,10 @@ distclean: distclean-recursive
-rm -f lib/$(DEPDIR)/rmdir.Po
-rm -f lib/$(DEPDIR)/se-context.Po
-rm -f lib/$(DEPDIR)/se-selinux.Po
- -rm -f lib/$(DEPDIR)/secure_getenv.Po
-rm -f lib/$(DEPDIR)/set-acl.Po
-rm -f lib/$(DEPDIR)/set-permissions.Po
+ -rm -f lib/$(DEPDIR)/stat-time.Po
+ -rm -f lib/$(DEPDIR)/stat-w32.Po
-rm -f lib/$(DEPDIR)/stat.Po
-rm -f lib/$(DEPDIR)/strerror-override.Po
-rm -f lib/$(DEPDIR)/strerror.Po
@@ -4232,34 +3426,15 @@ distclean: distclean-recursive
-rm -f lib/$(DEPDIR)/xmalloc.Po
-rm -f lib/glthread/$(DEPDIR)/lock.Po
-rm -f lib/glthread/$(DEPDIR)/threadlib.Po
- -rm -f sed/$(DEPDIR)/sed_sed-compile.Po
- -rm -f sed/$(DEPDIR)/sed_sed-execute.Po
- -rm -f sed/$(DEPDIR)/sed_sed-mbcs.Po
- -rm -f sed/$(DEPDIR)/sed_sed-regexp.Po
- -rm -f sed/$(DEPDIR)/sed_sed-sed.Po
- -rm -f sed/$(DEPDIR)/sed_sed-utils.Po
+ -rm -f sed/$(DEPDIR)/sed-compile.Po
+ -rm -f sed/$(DEPDIR)/sed-execute.Po
+ -rm -f sed/$(DEPDIR)/sed-mbcs.Po
+ -rm -f sed/$(DEPDIR)/sed-regexp.Po
+ -rm -f sed/$(DEPDIR)/sed-sed.Po
+ -rm -f sed/$(DEPDIR)/sed-utils.Po
-rm -f sed/$(DEPDIR)/version.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex10.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex11.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex12.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex13.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex14.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex15.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex16.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex21.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex27.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex28.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex7.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex8.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex9.Po
-rm -f testsuite/$(DEPDIR)/get-mb-cur-max.Po
- -rm -f testsuite/$(DEPDIR)/runptests.Po
- -rm -f testsuite/$(DEPDIR)/runtests.Po
-rm -f testsuite/$(DEPDIR)/test-mbrtowc.Po
- -rm -f testsuite/$(DEPDIR)/tst-boost.Po
- -rm -f testsuite/$(DEPDIR)/tst-pcre.Po
- -rm -f testsuite/$(DEPDIR)/tst-regex2.Po
- -rm -f testsuite/$(DEPDIR)/tst-rxspencer.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-hdr distclean-local distclean-tags
@@ -4338,11 +3513,14 @@ install-info-am: $(INFO_DEPS)
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
esac; \
- if test -f $$file; then \
- echo ./$$file; \
- else \
- echo $(srcdir)/$$file; \
- fi; \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
+ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
+ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
+ if test -f $$ifile; then \
+ echo "$$ifile"; \
+ else : ; fi; \
+ done; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
@@ -4427,6 +3605,7 @@ maintainer-clean: maintainer-clean-recursive
-rm -f lib/$(DEPDIR)/localcharset.Po
-rm -f lib/$(DEPDIR)/localeconv.Po
-rm -f lib/$(DEPDIR)/localeinfo.Po
+ -rm -f lib/$(DEPDIR)/localtime-buffer.Po
-rm -f lib/$(DEPDIR)/lstat.Po
-rm -f lib/$(DEPDIR)/malloc.Po
-rm -f lib/$(DEPDIR)/malloca.Po
@@ -4454,9 +3633,10 @@ maintainer-clean: maintainer-clean-recursive
-rm -f lib/$(DEPDIR)/rmdir.Po
-rm -f lib/$(DEPDIR)/se-context.Po
-rm -f lib/$(DEPDIR)/se-selinux.Po
- -rm -f lib/$(DEPDIR)/secure_getenv.Po
-rm -f lib/$(DEPDIR)/set-acl.Po
-rm -f lib/$(DEPDIR)/set-permissions.Po
+ -rm -f lib/$(DEPDIR)/stat-time.Po
+ -rm -f lib/$(DEPDIR)/stat-w32.Po
-rm -f lib/$(DEPDIR)/stat.Po
-rm -f lib/$(DEPDIR)/strerror-override.Po
-rm -f lib/$(DEPDIR)/strerror.Po
@@ -4474,34 +3654,15 @@ maintainer-clean: maintainer-clean-recursive
-rm -f lib/$(DEPDIR)/xmalloc.Po
-rm -f lib/glthread/$(DEPDIR)/lock.Po
-rm -f lib/glthread/$(DEPDIR)/threadlib.Po
- -rm -f sed/$(DEPDIR)/sed_sed-compile.Po
- -rm -f sed/$(DEPDIR)/sed_sed-execute.Po
- -rm -f sed/$(DEPDIR)/sed_sed-mbcs.Po
- -rm -f sed/$(DEPDIR)/sed_sed-regexp.Po
- -rm -f sed/$(DEPDIR)/sed_sed-sed.Po
- -rm -f sed/$(DEPDIR)/sed_sed-utils.Po
+ -rm -f sed/$(DEPDIR)/sed-compile.Po
+ -rm -f sed/$(DEPDIR)/sed-execute.Po
+ -rm -f sed/$(DEPDIR)/sed-mbcs.Po
+ -rm -f sed/$(DEPDIR)/sed-regexp.Po
+ -rm -f sed/$(DEPDIR)/sed-sed.Po
+ -rm -f sed/$(DEPDIR)/sed-utils.Po
-rm -f sed/$(DEPDIR)/version.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex10.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex11.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex12.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex13.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex14.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex15.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex16.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex21.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex27.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex28.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex7.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex8.Po
- -rm -f testsuite/$(DEPDIR)/bug-regex9.Po
-rm -f testsuite/$(DEPDIR)/get-mb-cur-max.Po
- -rm -f testsuite/$(DEPDIR)/runptests.Po
- -rm -f testsuite/$(DEPDIR)/runtests.Po
-rm -f testsuite/$(DEPDIR)/test-mbrtowc.Po
- -rm -f testsuite/$(DEPDIR)/tst-boost.Po
- -rm -f testsuite/$(DEPDIR)/tst-pcre.Po
- -rm -f testsuite/$(DEPDIR)/tst-regex2.Po
- -rm -f testsuite/$(DEPDIR)/tst-rxspencer.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-aminfo \
maintainer-clean-generic maintainer-clean-vti
@@ -4533,13 +3694,13 @@ uninstall-man: uninstall-man1
clean-aminfo clean-binPROGRAMS clean-checkPROGRAMS \
clean-cscope clean-generic clean-noinstLIBRARIES cscope \
cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
- dist-gzip dist-hook dist-info dist-lzip dist-xz dist-zip \
- distcheck distclean distclean-compile distclean-generic \
- distclean-hdr distclean-local distclean-tags distcleancheck \
- distdir distuninstallcheck dvi dvi-am html html-am info \
- info-am install install-am install-binPROGRAMS install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-exec-local install-html \
+ dist-gzip dist-hook dist-info dist-lzip dist-shar dist-tarZ \
+ dist-xz dist-zip distcheck distclean distclean-compile \
+ distclean-generic distclean-hdr distclean-local distclean-tags \
+ distcleancheck distdir distuninstallcheck dvi dvi-am html \
+ html-am info info-am install install-am install-binPROGRAMS \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-exec-local install-html \
install-html-am install-info install-info-am install-man \
install-man1 install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
@@ -4722,7 +3883,7 @@ lib/fcntl.h: lib/fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NON
# We need the following in order to create <getopt.h> when the system
# doesn't have one that works with the given compiler.
-lib/getopt.h: lib/getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
+lib/getopt.h: lib/getopt.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|GL|g' \
@@ -4736,6 +3897,13 @@ lib/getopt.h: lib/getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
} > $@-t && \
mv -f $@-t $@
+lib/getopt-cdefs.h: lib/getopt-cdefs.in.h $(top_builddir)/config.status
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \
+ < $(top_srcdir)/lib/getopt-cdefs.in.h; \
+ } > $@-t && \
+ mv -f $@-t $@
distclean-local: clean-GNUmakefile
clean-GNUmakefile:
test '$(srcdir)' = . || rm -f $(top_builddir)/GNUmakefile
@@ -4754,6 +3922,7 @@ lib/langinfo.h: lib/langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(W
-e 's/@''GNULIB_NL_LANGINFO''@/$(GNULIB_NL_LANGINFO)/g' \
-e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \
-e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \
+ -e 's|@''HAVE_LANGINFO_ALTMON''@|$(HAVE_LANGINFO_ALTMON)|g' \
-e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \
-e 's|@''HAVE_LANGINFO_YESEXPR''@|$(HAVE_LANGINFO_YESEXPR)|g' \
-e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \
@@ -4891,41 +4060,6 @@ lib/selinux/selinux.h: lib/se-selinux.in.h $(top_builddir)/config.status $(UNUSE
@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ mv $@-t $@
@GL_GENERATE_SELINUX_CONTEXT_H_FALSE@lib/selinux/context.h: $(top_builddir)/config.status
@GL_GENERATE_SELINUX_CONTEXT_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.
-lib/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.
-lib/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.
-lib/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.
-lib/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.
@@ -5176,6 +4310,7 @@ lib/stdlib.h: lib/stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \
-e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \
-e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
+ -e 's/@''GNULIB_REALLOCARRAY''@/$(GNULIB_REALLOCARRAY)/g' \
-e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \
-e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \
-e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \
@@ -5194,6 +4329,7 @@ lib/stdlib.h: lib/stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
-e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
-e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \
+ -e 's|@''HAVE_DECL_INITSTATE''@|$(HAVE_DECL_INITSTATE)|g' \
-e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
-e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \
-e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
@@ -5206,10 +4342,12 @@ lib/stdlib.h: lib/stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \
-e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
-e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
+ -e 's|@''HAVE_REALLOCARRAY''@|$(HAVE_REALLOCARRAY)|g' \
-e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \
-e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \
-e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \
-e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \
+ -e 's|@''HAVE_DECL_SETSTATE''@|$(HAVE_DECL_SETSTATE)|g' \
-e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
-e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
-e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \
@@ -5250,6 +4388,7 @@ lib/string.h: lib/string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
+ -e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GNULIB_EXPLICIT_BZERO)/g' \
-e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \
-e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \
-e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \
@@ -5288,7 +4427,8 @@ lib/string.h: lib/string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
-e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
< $(top_srcdir)/lib/string.in.h | \
- sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
+ sed -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \
+ -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
-e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
-e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
-e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
@@ -5309,20 +4449,20 @@ lib/string.h: lib/string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \
-e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
-e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
- -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
-e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
-e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
- -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
+ -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
-e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \
-e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
- -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
- -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
- -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
-e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \
-e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \
-e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \
- -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
+ -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
+ -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
-e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
+ -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
+ -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
+ -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
-e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
@@ -5343,6 +4483,7 @@ lib/sys/stat.h: lib/sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(A
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
-e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \
+ -e 's|@''WINDOWS_STAT_TIMESPEC''@|$(WINDOWS_STAT_TIMESPEC)|g' \
-e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \
-e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \
-e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
@@ -5356,6 +4497,7 @@ lib/sys/stat.h: lib/sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(A
-e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \
-e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \
-e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \
+ -e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GNULIB_OVERRIDES_STRUCT_STAT)/g' \
-e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
-e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
-e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
@@ -5420,6 +4562,7 @@ lib/sys/types.h: lib/sys_types.in.h $(top_builddir)/config.status
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \
-e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
+ -e 's|@''WINDOWS_STAT_INODES''@|$(WINDOWS_STAT_INODES)|g' \
< $(top_srcdir)/lib/sys_types.in.h; \
} > $@-t && \
mv $@-t $@
@@ -5434,24 +4577,31 @@ lib/time.h: lib/time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
- -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \
+ -e 's/@''GNULIB_CTIME''@/$(GNULIB_CTIME)/g' \
+ -e 's/@''GNULIB_LOCALTIME''@/$(GNULIB_LOCALTIME)/g' \
-e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \
-e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \
+ -e 's/@''GNULIB_STRFTIME''@/$(GNULIB_STRFTIME)/g' \
-e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
-e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
-e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
-e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \
+ -e 's/@''GNULIB_TZSET''@/$(GNULIB_TZSET)/g' \
-e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
-e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
-e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
-e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \
-e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \
+ -e 's|@''HAVE_TZSET''@|$(HAVE_TZSET)|g' \
+ -e 's|@''REPLACE_CTIME''@|$(REPLACE_CTIME)|g' \
-e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \
-e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \
-e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
-e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
-e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
+ -e 's|@''REPLACE_STRFTIME''@|$(REPLACE_STRFTIME)|g' \
-e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
+ -e 's|@''REPLACE_TZSET''@|$(REPLACE_TZSET)|g' \
-e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
@@ -5516,6 +4666,7 @@ lib/unistd.h: lib/unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \
-e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \
-e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \
+ -e 's/@''GNULIB_TRUNCATE''@/$(GNULIB_TRUNCATE)/g' \
-e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \
-e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \
-e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \
@@ -5553,6 +4704,7 @@ lib/unistd.h: lib/unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
-e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
-e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
+ -e 's|@''HAVE_TRUNCATE''@|$(HAVE_TRUNCATE)|g' \
-e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
-e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
-e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
@@ -5572,6 +4724,7 @@ lib/unistd.h: lib/unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
-e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
-e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
+ -e 's|@''REPLACE_FACCESSAT''@|$(REPLACE_FACCESSAT)|g' \
-e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
-e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
-e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
@@ -5594,6 +4747,7 @@ lib/unistd.h: lib/unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
-e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
-e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \
+ -e 's|@''REPLACE_TRUNCATE''@|$(REPLACE_TRUNCATE)|g' \
-e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \
-e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \
-e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
@@ -5619,6 +4773,7 @@ lib/wchar.h: lib/wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NON
-e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \
-e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
-e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \
+ -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \
-e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
-e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \
-e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \
@@ -5659,6 +4814,7 @@ lib/wchar.h: lib/wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NON
-e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \
-e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \
-e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \
+ -e 's/@''GNULIB_WCSFTIME''@/$(GNULIB_WCSFTIME)/g' \
< $(top_srcdir)/lib/wchar.in.h | \
sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
-e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
@@ -5698,6 +4854,7 @@ lib/wchar.h: lib/wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NON
-e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \
-e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \
-e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \
+ -e 's|@''HAVE_WCSFTIME''@|$(HAVE_WCSFTIME)|g' \
-e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
-e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
| \
@@ -5714,6 +4871,7 @@ lib/wchar.h: lib/wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NON
-e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \
-e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
-e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \
+ -e 's|@''REPLACE_WCSFTIME''@|$(REPLACE_WCSFTIME)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
@@ -5731,6 +4889,7 @@ lib/wctype.h: lib/wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \
+ -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \
-e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
-e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \
-e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \
@@ -5802,6 +4961,12 @@ distclean-local:
test x$(srcdir) = x$(builddir) || rm -f $(dist_man_MANS)
rm -f lib/.deps/getfilecon.Po lib/.deps/obstack.Po
+# Shortcut targets to make it easier to run (very) expensive tests.
+check-expensive:
+ $(MAKE) check RUN_EXPENSIVE_TESTS=yes
+check-very-expensive:
+ $(MAKE) check-expensive RUN_VERY_EXPENSIVE_TESTS=yes
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/NEWS b/NEWS
index 9feb52b..7666dcf 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,35 @@
GNU sed NEWS -*- outline -*-
+* Noteworthy changes in release 4.5 (2018-03-31) [stable]
+
+** Bug fixes
+
+ sed now fails when matching very long input lines (>2GB).
+ Before, sed would silently ignore the regex without indicating an
+ error. [Bug present at least since sed-3.02]
+
+ sed no longer rejects comments and closing braces after y/// commands.
+ [Bug existed at least since sed-3.02]
+
+ sed -E --posix no longer ignores special meaning of '+','?','|' .
+ [Bug introduced in the original implementation of --posix option in
+ v4.1a-5-gba68fb4]
+
+ sed -i now creates selinux context based on the context of the symlink
+ instead of the symlink target. [Bug present since at least sed-4.2]
+ sed -i --follow-symlinks remains unchanged.
+
+ sed now treats the sequence '\x5c' (ASCII 92, backslash) as literal
+ backslash character, not as an escape prefix character.
+ [Bug present since sed-3.02.80]
+ Old behavior:
+ $ echo z | sed -E 's/(z)/\x5c1/' # identical to 's/(z)/\1/'
+ z
+ New behavior:
+ $ echo z | sed -E 's/(z)/\x5c1/'
+ \1
+
+
* Noteworthy changes in release 4.4 (2017-02-03) [stable]
** Bug fixes
diff --git a/README-release b/README-release
deleted file mode 100644
index 3c0787d..0000000
--- a/README-release
+++ /dev/null
@@ -1,100 +0,0 @@
-Here are most of the steps we (maintainers) follow when making a release.
-
-* Start from a clean, up-to-date git directory on "master":
-
- make -k maintainer-clean || { ./configure && make maintainer-clean; }
- git checkout master
- git pull origin master
-
-* Ensure that the latest stable versions of autoconf, automake, etc.
- are in your PATH. See the buildreq list in bootstrap.conf for
- the complete list of tools.
-
-* Ensure that you have no uncommitted diffs. This should produce no
- output:
-
- git diff
-
-* Ensure that you've pushed all changes that belong in the release:
-
- git push origin master
-
-* Check that the NixOS/Hydra autobuilder is reporting all is well:
-
- http://hydra.nixos.org/jobset/gnu/sed-master
-
-* Run the following command to download any new translations:
-
- ./bootstrap && ./configure
-
-* Pre-release testing: ensure that the following command succeeds:
-
- make check syntax-check distcheck
-
-* To (i) set the date, version number, and release TYPE on line 3 of
- NEWS, (ii) commit that, and (iii) tag the release, run
-
- # "TYPE" must be stable, beta or alpha
- make release-commit RELEASE='X.Y TYPE'
-
-* Run the following to create release tarballs. Your choice selects the
- corresponding upload-to destination in the emitted gnupload command.
- The different destinations are specified in cfg.mk. See the definitions
- of gnu_ftp_host-{alpha,beta,stable}.
-
- make release RELEASE='X.Y TYPE'
-
-* Test the tarball. Copy it to a few odd-ball systems and ensure that
- it builds and passes all tests.
-
-* While that's happening, write the release announcement that you will
- soon post. Start with the template, $HOME/announce-sed-X.Y
- that was just created by that "make" command.
-
-Once all the builds and tests have passed,
-
-* Run the gnupload command that was suggested by your "make release"
- run above, or run
-
- make upload RELEASE='X.Y TYPE'
-
-* Wait a few minutes (maybe up to 30?) and then use the release URLs to
- download all tarball/signature pairs and use gpg --verify to ensure
- that they're all valid.
-
-* Push the NEWS-updating changes and the new tag:
-
- v=$(cat .prev-version)
- git push origin master tag v$v
-
-* Announce it on Savannah first, so you can include the savannah.org
- announcement link in the email message.
-
- Go to the news-submission form:
-
- https://savannah.gnu.org/news/submit.php?group=sed
-
- If it does not work, then enable "News" for the project via this link:
-
- https://savannah.gnu.org/project/admin/editgroupfeatures.php?group=sed
-
- Write something like the following:
-
- Subject: sed-X.Y released [stable]
- +verbatim+
- ...paste the announcement here...
- -verbatim-
-
- Then go here to approve it:
-
- https://savannah.gnu.org/news/approve.php?group=sed
-
-* Send the announcement email message.
-
-* After each non-alpha release, run
-
- make web-manual-update
-
- to update the on-line manual accessible at
-
- http://www.gnu.org/software/sed/manual/
diff --git a/THANKS b/THANKS
index 9be5920..b57bbcf 100644
--- a/THANKS
+++ b/THANKS
@@ -4,8 +4,10 @@ if you'd rather not be listed, or if you'd prefer a different address
be used, please send a note to the bug-report mailing list (as seen at
end of e.g., sed --help).
+0xddaa 0xddaa@gmail.com
Akim Demaille akim@epita.fr
Alan Modra alan@spri.levels.unisa.edu.au
+Alexandre Jasmin alexandre.jasmin@gmail.com
Andreas Schwab schwab@issan.informatik.uni-dortmund.de
Andrew Herbert andrew@werple.apana.org.au
Arnold Robbins arnold@skeeve.com
@@ -32,6 +34,7 @@ Gaumond Pierre gaumondp@ERE.UMontreal.CA
Greg Ubben gsu@romulus.ncsc.mil
Isamu Hasegawa isamu@yamato.ibm.com
Jakub Jelinek jakub@redhat.com
+Jakub Martisko jamartis@redhat.com
Jari Aalto jari.aalto@cante.net
Jason Molenda crash@cygnus.com
Jim Hill gjthill@gmail.com
@@ -41,12 +44,14 @@ J.T. Conklin jtc@gain.com
Karl Berry karl@freefriends.org
Karl Heuer kwzh@gnu.org
Kaveh R. Ghazi ghazi@caip.rutgers.edu
+Kent Fredric kentnl@gentoo.org
Kevin Buettner kev@cujo.geg.mot.com
Laurent Vogel lvl@club-internet.fr
Maciej W. Rozycki macro@linux-mips.org
Mark Kettenis kettenis@phys.uva.nl
Michael De La Rue delarue@NTCCSC01WA.ntc.nokia.com
Michel de Ruiter mdruiter@cs.vu.nl
+Mike Frysinger vapier@chromium.org
Mike Frysinger vapier@gentoo.org
Norihiro Tanaka noritnk@kcn.ne.jp
Pádraig Brady P@draigBrady.com
@@ -64,6 +69,7 @@ Stepan Kasal kasal@ucw.cz
Stephen Davis stephend@ksr.com
Steve Ingram si@maps-r-us.com
Tapani Tarvainen tarvaine@tukki.jyu.fi
+Thorsten Heymann hek2mgl@metashock.net
Timothy Baker timothypaulbaker@gmail.com
Timothy J Luoma luomat@peak.org
Tom R.Hageman tom@basil.icce.rug.nl
diff --git a/aclocal.m4 b/aclocal.m4
index a648414..baa90a8 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.99a -*- Autoconf -*-
+# generated automatically by aclocal 1.16a -*- Autoconf -*-
-# Copyright (C) 1996-2015 Free Software Foundation, Inc.
+# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -14,13 +14,13 @@
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69.183-96821],,
-[m4_warning([this file was generated for autoconf 2.69.183-96821.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69.193-8974],,
+[m4_warning([this file was generated for autoconf 2.69.193-8974.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
-# Copyright (C) 2002-2015 Free Software Foundation, Inc.
+# Copyright (C) 2002-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.99a'
+[am__api_version='1.16'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.99a], [],
+m4_if([$1], [1.16a], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -51,74 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.99a])dnl
+[AM_AUTOMAKE_VERSION([1.16a])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_AR([ACT-IF-FAIL])
-# -------------------------
-# Try to determine the archiver interface, and trigger the ar-lib wrapper
-# if it is needed. If the detection of archiver interface fails, run
-# ACT-IF-FAIL (default is to abort configure with a proper error message).
-AC_DEFUN([AM_PROG_AR],
-[AC_BEFORE([$0], [LT_INIT])dnl
-AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
-AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([ar-lib])dnl
-AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
-: ${AR=ar}
-
-AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
- [AC_LANG_PUSH([C])
- am_cv_ar_interface=ar
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
- [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
- AC_TRY_EVAL([am_ar_try])
- if test "$ac_status" -eq 0; then
- am_cv_ar_interface=ar
- else
- am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
- AC_TRY_EVAL([am_ar_try])
- if test "$ac_status" -eq 0; then
- am_cv_ar_interface=lib
- else
- am_cv_ar_interface=unknown
- fi
- fi
- rm -f conftest.lib libconftest.a
- ])
- AC_LANG_POP([C])])
-
-case $am_cv_ar_interface in
-ar)
- ;;
-lib)
- # Microsoft lib, so override with the ar-lib wrapper script.
- # FIXME: It is wrong to rewrite AR.
- # But if we don't then we get into trouble of one sort or another.
- # A longer-term fix would be to have automake use am__AR in this case,
- # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
- # similar.
- AR="$am_aux_dir/ar-lib $AR"
- ;;
-unknown)
- m4_default([$1],
- [AC_MSG_ERROR([could not determine $AR interface])])
- ;;
-esac
-AC_SUBST([AR])dnl
-])
-
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -170,7 +110,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997-2015 Free Software Foundation, Inc.
+# Copyright (C) 1997-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -201,7 +141,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999-2015 Free Software Foundation, Inc.
+# Copyright (C) 1999-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -362,7 +302,10 @@ AM_CONDITIONAL([am__fastdep$1], [
# -------------
# Choose a directory name for dependency files.
# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
-AC_DEFUN([AM_SET_DEPDIR], [AC_SUBST([DEPDIR], [.deps])])
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
# AM_DEP_TRACK
@@ -389,7 +332,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999-2015 Free Software Foundation, Inc.
+# Copyright (C) 1999-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -455,7 +398,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996-2015 Free Software Foundation, Inc.
+# Copyright (C) 1996-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -483,8 +426,6 @@ m4_defn([AC_PROG_CC])
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_PREREQ([2.65])dnl
-dnl Without this, packages using Gettext 0.18.2 might break horribly.
-AC_SUBST([mkdir_p], ['$(MKDIR_P)'])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@@ -542,10 +483,16 @@ AM_MISSING_PROG([MAKEINFO], [makeinfo])
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
# We need awk for the "check" target (and possibly the TAP driver). The
# system "awk" is bad on some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
[_AM_PROG_TAR([v7])])])
@@ -606,7 +553,7 @@ END
Aborting the configuration process, to ensure you take notice of the issue.
You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <http://www.gnu.org/software/coreutils/>.
+that behaves properly: <https://www.gnu.org/software/coreutils/>.
If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
@@ -648,7 +595,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -669,9 +616,28 @@ if test x"${install_sh+set}" != xset; then
fi
AC_SUBST([install_sh])])
+# Copyright (C) 2003-2018 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -714,7 +680,7 @@ AC_SUBST([am__quote])])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997-2015 Free Software Foundation, Inc.
+# Copyright (C) 1997-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -752,22 +718,15 @@ fi
])
# -*- Autoconf -*-
-# Deprecated, obsolescent or and obsolete macros.
+# Obsolete and "removed" macros, that must however still report explicit
+# error messages when used, to smooth transition.
#
-# Copyright (C) 1996-2015 Free Software Foundation, Inc.
+# Copyright (C) 1996-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-AC_DEFUN([AM_PROG_MKDIR_P],
-[AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-AC_SUBST([mkdir_p], ['$(MKDIR_P)'])dnl
-AC_DIAGNOSE([obsolete],
-[macro '$0' is deprecated.
-You should use the Autoconf-provided 'AC][_PROG_MKDIR_P' macro instead,
-and use '$(MKDIR_P)' instead of '$(mkdir_p)' in your Makefile.am files.])])
-
AC_DEFUN([AM_CONFIG_HEADER],
[AC_DIAGNOSE([obsolete],
['$0': this macro is obsolete.
@@ -789,7 +748,7 @@ AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -818,7 +777,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-# Copyright (C) 1999-2015 Free Software Foundation, Inc.
+# Copyright (C) 1999-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -865,7 +824,7 @@ AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
-# Copyright (C) 2001-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -884,7 +843,7 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996-2015 Free Software Foundation, Inc.
+# Copyright (C) 1996-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -965,7 +924,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1025,7 +984,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
-# Copyright (C) 2001-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1053,7 +1012,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006-2015 Free Software Foundation, Inc.
+# Copyright (C) 2006-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1072,7 +1031,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004-2015 Free Software Foundation, Inc.
+# Copyright (C) 2004-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1207,6 +1166,8 @@ m4_include([m4/00gnulib.m4])
m4_include([m4/absolute-header.m4])
m4_include([m4/acl.m4])
m4_include([m4/alloca.m4])
+m4_include([m4/arpa_inet_h.m4])
+m4_include([m4/asm-underscore.m4])
m4_include([m4/assert.m4])
m4_include([m4/btowc.m4])
m4_include([m4/builtin-expect.m4])
@@ -1230,6 +1191,7 @@ m4_include([m4/error.m4])
m4_include([m4/extensions.m4])
m4_include([m4/extern-inline.m4])
m4_include([m4/fcntl-o.m4])
+m4_include([m4/fcntl.m4])
m4_include([m4/fcntl_h.m4])
m4_include([m4/fdopen.m4])
m4_include([m4/fflush.m4])
@@ -1242,6 +1204,7 @@ m4_include([m4/fseeko.m4])
m4_include([m4/fstat.m4])
m4_include([m4/ftell.m4])
m4_include([m4/ftello.m4])
+m4_include([m4/ftruncate.m4])
m4_include([m4/fwriting.m4])
m4_include([m4/getcwd.m4])
m4_include([m4/getdelim.m4])
@@ -1255,11 +1218,14 @@ m4_include([m4/glibc21.m4])
m4_include([m4/gnulib-common.m4])
m4_include([m4/gnulib-comp.m4])
m4_include([m4/hard-locale.m4])
+m4_include([m4/host-cpu-c-abi.m4])
m4_include([m4/iconv.m4])
m4_include([m4/include_next.m4])
+m4_include([m4/inet_pton.m4])
m4_include([m4/intlmacosx.m4])
m4_include([m4/inttypes-pri.m4])
m4_include([m4/inttypes.m4])
+m4_include([m4/ioctl.m4])
m4_include([m4/isblank.m4])
m4_include([m4/langinfo_h.m4])
m4_include([m4/largefile.m4])
@@ -1277,6 +1243,7 @@ m4_include([m4/locale-zh.m4])
m4_include([m4/locale_h.m4])
m4_include([m4/localeconv.m4])
m4_include([m4/localename.m4])
+m4_include([m4/localtime-buffer.m4])
m4_include([m4/lock.m4])
m4_include([m4/longlong.m4])
m4_include([m4/lseek.m4])
@@ -1298,21 +1265,27 @@ m4_include([m4/mode_t.m4])
m4_include([m4/msvc-inval.m4])
m4_include([m4/msvc-nothrow.m4])
m4_include([m4/multiarch.m4])
+m4_include([m4/nanosleep.m4])
+m4_include([m4/netinet_in_h.m4])
m4_include([m4/nl_langinfo.m4])
m4_include([m4/nls.m4])
m4_include([m4/nocrash.m4])
m4_include([m4/non-recursive-gnulib-prefix-hack.m4])
m4_include([m4/obstack.m4])
m4_include([m4/off_t.m4])
+m4_include([m4/open-cloexec.m4])
m4_include([m4/open.m4])
m4_include([m4/opendir.m4])
m4_include([m4/pathmax.m4])
+m4_include([m4/perror.m4])
+m4_include([m4/pipe.m4])
m4_include([m4/po.m4])
m4_include([m4/progtest.m4])
m4_include([m4/pthread_rwlock_rdlock.m4])
m4_include([m4/putenv.m4])
m4_include([m4/quote.m4])
m4_include([m4/quotearg.m4])
+m4_include([m4/raise.m4])
m4_include([m4/read-file.m4])
m4_include([m4/readdir.m4])
m4_include([m4/readlink.m4])
@@ -1320,12 +1293,21 @@ m4_include([m4/realloc.m4])
m4_include([m4/regex.m4])
m4_include([m4/rename.m4])
m4_include([m4/rmdir.m4])
-m4_include([m4/secure_getenv.m4])
+m4_include([m4/select.m4])
m4_include([m4/selinux-context-h.m4])
m4_include([m4/selinux-selinux-h.m4])
m4_include([m4/setenv.m4])
m4_include([m4/setlocale.m4])
+m4_include([m4/sigaction.m4])
+m4_include([m4/signal_h.m4])
+m4_include([m4/signalblocking.m4])
+m4_include([m4/sleep.m4])
+m4_include([m4/socketlib.m4])
+m4_include([m4/sockets.m4])
+m4_include([m4/socklen.m4])
+m4_include([m4/sockpfaf.m4])
m4_include([m4/ssize_t.m4])
+m4_include([m4/stat-time.m4])
m4_include([m4/stat.m4])
m4_include([m4/std-gnu11.m4])
m4_include([m4/stdalign.m4])
@@ -1337,13 +1319,17 @@ m4_include([m4/stdio_h.m4])
m4_include([m4/stdlib_h.m4])
m4_include([m4/strdup.m4])
m4_include([m4/strerror.m4])
+m4_include([m4/strerror_r.m4])
m4_include([m4/string_h.m4])
m4_include([m4/strverscmp.m4])
m4_include([m4/symlink.m4])
+m4_include([m4/sys_ioctl_h.m4])
+m4_include([m4/sys_select_h.m4])
m4_include([m4/sys_socket_h.m4])
m4_include([m4/sys_stat_h.m4])
m4_include([m4/sys_time_h.m4])
m4_include([m4/sys_types_h.m4])
+m4_include([m4/sys_uio_h.m4])
m4_include([m4/tempname.m4])
m4_include([m4/threadlib.m4])
m4_include([m4/time_h.m4])
diff --git a/basicdefs.h b/basicdefs.h
index 4831236..bdbc45c 100644
--- a/basicdefs.h
+++ b/basicdefs.h
@@ -1,5 +1,5 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 1998-2017 Free Software Foundation, Inc.
+ Copyright (C) 1998-2018 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/bootstrap b/bootstrap
index 932ff85..92be114 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,10 +1,10 @@
#! /bin/sh
# Print a version string.
-scriptversion=2017-01-09.19; # UTC
+scriptversion=2018-03-07.03; # UTC
# Bootstrap this package from checked-out sources.
-# Copyright (C) 2003-2017 Free Software Foundation, Inc.
+# Copyright (C) 2003-2018 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,7 +17,7 @@ scriptversion=2017-01-09.19; # UTC
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Originally written by Paul Eggert. The canonical version of this
# script is maintained as build-aux/bootstrap in gnulib, however, to
@@ -141,7 +141,7 @@ po_download_command_format=\
# Fallback for downloading .po files (if rsync fails).
po_download_command_format2=\
"wget --mirror -nd -q -np -A.po -P '%s' \
- http://translationproject.org/latest/%s/"
+ https://translationproject.org/latest/%s/"
# Prefer a non-empty tarname (4th argument of AC_INIT if given), else
# fall back to the package name (1st argument with munging)
@@ -699,7 +699,7 @@ download_po_files() {
echo "$me: getting translations into $subdir for $domain..."
cmd=$(printf "$po_download_command_format" "$domain" "$subdir")
eval "$cmd" && return
- # Fallback to HTTP.
+ # Fallback to HTTPS.
cmd=$(printf "$po_download_command_format2" "$subdir" "$domain")
eval "$cmd"
}
@@ -792,7 +792,7 @@ symlink_to_dir()
# aren't confused into doing unnecessary builds. Conversely, if the
# existing symlink's timestamp is older than the source, make it afresh,
# so that broken tools aren't confused into skipping needed builds. See
- # <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00326.html>.
+ # <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00326.html>.
test -h "$dst" &&
src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 &&
dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 &&
@@ -1020,7 +1020,7 @@ bootstrap_epilogue
echo "$0: done. Now you can run './configure'."
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
diff --git a/bootstrap.conf b/bootstrap.conf
index 99df71e..75c6654 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -1,6 +1,6 @@
# Bootstrap configuration.
-# Copyright (C) 2006-2017 Free Software Foundation, Inc.
+# Copyright (C) 2006-2018 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
@@ -13,7 +13,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
avoided_gnulib_modules='
--avoid=lock-tests
@@ -95,7 +95,7 @@ autopoint -
gettext 0.19.2
git 1.4.4
gzip -
-makeinfo 4.13
+makeinfo 6.1
perl 5.5
rsync -
tar -
@@ -124,4 +124,11 @@ bootstrap_epilogue()
# first grep may well run out of memory.
perl -pi -e 's/if LC_ALL=C grep .GNU .PACKAGE.*; then/if true; then/' \
po/Makefile.in.in
+
+ # Add dummy 'install-html' target, required for packages using
+ # non-recursive makefiles with older gettext.
+ # See https://debbugs.gnu.org/25690
+ if ! grep -w 'install-html' po/Makefile.in.in ; then
+ printf 'install-%s:;\n' dvi ps pdf html >> po/Makefile.in.in
+ fi
}
diff --git a/build-aux/announce-gen b/build-aux/announce-gen
index e789b13..eeb9071 100755
--- a/build-aux/announce-gen
+++ b/build-aux/announce-gen
@@ -3,13 +3,13 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" "$@"'
if 0;
# Generate a release announcement message.
-my $VERSION = '2016-01-12 23:09'; # UTC
+my $VERSION = '2018-03-07 03:46'; # UTC
# The definition above must lie within the first 8 lines in order
# for the Emacs time-stamp write hook (at end) to update it.
# If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually.
-# Copyright (C) 2002-2017 Free Software Foundation, Inc.
+# Copyright (C) 2002-2018 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,7 +22,7 @@ my $VERSION = '2016-01-12 23:09'; # UTC
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Written by Jim Meyering
@@ -492,17 +492,17 @@ EOF
if ($url_dir_list[0] =~ "gnu\.org")
{
print "Use a mirror for higher download bandwidth:\n";
- if (@tarballs == 1 && $url_dir_list[0] =~ m!http://ftp\.gnu\.org/gnu/!)
+ if (@tarballs == 1 && $url_dir_list[0] =~ m!https://ftp\.gnu\.org/gnu/!)
{
(my $m = "$url_dir_list[0]/$tarballs[0]")
- =~ s!http://ftp\.gnu\.org/gnu/!http://ftpmirror\.gnu\.org/!;
+ =~ s!https://ftp\.gnu\.org/gnu/!https://ftpmirror\.gnu\.org/!;
print " $m\n"
. " $m.sig\n\n";
}
else
{
- print " http://www.gnu.org/order/ftp.html\n\n";
+ print " https://www.gnu.org/order/ftp.html\n\n";
}
}
@@ -549,7 +549,7 @@ EOF
## perl-label-offset: -2
## perl-extra-newline-before-brace: t
## perl-merge-trailing-else: nil
-## eval: (add-hook 'write-file-hooks 'time-stamp)
+## eval: (add-hook 'before-save-hook 'time-stamp)
## time-stamp-start: "my $VERSION = '"
## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
## time-stamp-time-zone: "UTC0"
diff --git a/build-aux/config.guess b/build-aux/config.guess
index bbd48b6..256083a 100755
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -1,8 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright 1992-2017 Free Software Foundation, Inc.
+# Copyright 1992-2018 Free Software Foundation, Inc.
-timestamp='2017-01-01'
+timestamp='2018-03-08'
# 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
@@ -15,7 +15,7 @@ timestamp='2017-01-01'
# 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/>.
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -27,7 +27,7 @@ timestamp='2017-01-01'
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
#
# Please send patches to <config-patches@gnu.org>.
@@ -39,7 +39,7 @@ Usage: $0 [OPTION]
Output the configuration name of the system \`$me' is run on.
-Operation modes:
+Options:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
@@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright 1992-2017 Free Software Foundation, Inc.
+Copyright 1992-2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -107,9 +107,9 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int x;" > $dummy.c ;
+ ,,) echo "int x;" > "$dummy.c" ;
for c in cc gcc c89 c99 ; do
- if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
CC_FOR_BUILD="$c"; break ;
fi ;
done ;
@@ -132,14 +132,14 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-case "${UNAME_SYSTEM}" in
+case "$UNAME_SYSTEM" in
Linux|GNU|GNU/*)
# If the system lacks a compiler, then just pick glibc.
# We could probably try harder.
LIBC=gnu
- eval $set_cc_for_build
- cat <<-EOF > $dummy.c
+ eval "$set_cc_for_build"
+ cat <<-EOF > "$dummy.c"
#include <features.h>
#if defined(__UCLIBC__)
LIBC=uclibc
@@ -149,13 +149,20 @@ Linux|GNU|GNU/*)
LIBC=gnu
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+ eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
+
+ # If ldd exists, use it to detect musl libc.
+ if command -v ldd >/dev/null && \
+ ldd --version 2>&1 | grep -q ^musl
+ then
+ LIBC=musl
+ fi
;;
esac
# Note: order is significant - the case branches are not exclusive.
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
@@ -169,30 +176,30 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
- /sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || \
+ "/sbin/$sysctl" 2>/dev/null || \
+ "/usr/sbin/$sysctl" 2>/dev/null || \
echo unknown)`
- case "${UNAME_MACHINE_ARCH}" in
+ case "$UNAME_MACHINE_ARCH" in
armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
earmv*)
- arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
- endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
- machine=${arch}${endian}-unknown
+ arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+ endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+ machine="${arch}${endian}"-unknown
;;
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
esac
# The Operating System including object format, if it has switched
# to ELF recently (or will in the future) and ABI.
- case "${UNAME_MACHINE_ARCH}" in
+ case "$UNAME_MACHINE_ARCH" in
earm*)
os=netbsdelf
;;
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval $set_cc_for_build
+ eval "$set_cc_for_build"
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
then
@@ -208,10 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
;;
esac
# Determine ABI tags.
- case "${UNAME_MACHINE_ARCH}" in
+ case "$UNAME_MACHINE_ARCH" in
earm*)
expr='s/^earmv[0-9]/-eabi/;s/eb$//'
- abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+ abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
;;
esac
# The OS release
@@ -219,46 +226,55 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# thus, need a distinct triplet. However, they do not need
# kernel version information, so it can be replaced with a
# suitable tag, in the style of linux-gnu.
- case "${UNAME_VERSION}" in
+ case "$UNAME_VERSION" in
Debian*)
release='-gnu'
;;
*)
- release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
+ release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}${abi}"
+ echo "$machine-${os}${release}${abi}"
exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
exit ;;
*:LibertyBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
+ exit ;;
+ *:MidnightBSD:*:*)
+ echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
exit ;;
*:ekkoBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
exit ;;
*:SolidBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
exit ;;
macppc:MirBSD:*:*)
- echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
exit ;;
*:MirBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
exit ;;
*:Sortix:*:*)
- echo ${UNAME_MACHINE}-unknown-sortix
+ echo "$UNAME_MACHINE"-unknown-sortix
+ exit ;;
+ *:Redox:*:*)
+ echo "$UNAME_MACHINE"-unknown-redox
exit ;;
+ mips:OSF1:*.*)
+ echo mips-dec-osf1
+ exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
@@ -310,28 +326,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
exit $exitcode ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
- exit ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
- exit ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
exit ;;
*:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
+ echo "$UNAME_MACHINE"-unknown-amigaos
exit ;;
*:[Mm]orph[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-morphos
+ echo "$UNAME_MACHINE"-unknown-morphos
exit ;;
*:OS/390:*:*)
echo i370-ibm-openedition
@@ -343,7 +350,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo powerpc-ibm-os400
exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
+ echo arm-acorn-riscix"$UNAME_RELEASE"
exit ;;
arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
@@ -370,19 +377,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
s390x:SunOS:*:*)
- echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
exit ;;
sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
exit ;;
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
- echo i386-pc-auroraux${UNAME_RELEASE}
+ echo i386-pc-auroraux"$UNAME_RELEASE"
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- eval $set_cc_for_build
+ eval "$set_cc_for_build"
SUN_ARCH=i386
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
@@ -395,13 +402,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
SUN_ARCH=x86_64
fi
fi
- echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
@@ -410,25 +417,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
;;
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
exit ;;
sun3*:SunOS:*:*)
- echo m68k-sun-sunos${UNAME_RELEASE}
+ echo m68k-sun-sunos"$UNAME_RELEASE"
exit ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
+ test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
- echo m68k-sun-sunos${UNAME_RELEASE}
+ echo m68k-sun-sunos"$UNAME_RELEASE"
;;
sun4)
- echo sparc-sun-sunos${UNAME_RELEASE}
+ echo sparc-sun-sunos"$UNAME_RELEASE"
;;
esac
exit ;;
aushp:SunOS:*:*)
- echo sparc-auspex-sunos${UNAME_RELEASE}
+ echo sparc-auspex-sunos"$UNAME_RELEASE"
exit ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
@@ -439,44 +446,44 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint"$UNAME_RELEASE"
exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint"$UNAME_RELEASE"
exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint"$UNAME_RELEASE"
exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
+ echo m68k-milan-mint"$UNAME_RELEASE"
exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
+ echo m68k-hades-mint"$UNAME_RELEASE"
exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
+ echo m68k-unknown-mint"$UNAME_RELEASE"
exit ;;
m68k:machten:*:*)
- echo m68k-apple-machten${UNAME_RELEASE}
+ echo m68k-apple-machten"$UNAME_RELEASE"
exit ;;
powerpc:machten:*:*)
- echo powerpc-apple-machten${UNAME_RELEASE}
+ echo powerpc-apple-machten"$UNAME_RELEASE"
exit ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
exit ;;
RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix${UNAME_RELEASE}
+ echo mips-dec-ultrix"$UNAME_RELEASE"
exit ;;
VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix${UNAME_RELEASE}
+ echo vax-dec-ultrix"$UNAME_RELEASE"
exit ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix${UNAME_RELEASE}
+ echo clipper-intergraph-clix"$UNAME_RELEASE"
exit ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ eval "$set_cc_for_build"
+ sed 's/^ //' << EOF > "$dummy.c"
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
int main (int argc, char *argv[]) {
@@ -485,23 +492,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
#endif
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
#endif
#endif
exit (-1);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c &&
- dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
- SYSTEM_NAME=`$dummy $dummyarg` &&
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+ dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
{ echo "$SYSTEM_NAME"; exit; }
- echo mips-mips-riscos${UNAME_RELEASE}
+ echo mips-mips-riscos"$UNAME_RELEASE"
exit ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
@@ -527,17 +534,17 @@ EOF
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
- [ ${TARGET_BINARY_INTERFACE}x = x ]
+ if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
+ [ "$TARGET_BINARY_INTERFACE"x = x ]
then
- echo m88k-dg-dgux${UNAME_RELEASE}
+ echo m88k-dg-dgux"$UNAME_RELEASE"
else
- echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ echo m88k-dg-dguxbcs"$UNAME_RELEASE"
fi
else
- echo i586-dg-dgux${UNAME_RELEASE}
+ echo i586-dg-dgux"$UNAME_RELEASE"
fi
exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
@@ -554,7 +561,7 @@ EOF
echo m68k-tektronix-bsd
exit ;;
*:IRIX*:*:*)
- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
exit ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
@@ -566,14 +573,14 @@ EOF
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
exit ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ eval "$set_cc_for_build"
+ sed 's/^ //' << EOF > "$dummy.c"
#include <sys/systemcfg.h>
main()
@@ -584,7 +591,7 @@ EOF
exit(0);
}
EOF
- if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
then
echo "$SYSTEM_NAME"
else
@@ -598,7 +605,7 @@ EOF
exit ;;
*:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
@@ -607,18 +614,18 @@ EOF
IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
fi
- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
exit ;;
*:AIX:*:*)
echo rs6000-ibm-aix
exit ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
echo romp-ibm-bsd4.4
exit ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
exit ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
@@ -633,28 +640,28 @@ EOF
echo m68k-hp-bsd4.4
exit ;;
9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
+ HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+ case "$UNAME_MACHINE" in
+ 9000/31?) HP_ARCH=m68000 ;;
+ 9000/[34]??) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
+ case "$sc_cpu_version" in
523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
+ case "$sc_kernel_bits" in
32) HP_ARCH=hppa2.0n ;;
64) HP_ARCH=hppa2.0w ;;
'') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
esac ;;
esac
fi
- if [ "${HP_ARCH}" = "" ]; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ if [ "$HP_ARCH" = "" ]; then
+ eval "$set_cc_for_build"
+ sed 's/^ //' << EOF > "$dummy.c"
#define _HPUX_SOURCE
#include <stdlib.h>
@@ -687,13 +694,13 @@ EOF
exit (0);
}
EOF
- (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
- if [ ${HP_ARCH} = hppa2.0w ]
+ if [ "$HP_ARCH" = hppa2.0w ]
then
- eval $set_cc_for_build
+ eval "$set_cc_for_build"
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
@@ -712,15 +719,15 @@ EOF
HP_ARCH=hppa64
fi
fi
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
exit ;;
ia64:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
+ HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux"$HPUX_REV"
exit ;;
3050*:HI-UX:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ eval "$set_cc_for_build"
+ sed 's/^ //' << EOF > "$dummy.c"
#include <unistd.h>
int
main ()
@@ -745,11 +752,11 @@ EOF
exit (0);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
{ echo "$SYSTEM_NAME"; exit; }
echo unknown-hitachi-hiuxwe2
exit ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
echo hppa1.1-hp-bsd
exit ;;
9000/8??:4.3bsd:*:*)
@@ -758,7 +765,7 @@ EOF
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
exit ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
echo hppa1.1-hp-osf
exit ;;
hp8??:OSF1:*:*)
@@ -766,9 +773,9 @@ EOF
exit ;;
i*86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
- echo ${UNAME_MACHINE}-unknown-osf1mk
+ echo "$UNAME_MACHINE"-unknown-osf1mk
else
- echo ${UNAME_MACHINE}-unknown-osf1
+ echo "$UNAME_MACHINE"-unknown-osf1
fi
exit ;;
parisc*:Lites*:*:*)
@@ -793,127 +800,109 @@ EOF
echo c4-convex-bsd
exit ;;
CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*[A-Z]90:*:*:*)
- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-e 's/\.[^.]*$/.X/'
exit ;;
CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
*:UNICOS/mp:*:*)
- echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
exit ;;
sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi${UNAME_RELEASE}
+ echo sparc-unknown-bsdi"$UNAME_RELEASE"
exit ;;
*:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
exit ;;
*:FreeBSD:*:*)
UNAME_PROCESSOR=`/usr/bin/uname -p`
- case ${UNAME_PROCESSOR} in
+ case "$UNAME_PROCESSOR" in
amd64)
- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- *)
- echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ UNAME_PROCESSOR=x86_64 ;;
+ i386)
+ UNAME_PROCESSOR=i586 ;;
esac
+ echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
exit ;;
i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
+ echo "$UNAME_MACHINE"-pc-cygwin
exit ;;
*:MINGW64*:*)
- echo ${UNAME_MACHINE}-pc-mingw64
+ echo "$UNAME_MACHINE"-pc-mingw64
exit ;;
*:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
+ echo "$UNAME_MACHINE"-pc-mingw32
exit ;;
*:MSYS*:*)
- echo ${UNAME_MACHINE}-pc-msys
- exit ;;
- i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
+ echo "$UNAME_MACHINE"-pc-msys
exit ;;
i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
+ echo "$UNAME_MACHINE"-pc-pw32
exit ;;
*:Interix*:*)
- case ${UNAME_MACHINE} in
+ case "$UNAME_MACHINE" in
x86)
- echo i586-pc-interix${UNAME_RELEASE}
+ echo i586-pc-interix"$UNAME_RELEASE"
exit ;;
authenticamd | genuineintel | EM64T)
- echo x86_64-unknown-interix${UNAME_RELEASE}
+ echo x86_64-unknown-interix"$UNAME_RELEASE"
exit ;;
IA64)
- echo ia64-unknown-interix${UNAME_RELEASE}
+ echo ia64-unknown-interix"$UNAME_RELEASE"
exit ;;
esac ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
- exit ;;
- 8664:Windows_NT:*)
- echo x86_64-pc-mks
- exit ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
- exit ;;
i*:UWIN*:*)
- echo ${UNAME_MACHINE}-pc-uwin
+ echo "$UNAME_MACHINE"-pc-uwin
exit ;;
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit ;;
- p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
- exit ;;
prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
*:GNU:*:*)
# the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
exit ;;
i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
+ echo "$UNAME_MACHINE"-pc-minix
exit ;;
aarch64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -927,63 +916,63 @@ EOF
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
arc:Linux:*:* | arceb:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
arm*:Linux:*:*)
- eval $set_cc_for_build
+ eval "$set_cc_for_build"
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
else
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
cris:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
exit ;;
crisv32:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
exit ;;
e2k:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
frv:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
hexagon:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
i*86:Linux:*:*)
- echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
k1om:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ eval "$set_cc_for_build"
+ sed 's/^ //' << EOF > "$dummy.c"
#undef CPU
#undef ${UNAME_MACHINE}
#undef ${UNAME_MACHINE}el
@@ -997,70 +986,70 @@ EOF
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
+ test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
;;
mips64el:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
openrisc*:Linux:*:*)
- echo or1k-unknown-linux-${LIBC}
+ echo or1k-unknown-linux-"$LIBC"
exit ;;
or32:Linux:*:* | or1k*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
padre:Linux:*:*)
- echo sparc-unknown-linux-${LIBC}
+ echo sparc-unknown-linux-"$LIBC"
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-${LIBC}
+ echo hppa64-unknown-linux-"$LIBC"
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
- PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
- *) echo hppa-unknown-linux-${LIBC} ;;
+ PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
+ PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
+ *) echo hppa-unknown-linux-"$LIBC" ;;
esac
exit ;;
ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-${LIBC}
+ echo powerpc64-unknown-linux-"$LIBC"
exit ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-${LIBC}
+ echo powerpc-unknown-linux-"$LIBC"
exit ;;
ppc64le:Linux:*:*)
- echo powerpc64le-unknown-linux-${LIBC}
+ echo powerpc64le-unknown-linux-"$LIBC"
exit ;;
ppcle:Linux:*:*)
- echo powerpcle-unknown-linux-${LIBC}
+ echo powerpcle-unknown-linux-"$LIBC"
exit ;;
riscv32:Linux:*:* | riscv64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+ echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
exit ;;
x86_64:Linux:*:*)
- echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
exit ;;
xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1074,34 +1063,34 @@ EOF
# I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
exit ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
+ echo "$UNAME_MACHINE"-pc-os2-emx
exit ;;
i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
+ echo "$UNAME_MACHINE"-unknown-stop
exit ;;
i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
+ echo "$UNAME_MACHINE"-unknown-atheos
exit ;;
i*86:syllable:*:*)
- echo ${UNAME_MACHINE}-pc-syllable
+ echo "$UNAME_MACHINE"-pc-syllable
exit ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
+ echo i386-unknown-lynxos"$UNAME_RELEASE"
exit ;;
i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ echo "$UNAME_MACHINE"-pc-msdosdjgpp
exit ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ i*86:*:4.*:*)
+ UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
fi
exit ;;
i*86:*:5:[678]*)
@@ -1111,12 +1100,12 @@ EOF
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
exit ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
elif /bin/uname -X 2>/dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
@@ -1126,9 +1115,9 @@ EOF
&& UNAME_MACHINE=i686
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
&& UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
else
- echo ${UNAME_MACHINE}-pc-sysv32
+ echo "$UNAME_MACHINE"-pc-sysv32
fi
exit ;;
pc:*:*:*)
@@ -1148,9 +1137,9 @@ EOF
exit ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
fi
exit ;;
mini*:CTIX:SYS*5:*)
@@ -1170,9 +1159,9 @@ EOF
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
@@ -1181,28 +1170,28 @@ EOF
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
+ echo m68k-unknown-lynxos"$UNAME_RELEASE"
exit ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit ;;
TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
+ echo sparc-unknown-lynxos"$UNAME_RELEASE"
exit ;;
rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ echo rs6000-unknown-lynxos"$UNAME_RELEASE"
exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ echo powerpc-unknown-lynxos"$UNAME_RELEASE"
exit ;;
SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv${UNAME_RELEASE}
+ echo mips-dde-sysv"$UNAME_RELEASE"
exit ;;
RM*:ReliantUNIX-*:*:*)
echo mips-sni-sysv4
@@ -1213,7 +1202,7 @@ EOF
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
- echo ${UNAME_MACHINE}-sni-sysv4
+ echo "$UNAME_MACHINE"-sni-sysv4
else
echo ns32k-sni-sysv
fi
@@ -1233,23 +1222,23 @@ EOF
exit ;;
i*86:VOS:*:*)
# From Paul.Green@stratus.com.
- echo ${UNAME_MACHINE}-stratus-vos
+ echo "$UNAME_MACHINE"-stratus-vos
exit ;;
*:VOS:*:*)
# From Paul.Green@stratus.com.
echo hppa1.1-stratus-vos
exit ;;
mc68*:A/UX:*:*)
- echo m68k-apple-aux${UNAME_RELEASE}
+ echo m68k-apple-aux"$UNAME_RELEASE"
exit ;;
news*:NEWS-OS:6*:*)
echo mips-sony-newsos6
exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
+ echo mips-nec-sysv"$UNAME_RELEASE"
else
- echo mips-unknown-sysv${UNAME_RELEASE}
+ echo mips-unknown-sysv"$UNAME_RELEASE"
fi
exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
@@ -1268,49 +1257,56 @@ EOF
echo x86_64-unknown-haiku
exit ;;
SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
+ echo sx4-nec-superux"$UNAME_RELEASE"
exit ;;
SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux${UNAME_RELEASE}
+ echo sx5-nec-superux"$UNAME_RELEASE"
exit ;;
SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux${UNAME_RELEASE}
+ echo sx6-nec-superux"$UNAME_RELEASE"
exit ;;
SX-7:SUPER-UX:*:*)
- echo sx7-nec-superux${UNAME_RELEASE}
+ echo sx7-nec-superux"$UNAME_RELEASE"
exit ;;
SX-8:SUPER-UX:*:*)
- echo sx8-nec-superux${UNAME_RELEASE}
+ echo sx8-nec-superux"$UNAME_RELEASE"
exit ;;
SX-8R:SUPER-UX:*:*)
- echo sx8r-nec-superux${UNAME_RELEASE}
+ echo sx8r-nec-superux"$UNAME_RELEASE"
exit ;;
SX-ACE:SUPER-UX:*:*)
- echo sxace-nec-superux${UNAME_RELEASE}
+ echo sxace-nec-superux"$UNAME_RELEASE"
exit ;;
Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ echo powerpc-apple-rhapsody"$UNAME_RELEASE"
exit ;;
*:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- eval $set_cc_for_build
+ eval "$set_cc_for_build"
if test "$UNAME_PROCESSOR" = unknown ; then
UNAME_PROCESSOR=powerpc
fi
- if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+ if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
then
case $UNAME_PROCESSOR in
i386) UNAME_PROCESSOR=x86_64 ;;
powerpc) UNAME_PROCESSOR=powerpc64 ;;
esac
fi
+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_PPC >/dev/null
+ then
+ UNAME_PROCESSOR=powerpc
+ fi
fi
elif test "$UNAME_PROCESSOR" = i386 ; then
# Avoid executing cc on OS X 10.9, as it ships with a stub
@@ -1321,7 +1317,7 @@ EOF
# that Apple uses in portable devices.
UNAME_PROCESSOR=x86_64
fi
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
@@ -1329,19 +1325,25 @@ EOF
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
exit ;;
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
- NEO-?:NONSTOP_KERNEL:*:*)
- echo neo-tandem-nsk${UNAME_RELEASE}
+ NEO-*:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk"$UNAME_RELEASE"
exit ;;
NSE-*:NONSTOP_KERNEL:*:*)
- echo nse-tandem-nsk${UNAME_RELEASE}
+ echo nse-tandem-nsk"$UNAME_RELEASE"
exit ;;
- NSR-?:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
+ NSR-*:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSV-*:NONSTOP_KERNEL:*:*)
+ echo nsv-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSX-*:NONSTOP_KERNEL:*:*)
+ echo nsx-tandem-nsk"$UNAME_RELEASE"
exit ;;
*:NonStop-UX:*:*)
echo mips-compaq-nonstopux
@@ -1350,7 +1352,7 @@ EOF
echo bs2000-siemens-sysv
exit ;;
DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
exit ;;
*:Plan9:*:*)
# "uname -m" is not consistent, so use $cputype instead. 386
@@ -1361,7 +1363,7 @@ EOF
else
UNAME_MACHINE="$cputype"
fi
- echo ${UNAME_MACHINE}-unknown-plan9
+ echo "$UNAME_MACHINE"-unknown-plan9
exit ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
@@ -1382,14 +1384,14 @@ EOF
echo pdp10-unknown-its
exit ;;
SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
+ echo mips-sei-seiux"$UNAME_RELEASE"
exit ;;
*:DragonFly:*:*)
- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
exit ;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
- case "${UNAME_MACHINE}" in
+ case "$UNAME_MACHINE" in
A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;;
V*) echo vax-dec-vms ; exit ;;
@@ -1398,32 +1400,44 @@ EOF
echo i386-pc-xenix
exit ;;
i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
+ echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
exit ;;
i*86:rdos:*:*)
- echo ${UNAME_MACHINE}-pc-rdos
+ echo "$UNAME_MACHINE"-pc-rdos
exit ;;
i*86:AROS:*:*)
- echo ${UNAME_MACHINE}-pc-aros
+ echo "$UNAME_MACHINE"-pc-aros
exit ;;
x86_64:VMkernel:*:*)
- echo ${UNAME_MACHINE}-unknown-esx
+ echo "$UNAME_MACHINE"-unknown-esx
exit ;;
amd64:Isilon\ OneFS:*:*)
echo x86_64-unknown-onefs
exit ;;
esac
+echo "$0: unable to guess system type" >&2
+
+case "$UNAME_MACHINE:$UNAME_SYSTEM" in
+ mips:Linux | mips64:Linux)
+ # If we got here on MIPS GNU/Linux, output extra information.
+ cat >&2 <<EOF
+
+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
+the system type. Please install a C compiler and try again.
+EOF
+ ;;
+esac
+
cat >&2 <<EOF
-$0: unable to guess system type
This script (version $timestamp), has failed to recognize the
-operating system you are using. If your script is old, overwrite
-config.guess and config.sub with the latest versions from:
+operating system you are using. If your script is old, overwrite *all*
+copies of config.guess and config.sub with the latest versions from:
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+ https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+ https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
If $0 has already been updated, send the following data and any
information you think might be pertinent to config-patches@gnu.org to
@@ -1446,16 +1460,16 @@ hostinfo = `(hostinfo) 2>/dev/null`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
EOF
exit 1
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
diff --git a/build-aux/config.rpath b/build-aux/config.rpath
index af3c415..fc5913d 100755
--- a/build-aux/config.rpath
+++ b/build-aux/config.rpath
@@ -2,7 +2,7 @@
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
#
-# Copyright 1996-2017 Free Software Foundation, Inc.
+# Copyright 1996-2018 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
diff --git a/build-aux/config.sub b/build-aux/config.sub
index 7e792b4..9ccf09a 100755
--- a/build-aux/config.sub
+++ b/build-aux/config.sub
@@ -1,8 +1,8 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright 1992-2017 Free Software Foundation, Inc.
+# Copyright 1992-2018 Free Software Foundation, Inc.
-timestamp='2017-01-01'
+timestamp='2018-03-08'
# 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
@@ -15,7 +15,7 @@ timestamp='2017-01-01'
# 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/>.
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -33,7 +33,7 @@ timestamp='2017-01-01'
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
@@ -57,7 +57,7 @@ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
-Operation modes:
+Options:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
@@ -67,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright 1992-2017 Free Software Foundation, Inc.
+Copyright 1992-2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -94,7 +94,7 @@ while test $# -gt 0 ; do
*local*)
# First pass through any local machine types.
- echo $1
+ echo "$1"
exit ;;
* )
@@ -112,7 +112,7 @@ esac
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
@@ -120,16 +120,16 @@ case $maybe_os in
kopensolaris*-gnu* | cloudabi*-eabi* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
android-linux)
os=-linux-android
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
;;
*)
- basic_machine=`echo $1 | sed 's/-[^-]*$//'`
- if [ $basic_machine != $1 ]
- then os=`echo $1 | sed 's/.*-/-/'`
+ basic_machine=`echo "$1" | sed 's/-[^-]*$//'`
+ if [ "$basic_machine" != "$1" ]
+ then os=`echo "$1" | sed 's/.*-/-/'`
else os=; fi
;;
esac
@@ -178,44 +178,44 @@ case $os in
;;
-sco6)
os=-sco5v6
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-sco5)
os=-sco3.2v5
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-sco4)
os=-sco3.2v4
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2.[4-9]*)
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2v[4-9]*)
# Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-sco5v6*)
# Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-sco*)
os=-sco3.2v2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-udk*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-isc)
os=-isc2.2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-clix*)
basic_machine=clipper-intergraph
;;
-isc*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-lynx*178)
os=-lynxos178
@@ -227,10 +227,7 @@ case $os in
os=-lynxos
;;
-ptx*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
- ;;
- -windowsnt*)
- os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
;;
-psos*)
os=-psos
@@ -263,7 +260,7 @@ case $basic_machine in
| fido | fr30 | frv | ft32 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
- | i370 | i860 | i960 | ia64 \
+ | i370 | i860 | i960 | ia16 | ia64 \
| ip2k | iq2000 \
| k1om \
| le32 | le64 \
@@ -299,7 +296,7 @@ case $basic_machine in
| nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
| open8 | or1k | or1knd | or32 \
- | pdp10 | pdp11 | pj | pjl \
+ | pdp10 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pru \
| pyramid \
@@ -315,7 +312,7 @@ case $basic_machine in
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| visium \
- | we32k \
+ | wasm32 \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
basic_machine=$basic_machine-unknown
@@ -336,7 +333,7 @@ case $basic_machine in
basic_machine=$basic_machine-unknown
os=-none
;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
;;
ms1)
basic_machine=mt-unknown
@@ -365,7 +362,7 @@ case $basic_machine in
;;
# Object if more than one company name word.
*-*-*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
exit 1
;;
# Recognize the basic CPU types with company name.
@@ -388,7 +385,7 @@ case $basic_machine in
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \
- | i*86-* | i860-* | i960-* | ia64-* \
+ | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
| ip2k-* | iq2000-* \
| k1om-* \
| le32-* | le64-* \
@@ -446,6 +443,7 @@ case $basic_machine in
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
| visium-* \
+ | wasm32-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
@@ -459,7 +457,7 @@ case $basic_machine in
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
- basic_machine=i386-unknown
+ basic_machine=i386-pc
os=-bsd
;;
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
@@ -493,7 +491,7 @@ case $basic_machine in
basic_machine=x86_64-pc
;;
amd64-*)
- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
amdahl)
basic_machine=580-amdahl
@@ -538,7 +536,7 @@ case $basic_machine in
os=-linux
;;
blackfin-*)
- basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
os=-linux
;;
bluegene*)
@@ -546,13 +544,13 @@ case $basic_machine in
os=-cnk
;;
c54x-*)
- basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
c55x-*)
- basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
c6x-*)
- basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
c90)
basic_machine=c90-cray
@@ -641,7 +639,7 @@ case $basic_machine in
basic_machine=rs6000-bull
os=-bosx
;;
- dpx2* | dpx2*-bull)
+ dpx2*)
basic_machine=m68k-bull
os=-sysv3
;;
@@ -650,7 +648,7 @@ case $basic_machine in
os=$os"spe"
;;
e500v[12]-*)
- basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
os=$os"spe"
;;
ebmon29k)
@@ -742,9 +740,6 @@ case $basic_machine in
hp9k8[0-9][0-9] | hp8[0-9][0-9])
basic_machine=hppa1.0-hp
;;
- hppa-next)
- os=-nextstep3
- ;;
hppaosf)
basic_machine=hppa1.1-hp
os=-osf
@@ -757,26 +752,26 @@ case $basic_machine in
basic_machine=i370-ibm
;;
i*86v32)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
os=-sysv32
;;
i*86v4*)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
os=-sysv4
;;
i*86v)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
os=-sysv
;;
i*86sol2)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
i386mach)
basic_machine=i386-mach
os=-mach
;;
- i386-vsta | vsta)
+ vsta)
basic_machine=i386-unknown
os=-vsta
;;
@@ -795,19 +790,16 @@ case $basic_machine in
os=-sysv
;;
leon-*|leon[3-9]-*)
- basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+ basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
;;
m68knommu-*)
- basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
os=-linux
;;
- m88k-omron*)
- basic_machine=m88k-omron
- ;;
magnum | m3230)
basic_machine=mips-mips
os=-sysv
@@ -839,10 +831,10 @@ case $basic_machine in
os=-mint
;;
mips3*-*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
;;
mips3*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
;;
monitor)
basic_machine=m68k-rom68k
@@ -861,7 +853,7 @@ case $basic_machine in
os=-msdos
;;
ms1-*)
- basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
;;
msys)
basic_machine=i686-pc
@@ -903,7 +895,7 @@ case $basic_machine in
basic_machine=v70-nec
os=-sysv
;;
- next | m*-next )
+ next | m*-next)
basic_machine=m68k-next
case $os in
-nextstep* )
@@ -948,6 +940,12 @@ case $basic_machine in
nsr-tandem)
basic_machine=nsr-tandem
;;
+ nsv-tandem)
+ basic_machine=nsv-tandem
+ ;;
+ nsx-tandem)
+ basic_machine=nsx-tandem
+ ;;
op50n-* | op60c-*)
basic_machine=hppa1.1-oki
os=-proelf
@@ -980,7 +978,7 @@ case $basic_machine in
os=-linux
;;
parisc-*)
- basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
os=-linux
;;
pbd)
@@ -996,7 +994,7 @@ case $basic_machine in
basic_machine=i386-pc
;;
pc98-*)
- basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
@@ -1011,16 +1009,16 @@ case $basic_machine in
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
- basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pentium4-*)
- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
@@ -1030,23 +1028,23 @@ case $basic_machine in
ppc | ppcbe) basic_machine=powerpc-unknown
;;
ppc-* | ppcbe-*)
- basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
- basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
ppc64) basic_machine=powerpc64-unknown
;;
- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
- basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
ps2)
basic_machine=i386-ibm
@@ -1100,17 +1098,10 @@ case $basic_machine in
sequent)
basic_machine=i386-sequent
;;
- sh)
- basic_machine=sh-hitachi
- os=-hms
- ;;
sh5el)
basic_machine=sh5le-unknown
;;
- sh64)
- basic_machine=sh64-unknown
- ;;
- sparclite-wrs | simso-wrs)
+ simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
;;
@@ -1129,7 +1120,7 @@ case $basic_machine in
os=-sysv4
;;
strongarm-* | thumb-*)
- basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
sun2)
basic_machine=m68000-sun
@@ -1251,6 +1242,9 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
+ x64)
+ basic_machine=x86_64-pc
+ ;;
xbox)
basic_machine=i686-pc
os=-mingw32
@@ -1259,20 +1253,12 @@ case $basic_machine in
basic_machine=xps100-honeywell
;;
xscale-* | xscalee[bl]-*)
- basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
;;
ymp)
basic_machine=ymp-cray
os=-unicos
;;
- z8k-*-coff)
- basic_machine=z8k-unknown
- os=-sim
- ;;
- z80-*-coff)
- basic_machine=z80-unknown
- os=-sim
- ;;
none)
basic_machine=none-none
os=-none
@@ -1301,10 +1287,6 @@ case $basic_machine in
vax)
basic_machine=vax-dec
;;
- pdp10)
- # there are many clones, so DEC is not a safe bet
- basic_machine=pdp10-unknown
- ;;
pdp11)
basic_machine=pdp11-dec
;;
@@ -1314,9 +1296,6 @@ case $basic_machine in
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
- sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
- basic_machine=sparc-sun
- ;;
cydra)
basic_machine=cydra-cydrome
;;
@@ -1336,7 +1315,7 @@ case $basic_machine in
# Make sure to match an already-canonicalized machine name.
;;
*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
exit 1
;;
esac
@@ -1344,10 +1323,10 @@ esac
# Here we canonicalize certain aliases for manufacturers.
case $basic_machine in
*-digital*)
- basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
;;
*-commodore*)
- basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
;;
*)
;;
@@ -1358,8 +1337,8 @@ esac
if [ x"$os" != x"" ]
then
case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
+ # First match some system type aliases that might get confused
+ # with valid system types.
# -solaris* is a basic system type, with this one exception.
-auroraux)
os=-auroraux
@@ -1370,18 +1349,19 @@ case $os in
-solaris)
os=-solaris2
;;
- -svr4*)
- os=-sysv4
- ;;
-unixware*)
os=-sysv4.2uw
;;
-gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
- # First accept the basic system types.
+ # es1800 is here to avoid being matched by es* (a different OS)
+ -es1800*)
+ os=-ose
+ ;;
+ # Now accept the basic system types.
# The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
+ # Each alternative MUST end in a * to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
@@ -1391,25 +1371,26 @@ case $os in
| -aos* | -aros* | -cloudabi* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
| -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* | -hcos* \
| -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -morphos* | -superux* | -rtmk* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
- | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)
+ | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
+ | -midnightbsd*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1426,12 +1407,12 @@ case $os in
-nto*)
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
- -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ -sim | -xray | -os68k* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
- os=`echo $os | sed -e 's|mac|macos|'`
+ os=`echo "$os" | sed -e 's|mac|macos|'`
;;
-linux-dietlibc)
os=-linux-dietlibc
@@ -1440,10 +1421,10 @@ case $os in
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
-sunos5*)
- os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
;;
-sunos6*)
- os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
;;
-opened*)
os=-openedition
@@ -1454,12 +1435,6 @@ case $os in
-wince*)
os=-wince
;;
- -osfrose*)
- os=-osfrose
- ;;
- -osf*)
- os=-osf
- ;;
-utek*)
os=-bsd
;;
@@ -1484,7 +1459,7 @@ case $os in
-nova*)
os=-rtmk-nova
;;
- -ns2 )
+ -ns2)
os=-nextstep2
;;
-nsk*)
@@ -1506,7 +1481,7 @@ case $os in
-oss*)
os=-sysv3
;;
- -svr4)
+ -svr4*)
os=-sysv4
;;
-svr3)
@@ -1521,24 +1496,28 @@ case $os in
-ose*)
os=-ose
;;
- -es1800*)
- os=-ose
- ;;
- -xenix)
- os=-xenix
- ;;
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint
;;
- -aros*)
- os=-aros
- ;;
-zvmoe)
os=-zvmoe
;;
-dicos*)
os=-dicos
;;
+ -pikeos*)
+ # Until real need of OS specific support for
+ # particular features comes up, bare metal
+ # configurations are quite functional.
+ case $basic_machine in
+ arm*)
+ os=-eabi
+ ;;
+ *)
+ os=-elf
+ ;;
+ esac
+ ;;
-nacl*)
;;
-ios)
@@ -1548,7 +1527,7 @@ case $os in
*)
# Get rid of the `-' at the beginning of $os.
os=`echo $os | sed 's/[^-]*-//'`
- echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
exit 1
;;
esac
@@ -1644,9 +1623,6 @@ case $basic_machine in
*-be)
os=-beos
;;
- *-haiku)
- os=-haiku
- ;;
*-ibm)
os=-aix
;;
@@ -1686,7 +1662,7 @@ case $basic_machine in
m88k-omron*)
os=-luna
;;
- *-next )
+ *-next)
os=-nextstep
;;
*-sequent)
@@ -1701,9 +1677,6 @@ case $basic_machine in
i370-*)
os=-mvs
;;
- *-next)
- os=-nextstep3
- ;;
*-gould)
os=-sysv
;;
@@ -1813,15 +1786,15 @@ case $basic_machine in
vendor=stratus
;;
esac
- basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
;;
esac
-echo $basic_machine$os
+echo "$basic_machine$os"
exit
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
diff --git a/build-aux/depcomp b/build-aux/depcomp
index b687232..65cbf70 100755
--- a/build-aux/depcomp
+++ b/build-aux/depcomp
@@ -1,9 +1,9 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2016-01-11.22; # UTC
+scriptversion=2018-03-07.03; # UTC
-# Copyright (C) 1999-2017 Free Software Foundation, Inc.
+# Copyright (C) 1999-2018 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,7 +16,7 @@ scriptversion=2016-01-11.22; # UTC
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -251,6 +251,41 @@ hp)
exit 1
;;
+sgi)
+ if test "$libtool" = yes; then
+ "$@" "-Wp,-MDupdate,$tmpdepfile"
+ else
+ "$@" -MDupdate "$tmpdepfile"
+ fi
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+
+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
+ echo "$object : \\" > "$depfile"
+ # Clip off the initial element (the dependent). Don't try to be
+ # clever and replace this with sed code, as IRIX sed won't handle
+ # lines with more than a fixed number of characters (4096 in
+ # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
+ # the IRIX cc adds comments like '#:fec' to the end of the
+ # dependency line.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
+ | tr "$nl" ' ' >> "$depfile"
+ echo >> "$depfile"
+ # The second pass generates a dummy entry for each header file.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> "$depfile"
+ else
+ make_dummy_depfile
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
xlc)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
@@ -748,7 +783,7 @@ exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
diff --git a/build-aux/do-release-commit-and-tag b/build-aux/do-release-commit-and-tag
index b72b15c..4472ff5 100755
--- a/build-aux/do-release-commit-and-tag
+++ b/build-aux/do-release-commit-and-tag
@@ -3,11 +3,11 @@
# controlled .prev-version file, automate the procedure by which we record
# the date, release-type and version string in the NEWS file. That commit
# will serve to identify the release, so apply a signed tag to it as well.
-VERSION=2016-12-31.14 # UTC
+VERSION=2018-03-07.03 # UTC
# Note: this is a bash script (could be zsh or dash)
-# Copyright (C) 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2009-2018 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ VERSION=2016-12-31.14 # UTC
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Written by Jim Meyering
@@ -67,7 +67,7 @@ version()
cat <<EOF
$ME $VERSION
Copyright (C) $year Free Software Foundation, Inc,
-License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
EOF
@@ -171,7 +171,7 @@ git tag -s -m "$pkg $ver" v$ver HEAD || die 'git tag failed'
# Local variables:
# indent-tabs-mode: nil
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "VERSION="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
diff --git a/build-aux/gendocs.sh b/build-aux/gendocs.sh
index 3b71b36..9d418b9 100755
--- a/build-aux/gendocs.sh
+++ b/build-aux/gendocs.sh
@@ -2,9 +2,9 @@
# gendocs.sh -- generate a GNU manual in many formats. This script is
# mentioned in maintain.texi. See the help message below for usage details.
-scriptversion=2016-12-31.18
+scriptversion=2018-03-06.19
-# Copyright 2003-2017 Free Software Foundation, Inc.
+# Copyright 2003-2018 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,7 +17,7 @@ scriptversion=2016-12-31.18
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# Original author: Mohit Agarwal.
# Send bug reports and any other correspondence to bug-gnulib@gnu.org.
@@ -25,8 +25,8 @@ scriptversion=2016-12-31.18
# The latest version of this script, and the companion template, is
# available from the Gnulib repository:
#
-# http://git.savannah.gnu.org/cgit/gnulib.git/tree/build-aux/gendocs.sh
-# http://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/gendocs_template
+# https://git.savannah.gnu.org/cgit/gnulib.git/tree/build-aux/gendocs.sh
+# https://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/gendocs_template
# TODO:
# - image importing was only implemented for HTML generated by
@@ -37,8 +37,8 @@ scriptversion=2016-12-31.18
prog=`basename "$0"`
srcdir=`pwd`
-scripturl="http://git.savannah.gnu.org/cgit/gnulib.git/plain/build-aux/gendocs.sh"
-templateurl="http://git.savannah.gnu.org/cgit/gnulib.git/plain/doc/gendocs_template"
+scripturl="https://git.savannah.gnu.org/cgit/gnulib.git/plain/build-aux/gendocs.sh"
+templateurl="https://git.savannah.gnu.org/cgit/gnulib.git/plain/doc/gendocs_template"
: ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="}
: ${MAKEINFO="makeinfo"}
@@ -72,7 +72,7 @@ texarg="-t @finalout"
version="gendocs.sh $scriptversion
-Copyright 2017 Free Software Foundation, Inc.
+Copyright 2018 Free Software Foundation, Inc.
There is NO warranty. You may redistribute this software
under the terms of the GNU General Public License.
For more information about these matters, see the files named COPYING."
@@ -82,7 +82,7 @@ usage="Usage: $prog [OPTION]... PACKAGE MANUAL-TITLE
Generate output in various formats from PACKAGE.texinfo (or .texi or
.txi) source. See the GNU Maintainers document for a more extensive
discussion:
- http://www.gnu.org/prep/maintain_toc.html
+ https://www.gnu.org/prep/maintain_toc.html
Options:
--email ADR use ADR as contact in generated web pages; always give this.
@@ -497,7 +497,7 @@ $GENDOCS_TEMPLATE_DIR/gendocs_template >"$outdir/index.html"
echo "Done, see $outdir/ subdirectory for new files."
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
index 079849d..6d073fc 100755
--- a/build-aux/git-version-gen
+++ b/build-aux/git-version-gen
@@ -1,8 +1,8 @@
#!/bin/sh
# Print a version string.
-scriptversion=2017-01-09.19; # UTC
+scriptversion=2018-03-07.03; # UTC
-# Copyright (C) 2007-2017 Free Software Foundation, Inc.
+# Copyright (C) 2007-2018 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
@@ -15,9 +15,9 @@ scriptversion=2017-01-09.19; # UTC
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
-# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/.
+# This script is derived from GIT-VERSION-GEN from GIT: https://git-scm.com/.
# It may be run two ways:
# - from a git repository in which the "git describe" command below
# produces useful output (thus requiring at least one signed tag)
@@ -167,9 +167,10 @@ then
# tag or the previous older version that did not?
# Newer: v6.10-77-g0f8faeb
# Older: v6.10-g0f8faeb
- case $v in
- *-*-*) : git describe is okay three part flavor ;;
- *-*)
+ vprefix=`expr "X$v" : 'X\(.*\)-g[^-]*$'` || vprefix=$v
+ case $vprefix in
+ *-*) : git describe is probably okay three part flavor ;;
+ *)
: git describe is older two part flavor
# Recreate the number of commits and rewrite such that the
# result is the same as if we were using the newer version
@@ -184,9 +185,9 @@ then
;;
esac
- # Change the first '-' to a '.', so version-comparing tools work properly.
- # Remove the "g" in git describe's output string, to save a byte.
- v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`;
+ # Change the penultimate "-" to ".", for version-comparing tools.
+ # Remove the "g" to save a byte.
+ v=`echo "$v" | sed 's/-\([^-]*\)-g\([^-]*\)$/.\1-\2/'`;
v_from_git=1
elif test "x$fallback" = x || git --version >/dev/null 2>&1; then
v=UNKNOWN
@@ -218,7 +219,7 @@ fi
printf %s "$v"
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog
index cf16425..1e73f42 100755
--- a/build-aux/gitlog-to-changelog
+++ b/build-aux/gitlog-to-changelog
@@ -3,13 +3,13 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" "$@"'
if 0;
# Convert git log output to ChangeLog format.
-my $VERSION = '2016-03-22 21:49'; # UTC
+my $VERSION = '2018-03-07 03:47'; # UTC
# The definition above must lie within the first 8 lines in order
# for the Emacs time-stamp write hook (at end) to update it.
# If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually.
-# Copyright (C) 2008-2017 Free Software Foundation, Inc.
+# Copyright (C) 2008-2018 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,7 +22,7 @@ my $VERSION = '2016-03-22 21:49'; # UTC
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Written by Jim Meyering
@@ -33,7 +33,7 @@ use POSIX qw(strftime);
(my $ME = $0) =~ s|.*/||;
-# use File::Coda; # http://meyering.net/code/Coda/
+# use File::Coda; # https://meyering.net/code/Coda/
END {
defined fileno STDOUT or return;
close STDOUT and return;
@@ -491,7 +491,7 @@ sub git_dir_option($)
# Local Variables:
# mode: perl
# indent-tabs-mode: nil
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "my $VERSION = '"
# time-stamp-format: "%:y-%02m-%02d %02H:%02M"
# time-stamp-time-zone: "UTC0"
diff --git a/build-aux/gnu-web-doc-update b/build-aux/gnu-web-doc-update
index a8ed609..356c561 100755
--- a/build-aux/gnu-web-doc-update
+++ b/build-aux/gnu-web-doc-update
@@ -1,10 +1,10 @@
#!/bin/sh
# Run this after each non-alpha release, to update the web documentation at
-# http://www.gnu.org/software/$pkg/manual/
+# https://www.gnu.org/software/$pkg/manual/
-VERSION=2016-01-12.23; # UTC
+VERSION=2018-03-07.03; # UTC
-# Copyright (C) 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2009-2018 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,7 +17,7 @@ VERSION=2016-01-12.23; # UTC
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
ME=$(basename "$0")
warn() { printf '%s: %s\n' "$ME" "$*" >&2; }
@@ -30,7 +30,7 @@ Usage: $ME
Run this script from top_srcdir (no arguments) after each non-alpha
release, to update the web documentation at
-http://www.gnu.org/software/\$pkg/manual/
+https://www.gnu.org/software/\$pkg/manual/
This script assumes you're using git for revision control, and
requires a .prev-version file as well as a Makefile, from which it
@@ -55,7 +55,7 @@ version()
cat <<EOF
$ME $VERSION
Copyright (C) $year Free Software Foundation, Inc,
-License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
EOF
@@ -202,7 +202,7 @@ $RSYNC -avP "$builddir"/doc/manual/ $tmp/$pkg/manual
)
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "VERSION="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
diff --git a/build-aux/gnupload b/build-aux/gnupload
index d4d95ee..c3545b3 100755
--- a/build-aux/gnupload
+++ b/build-aux/gnupload
@@ -1,9 +1,9 @@
#!/bin/sh
# Sign files and upload them.
-scriptversion=2016-01-11.22; # UTC
+scriptversion=2018-03-07.03; # UTC
-# Copyright (C) 2004-2017 Free Software Foundation, Inc.
+# Copyright (C) 2004-2018 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,7 +16,7 @@ scriptversion=2016-01-11.22; # UTC
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Originally written by Alexandre Duret-Lutz <adl@gnu.org>.
# The master copy of this file is maintained in the gnulib Git repository.
@@ -78,7 +78,7 @@ in the current working directory, its contents are prepended to the
actual command line options. Use this to keep your defaults. Comments
(#) and empty lines in $conffile are allowed.
-<http://www.gnu.org/prep/maintain/html_node/Automated-FTP-Uploads.html>
+<https://www.gnu.org/prep/maintain/html_node/Automated-FTP-Uploads.html>
gives some further background.
Examples:
@@ -108,7 +108,7 @@ Examples:
gnupload executes a program ncftpput to do the transfers; if you don't
happen to have an ncftp package installed, the ncftpput-ftp script in
the build-aux/ directory of the gnulib package
-(http://savannah.gnu.org/projects/gnulib) may serve as a replacement.
+(https://savannah.gnu.org/projects/gnulib) may serve as a replacement.
Send patches and bug reports to <bug-gnulib@gnu.org>."
@@ -432,7 +432,7 @@ done
exit 0
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
diff --git a/build-aux/help2man b/build-aux/help2man
index ac3b293..c9f904b 100755
--- a/build-aux/help2man
+++ b/build-aux/help2man
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
# Generate a short man page from --help and --version output.
-# Copyright (C) 1997-2017 Free Software Foundation, Inc.
+# Copyright (C) 1997-2018 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/build-aux/install-sh b/build-aux/install-sh
index 0360b79..8175c64 100755
--- a/build-aux/install-sh
+++ b/build-aux/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2016-01-11.22; # UTC
+scriptversion=2018-03-11.20; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -271,15 +271,18 @@ do
fi
dst=$dst_arg
- # If destination is a directory, append the input filename; won't work
- # if double slashes aren't ignored.
+ # If destination is a directory, append the input filename.
if test -d "$dst"; then
if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
- dst=$dstdir/`basename "$src"`
+ dstbase=`basename "$src"`
+ case $dst in
+ */) dst=$dst$dstbase;;
+ *) dst=$dst/$dstbase;;
+ esac
dstdir_status=0
else
dstdir=`dirname "$dst"`
@@ -288,6 +291,11 @@ do
fi
fi
+ case $dstdir in
+ */) dstdirslash=$dstdir;;
+ *) dstdirslash=$dstdir/;;
+ esac
+
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
@@ -324,34 +332,43 @@ do
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
+ # Note that $RANDOM variable is not portable (e.g. dash); Use it
+ # here however when possible just to lower collision chance.
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ # Because "mkdir -p" follows existing symlinks and we likely work
+ # directly in world-writeable /tmp, make sure that the '$tmpdir'
+ # directory is successfully created first before we actually test
+ # 'mkdir -p' feature.
if (umask $mkdir_umask &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ $mkdirprog $mkdir_mode "$tmpdir" &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
- ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ test_tmpdir="$tmpdir/a"
+ ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
- $mkdirprog -m$different_mode -p -- "$tmpdir" && {
- ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
- rmdir "$tmpdir/d" "$tmpdir"
+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi
trap '' 0;;
esac;;
@@ -427,8 +444,8 @@ do
else
# Make a couple of temp file names in the proper directory.
- dsttmp=$dstdir/_inst.$$_
- rmtmp=$dstdir/_rm.$$_
+ dsttmp=${dstdirslash}_inst.$$_
+ rmtmp=${dstdirslash}_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
@@ -493,7 +510,7 @@ do
done
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
diff --git a/build-aux/mdate-sh b/build-aux/mdate-sh
index f80075c..8c7a590 100755
--- a/build-aux/mdate-sh
+++ b/build-aux/mdate-sh
@@ -1,9 +1,9 @@
#!/bin/sh
# Get modification time of a file or directory and pretty-print it.
-scriptversion=2016-01-11.22; # UTC
+scriptversion=2018-03-07.03; # UTC
-# Copyright (C) 1995-2017 Free Software Foundation, Inc.
+# Copyright (C) 1995-2018 Free Software Foundation, Inc.
# written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
#
# This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@ scriptversion=2016-01-11.22; # UTC
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -74,6 +74,10 @@ export LC_ALL
LC_TIME=C
export LC_TIME
+# Use UTC to get reproducible result.
+TZ=UTC0
+export TZ
+
# GNU ls changes its time format in response to the TIME_STYLE
# variable. Since we cannot assume 'unset' works, revert this
# variable to its documented default.
@@ -216,7 +220,7 @@ echo $day $month $year
# Local Variables:
# mode: shell-script
# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
diff --git a/build-aux/missing b/build-aux/missing
index 594918c..625aeb1 100755
--- a/build-aux/missing
+++ b/build-aux/missing
@@ -1,9 +1,9 @@
#! /bin/sh
# Common wrapper for a few potentially missing GNU programs.
-scriptversion=2016-01-11.22; # UTC
+scriptversion=2018-03-07.03; # UTC
-# Copyright (C) 1996-2015 Free Software Foundation, Inc.
+# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@ scriptversion=2016-01-11.22; # UTC
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -101,9 +101,9 @@ else
exit $st
fi
-perl_URL=http://www.perl.org/
-flex_URL=http://flex.sourceforge.net/
-gnu_software_URL=http://www.gnu.org/software
+perl_URL=https://www.perl.org/
+flex_URL=https://github.com/westes/flex
+gnu_software_URL=https://www.gnu.org/software
program_details ()
{
@@ -207,7 +207,7 @@ give_advice "$1" | sed -e '1s/^/WARNING: /' \
exit $st
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
diff --git a/build-aux/prefix-gnulib-mk b/build-aux/prefix-gnulib-mk
index 62caca8..67b723f 100755
--- a/build-aux/prefix-gnulib-mk
+++ b/build-aux/prefix-gnulib-mk
@@ -230,7 +230,7 @@ sub process ($)
## cperl-extra-newline-before-brace: t
## cperl-merge-trailing-else: nil
## cperl-continued-statement-offset: 2
-## eval: (add-hook 'write-file-hooks 'time-stamp)
+## eval: (add-hook 'before-save-hook 'time-stamp)
## time-stamp-start: "my $VERSION = '"
## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
## time-stamp-time-zone: "UTC0"
diff --git a/build-aux/test-driver b/build-aux/test-driver
index d7eac82..b8521a4 100755
--- a/build-aux/test-driver
+++ b/build-aux/test-driver
@@ -1,9 +1,9 @@
#! /bin/sh
# test-driver - basic testsuite driver script.
-scriptversion=2016-01-11.22; # UTC
+scriptversion=2018-03-07.03; # UTC
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2018 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,7 +16,7 @@ scriptversion=2016-01-11.22; # UTC
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -140,7 +140,7 @@ echo ":copy-in-global-log: $gcopy" >> $trs_file
# Local Variables:
# mode: shell-script
# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
diff --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex
index 338bcf6..aa4f256 100644
--- a/build-aux/texinfo.tex
+++ b/build-aux/texinfo.tex
@@ -3,11 +3,11 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2017-01-14.15}
+\def\texinfoversion{2018-03-10.14}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
+% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018
% Free Software Foundation, Inc.
%
% This texinfo.tex file is free software: you can redistribute it and/or
@@ -21,7 +21,7 @@
% 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/>.
+% along with this program. If not, see <https://www.gnu.org/licenses/>.
%
% As a special exception, when this file is read by TeX when processing
% a Texinfo source document, you may use the result without
@@ -30,9 +30,9 @@
%
% Please try the latest version of texinfo.tex before submitting bug
% reports; you can get the latest version from:
-% http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or
-% http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or
-% http://www.gnu.org/software/texinfo/ (the Texinfo home page)
+% https://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or
+% https://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or
+% https://www.gnu.org/software/texinfo/ (the Texinfo home page)
% The texinfo.tex in any given distribution could well be out
% of date, so if that's what you're using, please check.
%
@@ -56,7 +56,7 @@
% extent. You can get the existing language-specific files from the
% full Texinfo distribution.
%
-% The GNU Texinfo home page is http://www.gnu.org/software/texinfo.
+% The GNU Texinfo home page is https://www.gnu.org/software/texinfo.
\message{Loading texinfo [version \texinfoversion]:}
@@ -2235,6 +2235,20 @@ end
\font\smallersy=cmsy8
\def\smallerecsize{0800}
+% Fonts for math mode superscripts (7pt).
+\def\sevennominalsize{7pt}
+\setfont\sevenrm\rmshape{7}{1000}{OT1}
+\setfont\seventt\ttshape{10}{700}{OT1TT}
+\setfont\sevenbf\bfshape{10}{700}{OT1}
+\setfont\sevenit\itshape{7}{1000}{OT1IT}
+\setfont\sevensl\slshape{10}{700}{OT1}
+\setfont\sevensf\sfshape{10}{700}{OT1}
+\setfont\sevensc\scshape{10}{700}{OT1}
+\setfont\seventtsl\ttslshape{10}{700}{OT1TT}
+\font\seveni=cmmi7
+\font\sevensy=cmsy7
+\def\sevenecsize{0700}
+
% Fonts for title page (20.4pt):
\def\titlenominalsize{20pt}
\setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
@@ -2369,6 +2383,20 @@ end
\font\smallersy=cmsy8
\def\smallerecsize{0800}
+% Fonts for math mode superscripts (7pt).
+\def\sevennominalsize{7pt}
+\setfont\sevenrm\rmshape{7}{1000}{OT1}
+\setfont\seventt\ttshape{10}{700}{OT1TT}
+\setfont\sevenbf\bfshape{10}{700}{OT1}
+\setfont\sevenit\itshape{7}{1000}{OT1IT}
+\setfont\sevensl\slshape{10}{700}{OT1}
+\setfont\sevensf\sfshape{10}{700}{OT1}
+\setfont\sevensc\scshape{10}{700}{OT1}
+\setfont\seventtsl\ttslshape{10}{700}{OT1TT}
+\font\seveni=cmmi7
+\font\sevensy=cmsy7
+\def\sevenecsize{0700}
+
% Fonts for title page (20.4pt):
\def\titlenominalsize{20pt}
\setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
@@ -2503,13 +2531,20 @@ end
% In order for the font changes to affect most math symbols and letters,
-% we have to define the \textfont of the standard families. We don't
-% bother to reset \scriptfont and \scriptscriptfont; awaiting user need.
+% we have to define the \textfont of the standard families.
+% We don't bother to reset \scriptscriptfont; awaiting user need.
%
\def\resetmathfonts{%
\textfont0=\rmfont \textfont1=\ifont \textfont2=\syfont
\textfont\itfam=\itfont \textfont\slfam=\slfont \textfont\bffam=\bffont
\textfont\ttfam=\ttfont \textfont\sffam=\sffont
+ %
+ % Fonts for superscript. Note that the 7pt fonts are used regardless
+ % of the current font size.
+ \scriptfont0=\sevenrm \scriptfont1=\seveni \scriptfont2=\sevensy
+ \scriptfont\itfam=\sevenit \scriptfont\slfam=\sevensl
+ \scriptfont\bffam=\sevenbf \scriptfont\ttfam=\seventt
+ \scriptfont\sffam=\sevensf
}
%
@@ -2519,6 +2554,9 @@ end
% to also set the current \fam for math mode. Our \STYLE (e.g., \rm)
% commands hardwire \STYLEfont to set the current font.
%
+% The fonts used for \ifont are for "math italics" (\itfont is for italics
+% in regular text). \syfont is also used in math mode only.
+%
% Each font-changing command also sets the names \lsize (one size lower)
% and \lllsize (three sizes lower). These relative commands are used
% in, e.g., the LaTeX logo and acronyms.
@@ -2619,26 +2657,11 @@ end
% Markup style infrastructure. \defmarkupstylesetup\INITMACRO will
% define and register \INITMACRO to be called on markup style changes.
% \INITMACRO can check \currentmarkupstyle for the innermost
-% style and the set of \ifmarkupSTYLE switches for all styles
-% currently in effect.
-\newif\ifmarkupvar
-\newif\ifmarkupsamp
-\newif\ifmarkupkey
-%\newif\ifmarkupfile % @file == @samp.
-%\newif\ifmarkupoption % @option == @samp.
-\newif\ifmarkupcode
-\newif\ifmarkupkbd
-%\newif\ifmarkupenv % @env == @code.
-%\newif\ifmarkupcommand % @command == @code.
-\newif\ifmarkuptex % @tex (and part of @math, for now).
-\newif\ifmarkupexample
-\newif\ifmarkupverb
-\newif\ifmarkupverbatim
+% style.
\let\currentmarkupstyle\empty
\def\setupmarkupstyle#1{%
- \csname markup#1true\endcsname
\def\currentmarkupstyle{#1}%
\markupstylesetup
}
@@ -2700,11 +2723,15 @@ end
% lilypond developers report. xpdf does work with the regular 0x27.
%
\def\codequoteright{%
- \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
- \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
- '%
+ \ifmonospace
+ \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
+ \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
+ '%
+ \else \char'15 \fi
\else \char'15 \fi
- \else \char'15 \fi
+ \else
+ '%
+ \fi
}
%
% and a similar option for the left quote char vs. a grave accent.
@@ -2712,13 +2739,17 @@ end
% the code environments to do likewise.
%
\def\codequoteleft{%
- \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
- \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
- % [Knuth] pp. 380,381,391
- % \relax disables Spanish ligatures ?` and !` of \tt font.
- \relax`%
+ \ifmonospace
+ \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
+ \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
+ % [Knuth] pp. 380,381,391
+ % \relax disables Spanish ligatures ?` and !` of \tt font.
+ \relax`%
+ \else \char'22 \fi
\else \char'22 \fi
- \else \char'22 \fi
+ \else
+ \relax`%
+ \fi
}
% Commands to set the quote options.
@@ -5493,17 +5524,15 @@ end
\let\indexlbrace\{ % Likewise, set these sequences for braces
\let\indexrbrace\} % used in the sort key.
\begindoublecolumns
- \let\entrywidowpenalty=\indexwidowpenalty
+ \let\dotheinsertentrybox\dotheinsertentryboxwithpenalty
%
% Read input from the index file line by line.
\loopdo
- \ifeof1
- \let\firsttoken\relax
- \else
+ \ifeof1 \else
\read 1 to \nextline
- \edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}%
- \act
\fi
+ %
+ \indexinputprocessing
\thisline
%
\ifeof1\else
@@ -5515,12 +5544,20 @@ end
\fi
\closein 1
\endgroup}
+\def\loopdo#1\repeat{\def\body{#1}\loopdoxxx}
+\def\loopdoxxx{\let\next=\relax\body\let\next=\loopdoxxx\fi\next}
+\def\indexinputprocessing{%
+ \ifeof1
+ \let\firsttoken\relax
+ \else
+ \edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}%
+ \act
+ \fi
+}
\def\getfirsttoken#1{\expandafter\getfirsttokenx#1\endfirsttoken}
\long\def\getfirsttokenx#1#2\endfirsttoken{\noexpand#1}
-\def\loopdo#1\repeat{\def\body{#1}\loopdoxxx}
-\def\loopdoxxx{\let\next=\relax\body\let\next=\loopdoxxx\fi\next}
% These macros are used by the sorted index file itself.
% Change them to control the appearance of the index.
@@ -5597,7 +5634,7 @@ end
% For pdfTeX and XeTeX.
% The redefinition of \domark stops marks being added in \pdflink to
% preserve coloured links across page boundaries. Otherwise the marks
- % would get in the way of \lastbox in \insertindexentrybox.
+ % would get in the way of \lastbox in \insertentrybox.
\let\domark\relax
%
% Start a new paragraph if necessary, so our assignments below can't
@@ -5658,9 +5695,9 @@ end
\fi
\egroup % end \boxA
\ifdim\wd\boxB = 0pt
- \global\setbox\entryindexbox=\vbox{\unhbox\boxA}%
+ \global\setbox\entrybox=\vbox{\unhbox\boxA}%
\else
- \global\setbox\entryindexbox=\vbox\bgroup
+ \global\setbox\entrybox=\vbox\bgroup
% We want the text of the entries to be aligned to the left, and the
% page numbers to be aligned to the right.
%
@@ -5690,10 +5727,13 @@ end
\advance\dimen@ii by 1\dimen@i
\ifdim\wd\boxA > \dimen@ii % If the entry doesn't fit in one line
\ifdim\dimen@ > 0.8\dimen@ii % due to long index text
- \dimen@ = 0.7\dimen@ % Try to split the text roughly evenly
+ % Try to split the text roughly evenly. \dimen@ will be the length of
+ % the first line.
+ \dimen@ = 0.7\dimen@
\dimen@ii = \hsize
\ifnum\dimen@>\dimen@ii
- % If the entry is too long, use the whole line
+ % If the entry is too long (for example, if it needs more than
+ % two lines), use all the space in the first line.
\dimen@ = \dimen@ii
\fi
\advance\leftskip by 0pt plus 1fill % ragged right
@@ -5703,8 +5743,9 @@ end
% instead of using \parshape with explicit line lengths, but TeX
% doesn't seem to provide a way to do such a thing.
%
- \leftskip = 1em
- \parindent = -1em
+ % Indent all lines but the first one.
+ \advance\leftskip by 1em
+ \advance\parindent by -1em
\fi\fi
\indent % start paragraph
\unhbox\boxA
@@ -5722,19 +5763,20 @@ end
\egroup % The \vbox
\fi
\endgroup
- % delay text of entry until after penalty
- \bgroup\aftergroup\insertindexentrybox
- \entrywidowpenalty
+ \dotheinsertentrybox
}}
\newskip\thinshrinkable
\skip\thinshrinkable=.15em minus .15em
-\newbox\entryindexbox
-\def\insertindexentrybox{%
- \ourunvbox\entryindexbox
+\newbox\entrybox
+\def\insertentrybox{%
+ \ourunvbox\entrybox
}
+% default definition
+\let\dotheinsertentrybox\insertentrybox
+
% Use \lastbox to take apart vbox box by box, and add each sub-box
% to the current vertical list.
\def\ourunvbox#1{%
@@ -5757,21 +5799,18 @@ end
\newbox\delayedbox
\newbox\interbox
-% Default is no penalty
-\let\entrywidowpenalty\egroup
-
% Used from \printindex. \firsttoken should be the first token
% after the \entry. If it's not another \entry, we are at the last
% line of a group of index entries, so insert a penalty to discourage
% widowed index entries.
-\long\def\indexwidowpenalty{%
- \def\isentry{\entry}%
+\def\dotheinsertentryboxwithpenalty{%
\ifx\firsttoken\isentry
\else
\penalty 9000
\fi
- \egroup % now comes the box added with \aftergroup
+ \insertentrybox
}
+\def\isentry{\entry}%
% Like plain.tex's \dotfill, except uses up at least 1 em.
% The filll stretch here overpowers both the fil and fill stretch to push
@@ -5888,8 +5927,8 @@ end
\divide\doublecolumnhsize by 2
\hsize = \doublecolumnhsize
%
- % Double the \vsize as well. (We don't need a separate register here,
- % since nobody clobbers \vsize.)
+ % Double the \vsize as well.
+ \advance\vsize by -\ht\partialpage
\vsize = 2\vsize
%
% For the benefit of balancing columns
@@ -5907,12 +5946,12 @@ end
% previous page.
\dimen@ = \vsize
\divide\dimen@ by 2
- \advance\dimen@ by -\ht\partialpage
%
% box0 will be the left-hand column, box2 the right.
- \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
+ \setbox0=\vsplit\PAGE to\dimen@ \setbox2=\vsplit\PAGE to\dimen@
+ \global\advance\vsize by 2\ht\partialpage
\onepageout\pagesofar
- \unvbox255
+ \unvbox\PAGE
\penalty\outputpenalty
}
%
@@ -5961,24 +6000,30 @@ end
% Split the last of the double-column material.
\savemarks
\balancecolumns
- %
+ }%
+ \eject % call the \output just set
+ \ifdim\pagetotal=0pt
% Having called \balancecolumns once, we do not
% want to call it again. Therefore, reset \output to its normal
% definition right away.
\global\output = {\onepageout{\pagecontents\PAGE}}%
- }%
- \eject
- \endgroup % started in \begindoublecolumns
- \restoremarks
- % Leave the double-column material on the current page, no automatic
- % page break.
- \box\balancedcolumns
- %
- % \pagegoal was set to the doubled \vsize above, since we restarted
- % the current page. We're now back to normal single-column
- % typesetting, so reset \pagegoal to the normal \vsize (after the
- % \endgroup where \vsize got restored).
- \pagegoal = \vsize
+ %
+ \endgroup % started in \begindoublecolumns
+ \restoremarks
+ % Leave the double-column material on the current page, no automatic
+ % page break.
+ \box\balancedcolumns
+ %
+ % \pagegoal was set to the doubled \vsize above, since we restarted
+ % the current page. We're now back to normal single-column
+ % typesetting, so reset \pagegoal to the normal \vsize.
+ \global\vsize = \txipageheight %
+ \pagegoal = \txipageheight %
+ \else
+ % We had some left-over material. This might happen when \doublecolumnout
+ % is called in \balancecolumns. Try again.
+ \expandafter\enddoublecolumns
+ \fi
}
\newbox\balancedcolumns
\setbox\balancedcolumns=\vbox{shouldnt see this}%
@@ -5986,13 +6031,14 @@ end
% Only called for the last of the double column material. \doublecolumnout
% does the others.
\def\balancecolumns{%
- \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120.
+ \setbox0 = \vbox{\unvbox\PAGE}% like \box255 but more efficient, see p.120.
\dimen@ = \ht0
\advance\dimen@ by \topskip
\advance\dimen@ by-\baselineskip
\ifdim\dimen@<5\baselineskip
% Don't split a short final column in two.
\setbox2=\vbox{}%
+ \global\setbox\balancedcolumns=\vbox{\pagesofar}%
\else
\divide\dimen@ by 2 % target to split to
\dimen@ii = \dimen@
@@ -6008,15 +6054,15 @@ end
\repeat
}%
% Now the left column is in box 1, and the right column in box 3.
+ %
% Check whether the left column has come out higher than the page itself.
% (Note that we have doubled \vsize for the double columns, so
% the actual height of the page is 0.5\vsize).
\ifdim2\ht1>\vsize
- % Just split the last of the double column material roughly in half.
- \setbox2=\box0
- \setbox0 = \vsplit2 to \dimen@ii
- \setbox0=\vbox to \dimen@ii {\unvbox0\vfill}%
- \setbox2=\vbox to \dimen@ii {\unvbox2\vfill}%
+ % It appears that we have been called upon to balance too much material.
+ % Output some of it with \doublecolumnout, leaving the rest on the page.
+ \setbox\PAGE=\box0
+ \doublecolumnout
\else
% Compare the heights of the two columns.
\ifdim4\ht1>5\ht3
@@ -6029,10 +6075,10 @@ end
\setbox2=\vbox to\ht1{\unvbox3\unskip}%
\setbox0=\vbox to\ht1{\unvbox1\unskip}%
\fi
+ \global\setbox\balancedcolumns=\vbox{\pagesofar}%
\fi
\fi
%
- \global\setbox\balancedcolumns=\vbox{\pagesofar}%
}
\catcode`\@ = \other
@@ -6939,7 +6985,15 @@ end
% exist, with an empty box. Let's hope all the numbers have the same width.
% Also ignore the page number, which is conventionally not printed.
\def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}}
-\def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}}
+\def\partentry#1#2#3#4{%
+ % Add stretch and a bonus for breaking the page before the part heading.
+ % This reduces the chance of the page being broken immediately after the
+ % part heading, before a following chapter heading.
+ \vskip 0pt plus 5\baselineskip
+ \penalty-300
+ \vskip 0pt plus -5\baselineskip
+ \dochapentry{\numeralbox\labelspace#1}{}%
+}
%
% Parts, in the short toc.
\def\shortpartentry#1#2#3#4{%
@@ -9118,7 +9172,13 @@ end
\xdef\safexrefname{#1}%
}%
%
- \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref
+ \bgroup
+ \expandafter\gdef\csname XR\safexrefname\endcsname{#2}%
+ \egroup
+ % We put the \gdef inside a group to avoid the definitions building up on
+ % TeX's save stack, which can cause it to run out of space for aux files with
+ % thousands of lines. \gdef doesn't use the save stack, but \csname does
+ % when it defines an unknown control sequence as \relax.
%
% Was that xref control sequence that we just defined for a float?
\expandafter\iffloat\csname XR\safexrefname\endcsname
@@ -9424,7 +9484,7 @@ end
\newif\ifwarnednoepsf
\newhelp\noepsfhelp{epsf.tex must be installed for images to
work. It is also included in the Texinfo distribution, or you can get
- it from ftp://tug.org/tex/epsf.tex.}
+ it from https://ctan.org/texarchive/macros/texinfo/texinfo/doc/epsf.tex.}
%
\def\image#1{%
\ifx\epsfbox\thisisundefined
@@ -10999,7 +11059,6 @@ directory should work if nowhere else does.}
\DeclareUnicodeCharacter{2113}{\ensuremath\ell}%
\DeclareUnicodeCharacter{2118}{\ensuremath\wp}%
\DeclareUnicodeCharacter{211C}{\ensuremath\Re}%
- \DeclareUnicodeCharacter{2127}{\ensuremath\mho}%
\DeclareUnicodeCharacter{2135}{\ensuremath\aleph}%
\DeclareUnicodeCharacter{2190}{\ensuremath\leftarrow}%
\DeclareUnicodeCharacter{2191}{\ensuremath\uparrow}%
@@ -11015,7 +11074,6 @@ directory should work if nowhere else does.}
\DeclareUnicodeCharacter{21AA}{\ensuremath\hookrightarrow}%
\DeclareUnicodeCharacter{21BC}{\ensuremath\leftharpoonup}%
\DeclareUnicodeCharacter{21BD}{\ensuremath\leftharpoondown}%
- \DeclareUnicodeCharacter{21BE}{\ensuremath\upharpoonright}%
\DeclareUnicodeCharacter{21C0}{\ensuremath\rightharpoonup}%
\DeclareUnicodeCharacter{21C1}{\ensuremath\rightharpoondown}%
\DeclareUnicodeCharacter{21CC}{\ensuremath\rightleftharpoons}%
@@ -11024,8 +11082,6 @@ directory should work if nowhere else does.}
\DeclareUnicodeCharacter{21D3}{\ensuremath\Downarrow}%
\DeclareUnicodeCharacter{21D4}{\ensuremath\Leftrightarrow}%
\DeclareUnicodeCharacter{21D5}{\ensuremath\Updownarrow}%
- \DeclareUnicodeCharacter{21DD}{\ensuremath\leadsto}%
- \DeclareUnicodeCharacter{2201}{\ensuremath\complement}%
\DeclareUnicodeCharacter{2202}{\ensuremath\partial}%
\DeclareUnicodeCharacter{2205}{\ensuremath\emptyset}%
\DeclareUnicodeCharacter{2207}{\ensuremath\nabla}%
@@ -11059,8 +11115,6 @@ directory should work if nowhere else does.}
\DeclareUnicodeCharacter{2283}{\ensuremath\supset}%
\DeclareUnicodeCharacter{2286}{\ensuremath\subseteq}%
\DeclareUnicodeCharacter{228E}{\ensuremath\uplus}%
- \DeclareUnicodeCharacter{228F}{\ensuremath\sqsubset}%
- \DeclareUnicodeCharacter{2290}{\ensuremath\sqsupset}%
\DeclareUnicodeCharacter{2291}{\ensuremath\sqsubseteq}%
\DeclareUnicodeCharacter{2292}{\ensuremath\sqsupseteq}%
\DeclareUnicodeCharacter{2293}{\ensuremath\sqcap}%
@@ -11075,8 +11129,6 @@ directory should work if nowhere else does.}
\DeclareUnicodeCharacter{22A4}{\ensuremath\ptextop}%
\DeclareUnicodeCharacter{22A5}{\ensuremath\bot}%
\DeclareUnicodeCharacter{22A8}{\ensuremath\models}%
- \DeclareUnicodeCharacter{22B4}{\ensuremath\unlhd}%
- \DeclareUnicodeCharacter{22B5}{\ensuremath\unrhd}%
\DeclareUnicodeCharacter{22C0}{\ensuremath\bigwedge}%
\DeclareUnicodeCharacter{22C1}{\ensuremath\bigvee}%
\DeclareUnicodeCharacter{22C2}{\ensuremath\bigcap}%
@@ -11092,12 +11144,11 @@ directory should work if nowhere else does.}
\DeclareUnicodeCharacter{2322}{\ensuremath\frown}%
\DeclareUnicodeCharacter{2323}{\ensuremath\smile}%
%
- \DeclareUnicodeCharacter{25A1}{\ensuremath\Box}%
\DeclareUnicodeCharacter{25B3}{\ensuremath\triangle}%
\DeclareUnicodeCharacter{25B7}{\ensuremath\triangleright}%
\DeclareUnicodeCharacter{25BD}{\ensuremath\bigtriangledown}%
\DeclareUnicodeCharacter{25C1}{\ensuremath\triangleleft}%
- \DeclareUnicodeCharacter{25C7}{\ensuremath\Diamond}%
+ \DeclareUnicodeCharacter{25C7}{\ensuremath\diamond}%
\DeclareUnicodeCharacter{2660}{\ensuremath\spadesuit}%
\DeclareUnicodeCharacter{2661}{\ensuremath\heartsuit}%
\DeclareUnicodeCharacter{2662}{\ensuremath\diamondsuit}%
@@ -11119,7 +11170,6 @@ directory should work if nowhere else does.}
\DeclareUnicodeCharacter{2A02}{\ensuremath\bigotimes}%
\DeclareUnicodeCharacter{2A04}{\ensuremath\biguplus}%
\DeclareUnicodeCharacter{2A06}{\ensuremath\bigsqcup}%
- \DeclareUnicodeCharacter{2A1D}{\ensuremath\Join}%
\DeclareUnicodeCharacter{2A3F}{\ensuremath\amalg}%
\DeclareUnicodeCharacter{2AAF}{\ensuremath\preceq}%
\DeclareUnicodeCharacter{2AB0}{\ensuremath\succeq}%
@@ -11274,6 +11324,7 @@ directory should work if nowhere else does.}
\pdfvorigin = 1 true in
\else
\ifx\XeTeXrevision\thisisundefined
+ \special{papersize=#8,#7}%
\else
\pdfpageheight #7\relax
\pdfpagewidth #8\relax
@@ -11311,7 +11362,6 @@ directory should work if nowhere else does.}
%
\lispnarrowing = 0.3in
\tolerance = 700
- \hfuzz = 1pt
\contentsrightmargin = 0pt
\defbodyindent = .5cm
}}
@@ -11329,7 +11379,6 @@ directory should work if nowhere else does.}
%
\lispnarrowing = 0.25in
\tolerance = 700
- \hfuzz = 1pt
\contentsrightmargin = 0pt
\defbodyindent = .4cm
}}
@@ -11355,7 +11404,6 @@ directory should work if nowhere else does.}
{297mm}{210mm}%
%
\tolerance = 700
- \hfuzz = 1pt
\contentsrightmargin = 0pt
\defbodyindent = 5mm
}}
@@ -11374,7 +11422,6 @@ directory should work if nowhere else does.}
%
\lispnarrowing = 0.2in
\tolerance = 800
- \hfuzz = 1.2pt
\contentsrightmargin = 0pt
\defbodyindent = 2mm
\tableindent = 12mm
@@ -11416,9 +11463,11 @@ directory should work if nowhere else does.}
%
\dimen0 = #1\relax
\advance\dimen0 by \voffset
+ \advance\dimen0 by 1in % reference point for DVI is 1 inch from top of page
%
\dimen2 = \hsize
\advance\dimen2 by \normaloffset
+ \advance\dimen2 by 1in % reference point is 1 inch from left edge of page
%
\internalpagesizes{#1}{\hsize}%
{\voffset}{\normaloffset}%
@@ -11430,6 +11479,9 @@ directory should work if nowhere else does.}
%
\letterpaper
+% Default value of \hfuzz, for suppressing warnings about overfull hboxes.
+\hfuzz = 1pt
+
\message{and turning on texinfo input format.}
@@ -11595,6 +11647,9 @@ directory should work if nowhere else does.}
@def ^^M{@let^^M@secondlinenl}%
% Definition for a newline in the main Texinfo file.
@gdef @secondlinenl{@fixbackslash}%
+ % In case the first line has a whole-line command on it
+ @let@originalparsearg@parsearg
+ @def@parsearg{@fixbackslash@originalparsearg}
}}
{@catcode`@^=7 @catcode`@^^M=13%
@@ -11615,6 +11670,7 @@ directory should work if nowhere else does.}
@catcode13=5 % regular end of line
@enableemergencynewline
@let@c=@texinfoc
+ @let@parsearg@originalparsearg
% Also turn back on active characters that might appear in the input
% file name, in case not using a pre-dumped format.
@catcode`+=@active
@@ -11659,7 +11715,7 @@ directory should work if nowhere else does.}
@markupsetuprqdefault
@c Local variables:
-@c eval: (add-hook 'write-file-hooks 'time-stamp)
+@c eval: (add-hook 'before-save-hook 'time-stamp)
@c page-delimiter: "^\\\\message\\|emacs-page"
@c time-stamp-start: "def\\\\texinfoversion{"
@c time-stamp-format: "%:y-%02m-%02d.%02H"
diff --git a/build-aux/update-copyright b/build-aux/update-copyright
index 2d20d21..f2fc97e 100755
--- a/build-aux/update-copyright
+++ b/build-aux/update-copyright
@@ -3,9 +3,9 @@ eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" "$@"'
if 0;
# Update an FSF copyright year list to include the current year.
-my $VERSION = '2016-01-12.23:13'; # UTC
+my $VERSION = '2018-03-07.03:47'; # UTC
-# Copyright (C) 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2009-2018 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 @@ my $VERSION = '2016-01-12.23:13'; # UTC
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Written by Jim Meyering and Joel E. Denny
@@ -81,6 +81,7 @@ my $VERSION = '2016-01-12.23:13'; # UTC
# B. (c)
# C. @copyright{}
# D. &copy;
+# E. ©
#
# 4. The "Copyright" appears at the beginning of a line, except that it
# may be prefixed by any sequence (e.g., a comment) of no more than
@@ -124,7 +125,7 @@ use strict;
use warnings;
my $copyright_re = 'Copyright';
-my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|&copy;)';
+my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|&copy;|©)';
my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER};
$holder ||= 'Free Software Foundation, Inc.';
my $prefix_max = 5;
@@ -263,10 +264,12 @@ else
print STDERR "$ARGV: warning: copyright statement not found\n";
}
+# Hey Emacs!
# Local variables:
+# coding: utf-8
# mode: perl
# indent-tabs-mode: nil
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "my $VERSION = '"
# time-stamp-format: "%:y-%02m-%02d.%02H:%02M"
# time-stamp-time-zone: "UTC0"
diff --git a/build-aux/useless-if-before-free b/build-aux/useless-if-before-free
index 4e3f3a2..2d4d13f 100755
--- a/build-aux/useless-if-before-free
+++ b/build-aux/useless-if-before-free
@@ -4,13 +4,13 @@ eval '(exit $?0)' && eval 'exec perl -wST "$0" "$@"'
# Detect instances of "if (p) free (p);".
# Likewise "if (p != 0)", "if (0 != p)", or with NULL; and with braces.
-my $VERSION = '2016-08-01 17:47'; # UTC
+my $VERSION = '2018-03-07 03:47'; # UTC
# The definition above must lie within the first 8 lines in order
# for the Emacs time-stamp write hook (at end) to update it.
# If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually.
-# Copyright (C) 2008-2017 Free Software Foundation, Inc.
+# Copyright (C) 2008-2018 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,7 @@ my $VERSION = '2016-08-01 17:47'; # UTC
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Written by Jim Meyering
@@ -33,7 +33,7 @@ use Getopt::Long;
(my $ME = $0) =~ s|.*/||;
-# use File::Coda; # http://meyering.net/code/Coda/
+# use File::Coda; # https://meyering.net/code/Coda/
END {
defined fileno STDOUT or return;
close STDOUT and return;
@@ -202,7 +202,7 @@ EOF
## Local Variables:
## mode: perl
## indent-tabs-mode: nil
-## eval: (add-hook 'write-file-hooks 'time-stamp)
+## eval: (add-hook 'before-save-hook 'time-stamp)
## time-stamp-start: "my $VERSION = '"
## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
## time-stamp-time-zone: "UTC0"
diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files
index 2d17eaf..12f191b 100755
--- a/build-aux/vc-list-files
+++ b/build-aux/vc-list-files
@@ -2,9 +2,9 @@
# List version-controlled file names.
# Print a version string.
-scriptversion=2016-01-11.22; # UTC
+scriptversion=2018-03-07.03; # UTC
-# Copyright (C) 2006-2017 Free Software Foundation, Inc.
+# Copyright (C) 2006-2018 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,7 +17,7 @@ scriptversion=2016-01-11.22; # UTC
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# List the specified version-controlled files.
@@ -49,7 +49,7 @@ EOF
cat <<EOF
vc-list-files $scriptversion
Copyright (C) $year Free Software Foundation, Inc,
-License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
EOF
@@ -65,7 +65,7 @@ test $# = 0 && set .
for dir
do
- if test -d .git; then
+ if test -d .git || test -f .git; then
test "x$dir" = x. \
&& dir= sed_esc= \
|| { dir="$dir/"; sed_esc=`echo "$dir"|env sed 's,\([\\/]\),\\\\\1,g'`; }
@@ -105,7 +105,7 @@ do
done
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
diff --git a/config_h.in b/config_h.in
index 1a4e470..8d5cb32 100644
--- a/config_h.in
+++ b/config_h.in
@@ -1,5 +1,116 @@
/* config_h.in. Generated from configure.ac by autoheader. */
+/* CPU and C ABI indicator */
+#ifndef __i386__
+#undef __i386__
+#endif
+#ifndef __x86_64_x32__
+#undef __x86_64_x32__
+#endif
+#ifndef __x86_64__
+#undef __x86_64__
+#endif
+#ifndef __alpha__
+#undef __alpha__
+#endif
+#ifndef __arm__
+#undef __arm__
+#endif
+#ifndef __armhf__
+#undef __armhf__
+#endif
+#ifndef __arm64_ilp32__
+#undef __arm64_ilp32__
+#endif
+#ifndef __arm64__
+#undef __arm64__
+#endif
+#ifndef __hppa__
+#undef __hppa__
+#endif
+#ifndef __hppa64__
+#undef __hppa64__
+#endif
+#ifndef __ia64_ilp32__
+#undef __ia64_ilp32__
+#endif
+#ifndef __ia64__
+#undef __ia64__
+#endif
+#ifndef __m68k__
+#undef __m68k__
+#endif
+#ifndef __mips__
+#undef __mips__
+#endif
+#ifndef __mipsn32__
+#undef __mipsn32__
+#endif
+#ifndef __mips64__
+#undef __mips64__
+#endif
+#ifndef __powerpc__
+#undef __powerpc__
+#endif
+#ifndef __powerpc64__
+#undef __powerpc64__
+#endif
+#ifndef __powerpc64_elfv2__
+#undef __powerpc64_elfv2__
+#endif
+#ifndef __riscv32__
+#undef __riscv32__
+#endif
+#ifndef __riscv64__
+#undef __riscv64__
+#endif
+#ifndef __riscv32_ilp32__
+#undef __riscv32_ilp32__
+#endif
+#ifndef __riscv32_ilp32f__
+#undef __riscv32_ilp32f__
+#endif
+#ifndef __riscv32_ilp32d__
+#undef __riscv32_ilp32d__
+#endif
+#ifndef __riscv64_ilp32__
+#undef __riscv64_ilp32__
+#endif
+#ifndef __riscv64_ilp32f__
+#undef __riscv64_ilp32f__
+#endif
+#ifndef __riscv64_ilp32d__
+#undef __riscv64_ilp32d__
+#endif
+#ifndef __riscv64_lp64__
+#undef __riscv64_lp64__
+#endif
+#ifndef __riscv64_lp64f__
+#undef __riscv64_lp64f__
+#endif
+#ifndef __riscv64_lp64d__
+#undef __riscv64_lp64d__
+#endif
+#ifndef __s390__
+#undef __s390__
+#endif
+#ifndef __s390x__
+#undef __s390x__
+#endif
+#ifndef __sh__
+#undef __sh__
+#endif
+#ifndef __sparc__
+#undef __sparc__
+#endif
+#ifndef __sparc64__
+#undef __sparc64__
+#endif
+
+
+/* Define if building universal (internal helper macro) */
+#undef AC_APPLE_UNIVERSAL_BUILD
+
/* Define to the number of bits in type 'ptrdiff_t'. */
#undef BITSIZEOF_PTRDIFF_T
@@ -46,6 +157,9 @@
language is requested. */
#undef ENABLE_NLS
+/* Define this to 1 if F_DUPFD behavior does not match POSIX */
+#undef FCNTL_DUPFD_BUGGY
+
/* Define to nothing if C supports flexible array members, and to 1 if it does
not. That way, with a declaration like 'struct s { int n; double
d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99
@@ -114,6 +228,10 @@
whether the gnulib module mkostemp shall be considered present. */
#undef GNULIB_MKOSTEMP
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+ whether the gnulib module msvc-nothrow shall be considered present. */
+#undef GNULIB_MSVC_NOTHROW
+
/* enable some gnulib portability checks */
#undef GNULIB_PORTCHECK
@@ -129,6 +247,16 @@
whether the gnulib module strerror shall be considered present. */
#undef GNULIB_STRERROR
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+ whether the gnulib module strerror_r-posix shall be considered present. */
+#undef GNULIB_STRERROR_R_POSIX
+
+/* Define to 1 when the gnulib module accept should be tested. */
+#undef GNULIB_TEST_ACCEPT
+
+/* Define to 1 when the gnulib module bind should be tested. */
+#undef GNULIB_TEST_BIND
+
/* Define to 1 when the gnulib module btowc should be tested. */
#undef GNULIB_TEST_BTOWC
@@ -139,12 +267,18 @@
/* Define to 1 when the gnulib module chdir should be tested. */
#undef GNULIB_TEST_CHDIR
+/* Define to 1 when the gnulib module cloexec should be tested. */
+#undef GNULIB_TEST_CLOEXEC
+
/* Define to 1 when the gnulib module close should be tested. */
#undef GNULIB_TEST_CLOSE
/* Define to 1 when the gnulib module closedir should be tested. */
#undef GNULIB_TEST_CLOSEDIR
+/* Define to 1 when the gnulib module connect should be tested. */
+#undef GNULIB_TEST_CONNECT
+
/* Define to 1 when the gnulib module dirfd should be tested. */
#undef GNULIB_TEST_DIRFD
@@ -154,6 +288,9 @@
/* Define to 1 when the gnulib module environ should be tested. */
#undef GNULIB_TEST_ENVIRON
+/* Define to 1 when the gnulib module fcntl should be tested. */
+#undef GNULIB_TEST_FCNTL
+
/* Define to 1 when the gnulib module fdopen should be tested. */
#undef GNULIB_TEST_FDOPEN
@@ -178,6 +315,9 @@
/* Define to 1 when the gnulib module ftello should be tested. */
#undef GNULIB_TEST_FTELLO
+/* Define to 1 when the gnulib module ftruncate should be tested. */
+#undef GNULIB_TEST_FTRUNCATE
+
/* Define to 1 when the gnulib module getcwd should be tested. */
#undef GNULIB_TEST_GETCWD
@@ -193,9 +333,15 @@
/* Define to 1 when the gnulib module gettimeofday should be tested. */
#undef GNULIB_TEST_GETTIMEOFDAY
+/* Define to 1 when the gnulib module ioctl should be tested. */
+#undef GNULIB_TEST_IOCTL
+
/* Define to 1 when the gnulib module link should be tested. */
#undef GNULIB_TEST_LINK
+/* Define to 1 when the gnulib module listen should be tested. */
+#undef GNULIB_TEST_LISTEN
+
/* Define to 1 when the gnulib module localeconv should be tested. */
#undef GNULIB_TEST_LOCALECONV
@@ -229,6 +375,9 @@
/* Define to 1 when the gnulib module mkostemp should be tested. */
#undef GNULIB_TEST_MKOSTEMP
+/* Define to 1 when the gnulib module nanosleep should be tested. */
+#undef GNULIB_TEST_NANOSLEEP
+
/* Define to 1 when the gnulib module nl_langinfo should be tested. */
#undef GNULIB_TEST_NL_LANGINFO
@@ -238,9 +387,18 @@
/* Define to 1 when the gnulib module opendir should be tested. */
#undef GNULIB_TEST_OPENDIR
+/* Define to 1 when the gnulib module perror should be tested. */
+#undef GNULIB_TEST_PERROR
+
+/* Define to 1 when the gnulib module pipe should be tested. */
+#undef GNULIB_TEST_PIPE
+
/* Define to 1 when the gnulib module putenv should be tested. */
#undef GNULIB_TEST_PUTENV
+/* Define to 1 when the gnulib module raise should be tested. */
+#undef GNULIB_TEST_RAISE
+
/* Define to 1 when the gnulib module readdir should be tested. */
#undef GNULIB_TEST_READDIR
@@ -259,8 +417,8 @@
/* Define to 1 when the gnulib module rmdir should be tested. */
#undef GNULIB_TEST_RMDIR
-/* Define to 1 when the gnulib module secure_getenv should be tested. */
-#undef GNULIB_TEST_SECURE_GETENV
+/* Define to 1 when the gnulib module select should be tested. */
+#undef GNULIB_TEST_SELECT
/* Define to 1 when the gnulib module setenv should be tested. */
#undef GNULIB_TEST_SETENV
@@ -268,6 +426,21 @@
/* Define to 1 when the gnulib module setlocale should be tested. */
#undef GNULIB_TEST_SETLOCALE
+/* Define to 1 when the gnulib module setsockopt should be tested. */
+#undef GNULIB_TEST_SETSOCKOPT
+
+/* Define to 1 when the gnulib module sigaction should be tested. */
+#undef GNULIB_TEST_SIGACTION
+
+/* Define to 1 when the gnulib module sigprocmask should be tested. */
+#undef GNULIB_TEST_SIGPROCMASK
+
+/* Define to 1 when the gnulib module sleep should be tested. */
+#undef GNULIB_TEST_SLEEP
+
+/* Define to 1 when the gnulib module socket should be tested. */
+#undef GNULIB_TEST_SOCKET
+
/* Define to 1 when the gnulib module stat should be tested. */
#undef GNULIB_TEST_STAT
@@ -277,6 +450,9 @@
/* Define to 1 when the gnulib module strerror should be tested. */
#undef GNULIB_TEST_STRERROR
+/* Define to 1 when the gnulib module strerror_r should be tested. */
+#undef GNULIB_TEST_STRERROR_R
+
/* Define to 1 when the gnulib module strverscmp should be tested. */
#undef GNULIB_TEST_STRVERSCMP
@@ -371,15 +547,24 @@
/* Define to 1 if <alloca.h> works. */
#undef HAVE_ALLOCA_H
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#undef HAVE_ARPA_INET_H
+
/* Define to 1 if you have the <bp-sym.h> header file. */
#undef HAVE_BP_SYM_H
/* Define to 1 if you have the `btowc' function. */
#undef HAVE_BTOWC
+/* Define to 1 if nanosleep mishandles large arguments. */
+#undef HAVE_BUG_BIG_NANOSLEEP
+
/* Define to 1 if you have the `canonicalize_file_name' function. */
#undef HAVE_CANONICALIZE_FILE_NAME
+/* Define to 1 if you have the `catgets' function. */
+#undef HAVE_CATGETS
+
/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the
CoreFoundation framework. */
#undef HAVE_CFLOCALECOPYCURRENT
@@ -388,9 +573,15 @@
the CoreFoundation framework. */
#undef HAVE_CFPREFERENCESCOPYAPPVALUE
+/* Define to 1 if you have the `chsize' function. */
+#undef HAVE_CHSIZE
+
/* Define to 1 if you have the `closedir' function. */
#undef HAVE_CLOSEDIR
+/* Define to 1 if you have the <crtdefs.h> header file. */
+#undef HAVE_CRTDEFS_H
+
/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
#undef HAVE_DCGETTEXT
@@ -467,9 +658,9 @@
don't. */
#undef HAVE_DECL_GETDTABLESIZE
-/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
- */
-#undef HAVE_DECL_GETENV
+/* Define to 1 if you have the declaration of `inet_pton', and to 0 if you
+ don't. */
+#undef HAVE_DECL_INET_PTON
/* Define to 1 if you have the declaration of `isblank', and to 0 if you
don't. */
@@ -511,6 +702,10 @@
*/
#undef HAVE_DECL_SETENV
+/* Define to 1 if you have the declaration of `sleep', and to 0 if you don't.
+ */
+#undef HAVE_DECL_SLEEP
+
/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't.
*/
#undef HAVE_DECL_STRDUP
@@ -571,6 +766,9 @@
/* Define to 1 if you have the `fchown' function. */
#undef HAVE_FCHOWN
+/* Define to 1 if you have the `fcntl' function. */
+#undef HAVE_FCNTL
+
/* Define to 1 if you have the <features.h> header file. */
#undef HAVE_FEATURES_H
@@ -586,6 +784,9 @@
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
#undef HAVE_FSEEKO
+/* Define to 1 if you have the `ftruncate' function. */
+#undef HAVE_FTRUNCATE
+
/* Define to 1 if you have the `funlockfile' function. */
#undef HAVE_FUNLOCKFILE
@@ -601,18 +802,9 @@
/* Define to 1 if you have the `getdtablesize' function. */
#undef HAVE_GETDTABLESIZE
-/* Define to 1 if you have the `getegid' function. */
-#undef HAVE_GETEGID
-
-/* Define to 1 if you have the `geteuid' function. */
-#undef HAVE_GETEUID
-
/* Define to 1 if you have the `getexecname' function. */
#undef HAVE_GETEXECNAME
-/* Define to 1 if you have the `getgid' function. */
-#undef HAVE_GETGID
-
/* Define to 1 if you have the `getlocalename_l' function. */
#undef HAVE_GETLOCALENAME_L
@@ -634,15 +826,24 @@
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
-/* Define to 1 if you have the `getuid' function. */
-#undef HAVE_GETUID
-
/* Define if you have the iconv() function and it works. */
#undef HAVE_ICONV
+/* Define to 1 if you have the `inet_pton' function. */
+#undef HAVE_INET_PTON
+
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `ioctl' function. */
+#undef HAVE_IOCTL
+
+/* Define to 1 if <sys/socket.h> defines AF_INET. */
+#undef HAVE_IPV4
+
+/* Define to 1 if <sys/socket.h> defines AF_INET6. */
+#undef HAVE_IPV6
+
/* Define to 1 if you have the `isascii' function. */
#undef HAVE_ISASCII
@@ -652,9 +853,6 @@
/* Define to 1 if you have the `isblank' function. */
#undef HAVE_ISBLANK
-/* Define to 1 if you have the `issetugid' function. */
-#undef HAVE_ISSETUGID
-
/* Define to 1 if you have the `iswcntrl' function. */
#undef HAVE_ISWCNTRL
@@ -735,6 +933,12 @@
concept. */
#undef HAVE_MSVC_INVALID_PARAMETER_HANDLER
+/* Define to 1 if you have the <netdb.h> header file. */
+#undef HAVE_NETDB_H
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#undef HAVE_NETINET_IN_H
+
/* Define to 1 if you have the `newlocale' function. */
#undef HAVE_NEWLOCALE
@@ -753,6 +957,9 @@
/* Define to 1 if you have the `pathconf' function. */
#undef HAVE_PATHCONF
+/* Define to 1 if you have the `pipe' function. */
+#undef HAVE_PIPE
+
/* Define to 1 if you have the `popen' function. */
#undef HAVE_POPEN
@@ -766,12 +973,24 @@
reader. */
#undef HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER
+/* Define to 1 if you have the `raise' function. */
+#undef HAVE_RAISE
+
+/* Define to 1 if accept is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ACCEPT
+
+/* Define to 1 if accept4 is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ACCEPT4
+
/* Define to 1 if alphasort is declared even after undefining macros. */
#undef HAVE_RAW_DECL_ALPHASORT
/* Define to 1 if atoll is declared even after undefining macros. */
#undef HAVE_RAW_DECL_ATOLL
+/* Define to 1 if bind is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_BIND
+
/* Define to 1 if btowc is declared even after undefining macros. */
#undef HAVE_RAW_DECL_BTOWC
@@ -788,6 +1007,9 @@
/* Define to 1 if closedir is declared even after undefining macros. */
#undef HAVE_RAW_DECL_CLOSEDIR
+/* Define to 1 if connect is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_CONNECT
+
/* Define to 1 if dirfd is declared even after undefining macros. */
#undef HAVE_RAW_DECL_DIRFD
@@ -899,9 +1121,18 @@
/* Define to 1 if getpagesize is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETPAGESIZE
+/* Define to 1 if getpeername is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETPEERNAME
+
/* Define to 1 if gets is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETS
+/* Define to 1 if getsockname is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETSOCKNAME
+
+/* Define to 1 if getsockopt is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETSOCKOPT
+
/* Define to 1 if getsubopt is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETSUBOPT
@@ -923,12 +1154,21 @@
/* Define to 1 if imaxdiv is declared even after undefining macros. */
#undef HAVE_RAW_DECL_IMAXDIV
+/* Define to 1 if inet_ntop is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_INET_NTOP
+
+/* Define to 1 if inet_pton is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_INET_PTON
+
/* Define to 1 if initstate is declared even after undefining macros. */
#undef HAVE_RAW_DECL_INITSTATE
/* Define to 1 if initstate_r is declared even after undefining macros. */
#undef HAVE_RAW_DECL_INITSTATE_R
+/* Define to 1 if ioctl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_IOCTL
+
/* Define to 1 if isatty is declared even after undefining macros. */
#undef HAVE_RAW_DECL_ISATTY
@@ -950,6 +1190,9 @@
/* Define to 1 if linkat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_LINKAT
+/* Define to 1 if listen is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_LISTEN
+
/* Define to 1 if lseek is declared even after undefining macros. */
#undef HAVE_RAW_DECL_LSEEK
@@ -1037,6 +1280,12 @@
/* Define to 1 if pread is declared even after undefining macros. */
#undef HAVE_RAW_DECL_PREAD
+/* Define to 1 if pselect is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_PSELECT
+
+/* Define to 1 if pthread_sigmask is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_PTHREAD_SIGMASK
+
/* Define to 1 if ptsname is declared even after undefining macros. */
#undef HAVE_RAW_DECL_PTSNAME
@@ -1067,9 +1316,18 @@
/* Define to 1 if readlinkat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_READLINKAT
+/* Define to 1 if reallocarray is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_REALLOCARRAY
+
/* Define to 1 if realpath is declared even after undefining macros. */
#undef HAVE_RAW_DECL_REALPATH
+/* Define to 1 if recv is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_RECV
+
+/* Define to 1 if recvfrom is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_RECVFROM
+
/* Define to 1 if renameat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_RENAMEAT
@@ -1088,6 +1346,15 @@
/* Define to 1 if secure_getenv is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SECURE_GETENV
+/* Define to 1 if select is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SELECT
+
+/* Define to 1 if send is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SEND
+
+/* Define to 1 if sendto is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SENDTO
+
/* Define to 1 if setenv is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SETENV
@@ -1097,6 +1364,9 @@
/* Define to 1 if setlocale is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SETLOCALE
+/* Define to 1 if setsockopt is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SETSOCKOPT
+
/* Define to 1 if setstate is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SETSTATE
@@ -1106,12 +1376,42 @@
/* Define to 1 if setusershell is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SETUSERSHELL
+/* Define to 1 if shutdown is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SHUTDOWN
+
+/* Define to 1 if sigaction is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SIGACTION
+
+/* Define to 1 if sigaddset is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SIGADDSET
+
+/* Define to 1 if sigdelset is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SIGDELSET
+
+/* Define to 1 if sigemptyset is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SIGEMPTYSET
+
+/* Define to 1 if sigfillset is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SIGFILLSET
+
+/* Define to 1 if sigismember is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SIGISMEMBER
+
+/* Define to 1 if sigpending is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SIGPENDING
+
+/* Define to 1 if sigprocmask is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SIGPROCMASK
+
/* Define to 1 if sleep is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SLEEP
/* Define to 1 if snprintf is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SNPRINTF
+/* Define to 1 if socket is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SOCKET
+
/* Define to 1 if srandom is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SRANDOM
@@ -1190,6 +1490,9 @@
/* Define to 1 if towctrans is declared even after undefining macros. */
#undef HAVE_RAW_DECL_TOWCTRANS
+/* Define to 1 if truncate is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_TRUNCATE
+
/* Define to 1 if ttyname_r is declared even after undefining macros. */
#undef HAVE_RAW_DECL_TTYNAME_R
@@ -1250,6 +1553,9 @@
/* Define to 1 if wcsdup is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSDUP
+/* Define to 1 if wcsftime is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSFTIME
+
/* Define to 1 if wcslen is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSLEN
@@ -1337,12 +1643,12 @@
/* Define to 1 if you have the `realpath' function. */
#undef HAVE_REALPATH
+/* Define to 1 if the system has the type `sa_family_t'. */
+#undef HAVE_SA_FAMILY_T
+
/* Define to 1 if you have the <search.h> header file. */
#undef HAVE_SEARCH_H
-/* Define to 1 if you have the `secure_getenv' function. */
-#undef HAVE_SECURE_GETENV
-
/* Define to 1 if you have the <selinux/context.h> header file. */
#undef HAVE_SELINUX_CONTEXT_H
@@ -1358,6 +1664,21 @@
/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
+/* Define to 1 if you have the `shutdown' function. */
+#undef HAVE_SHUTDOWN
+
+/* Define to 1 if you have the `sigaction' function. */
+#undef HAVE_SIGACTION
+
+/* Define to 1 if you have the `sigaltstack' function. */
+#undef HAVE_SIGALTSTACK
+
+/* Define to 1 if the system has the type `siginfo_t'. */
+#undef HAVE_SIGINFO_T
+
+/* Define to 1 if you have the `siginterrupt' function. */
+#undef HAVE_SIGINTERRUPT
+
/* Define to 1 if 'sig_atomic_t' is a signed integer type. */
#undef HAVE_SIGNED_SIG_ATOMIC_T
@@ -1367,6 +1688,15 @@
/* Define to 1 if 'wint_t' is a signed integer type. */
#undef HAVE_SIGNED_WINT_T
+/* Define to 1 if the system has the type `sigset_t'. */
+#undef HAVE_SIGSET_T
+
+/* Define to 1 if you have the `sleep' function. */
+#undef HAVE_SLEEP
+
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF
+
/* Define to 1 if you have the `statacl' function. */
#undef HAVE_STATACL
@@ -1401,6 +1731,36 @@
/* Define to 1 if `decimal_point' is a member of `struct lconv'. */
#undef HAVE_STRUCT_LCONV_DECIMAL_POINT
+/* Define to 1 if `sa_sigaction' is a member of `struct sigaction'. */
+#undef HAVE_STRUCT_SIGACTION_SA_SIGACTION
+
+/* Define to 1 if the system has the type `struct sockaddr_storage'. */
+#undef HAVE_STRUCT_SOCKADDR_STORAGE
+
+/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */
+#undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
+
+/* Define to 1 if `st_atimensec' is a member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_ATIMENSEC
+
+/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC
+
+/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC
+
+/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC
+
+/* Define to 1 if `st_birthtimensec' is a member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC
+
+/* Define to 1 if `st_birthtimespec.tv_nsec' is a member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC
+
+/* Define to 1 if `st_birthtim.tv_nsec' is a member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC
+
/* Define to 1 if you have the `strverscmp' function. */
#undef HAVE_STRVERSCMP
@@ -1413,30 +1773,42 @@
/* Define to 1 if you have the <sys/bitypes.h> header file. */
#undef HAVE_SYS_BITYPES_H
+/* Define to 1 if you have the <sys/cdefs.h> header file. */
+#undef HAVE_SYS_CDEFS_H
+
/* Define to 1 if you have the <sys/inttypes.h> header file. */
#undef HAVE_SYS_INTTYPES_H
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#undef HAVE_SYS_IOCTL_H
+
/* Define to 1 if you have the <sys/mman.h> header file. */
#undef HAVE_SYS_MMAN_H
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
-/* Define to 1 if you have the <sys/timeb.h> header file. */
-#undef HAVE_SYS_TIMEB_H
-
/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
+/* Define to 1 if you have the <sys/uio.h> header file. */
+#undef HAVE_SYS_UIO_H
+
+/* Define to 1 if you have the <sys/wait.h> header file. */
+#undef HAVE_SYS_WAIT_H
+
/* Define to 1 if you have the `towlower' function. */
#undef HAVE_TOWLOWER
@@ -1485,6 +1857,9 @@
/* Define to 1 if O_NOFOLLOW works. */
#undef HAVE_WORKING_O_NOFOLLOW
+/* Define to 1 if you have the <ws2tcpip.h> header file. */
+#undef HAVE_WS2TCPIP_H
+
/* Define to 1 if you have the <xlocale.h> header file. */
#undef HAVE_XLOCALE_H
@@ -1497,9 +1872,6 @@
/* Define to 1 if you have the `_ftelli64' function. */
#undef HAVE__FTELLI64
-/* Define to 1 if you have the `_ftime' function. */
-#undef HAVE__FTIME
-
/* Define to 1 if you have the `_set_invalid_parameter_handler' function. */
#undef HAVE__SET_INVALID_PARAMETER_HANDLER
@@ -1522,8 +1894,8 @@
/* Define to 1 if you have the `__fwriting' function. */
#undef HAVE___FWRITING
-/* Define to 1 if you have the `__secure_getenv' function. */
-#undef HAVE___SECURE_GETENV
+/* Define to 1 if you have the `__xpg_strerror_r' function. */
+#undef HAVE___XPG_STRERROR_R
/* Define to 1 if lseek does not detect pipes. */
#undef LSEEK_PIPE_BROKEN
@@ -1622,7 +1994,7 @@
#undef RENAME_HARD_LINK_BUG
/* Define if rename does not correctly handle slashes on the destination
- argument, such as on Solaris 10 or NetBSD 1.6. */
+ argument, such as on Solaris 11 or NetBSD 1.6. */
#undef RENAME_TRAILING_SLASH_DEST_BUG
/* Define if rename does not correctly handle slashes on the source argument,
@@ -1632,10 +2004,6 @@
/* Define to 1 if gnulib's dirfd() replacement is used. */
#undef REPLACE_DIRFD
-/* Define to 1 if stat needs help when passed a directory name with a trailing
- slash */
-#undef REPLACE_FUNC_STAT_DIR
-
/* Define to 1 if stat needs help when passed a file name with a trailing
slash */
#undef REPLACE_FUNC_STAT_FILE
@@ -1672,6 +2040,10 @@
/* Define to 1 if strerror_r returns char *. */
#undef STRERROR_R_CHAR_P
+/* Define to 1 if the type of the st_atim member of a struct stat is struct
+ timespec. */
+#undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC
+
/* Define to nonzero if you want access control list support. */
#undef USE_ACL
@@ -1708,6 +2080,14 @@
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
+/* Enable NetBSD extensions on NetBSD. */
+#ifndef _NETBSD_SOURCE
+# undef _NETBSD_SOURCE
+#endif
+/* Enable OpenBSD extensions on NetBSD. */
+#ifndef _OPENBSD_SOURCE
+# undef _OPENBSD_SOURCE
+#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
@@ -1750,6 +2130,11 @@
#ifndef _XOPEN_SOURCE
# undef _XOPEN_SOURCE
#endif
+/* Enable X/Open compliant socket functions that do not require linking
+ with -lxnet on HP-UX 11.11. */
+#ifndef _HPUX_ALT_XOPEN_SOCKET_API
+# undef _HPUX_ALT_XOPEN_SOCKET_API
+#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
@@ -1774,20 +2159,31 @@
'wchar_t'. */
#undef WCHAR_T_SUFFIX
+/* Define if WSAStartup is needed. */
+#undef WINDOWS_SOCKETS
+
/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
'wint_t'. */
#undef WINT_T_SUFFIX
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+# define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+# undef WORDS_BIGENDIAN
+# endif
+#endif
+
/* Enable large inode numbers on Mac OS X 10.5. */
#undef _DARWIN_USE_64_BIT_INODE
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
-/* Define to 1 if Gnulib overrides 'struct stat' on Windows so that struct
- stat.st_size becomes 64-bit. */
-#undef _GL_WINDOWS_64_BIT_ST_SIZE
-
/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
#undef _LARGEFILE_SOURCE
@@ -1821,6 +2217,10 @@
this defined. */
#undef _POSIX_1_SOURCE
+/* Define to 1 in order to get the POSIX compatible declarations of socket
+ functions. */
+#undef _POSIX_PII_SOCKET
+
/* Define to 1 if you need to in order for 'stat' and other things to work. */
#undef _POSIX_SOURCE
@@ -1831,8 +2231,8 @@
/* Define if you want regoff_t to be at least as wide POSIX requires. */
#undef _REGEX_LARGE_OFFSETS
-/* Include BSD functions in regex, used by the testsuite */
-#undef _REGEX_RE_COMP
+/* For standard stat data types on VMS. */
+#undef _USE_STD_STAT
/* Define to rpl_ if the getopt replacement functions and variables should be
used. */
@@ -1850,7 +2250,7 @@
/* Please see the Gnulib manual for how to use these macros.
Suppress extern inline with HP-UX cc, as it appears to be broken; see
- <http://lists.gnu.org/archive/html/bug-texinfo/2013-02/msg00030.html>.
+ <https://lists.gnu.org/r/bug-texinfo/2013-02/msg00030.html>.
Suppress extern inline with Sun C in standards-conformance mode, as it
mishandles inline functions that call each other. E.g., for 'inline void f
@@ -1867,16 +2267,16 @@
from calling static functions. This bug is known to occur on:
OS X 10.8 and earlier; see:
- http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html
+ https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html
DragonFly; see
http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
FreeBSD; see:
- http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html
+ https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html
OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
- for clang but remains for g++; see <http://trac.macports.org/ticket/41033>.
+ for clang but remains for g++; see <https://trac.macports.org/ticket/41033>.
Assume DragonFly and FreeBSD will be similar. */
#if (((defined __APPLE__ && defined __MACH__) \
|| defined __DragonFly__ || defined __FreeBSD__) \
@@ -1945,6 +2345,9 @@
/* Always use our getfilecon wrapper. */
#undef getfilecon
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef gid_t
+
/* A replacement for va_copy, if needed. */
#define gl_va_copy(a,b) ((a) = (b))
@@ -2044,9 +2447,15 @@
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t
+/* type to use in place of socklen_t if not defined */
+#undef socklen_t
+
/* Define as a signed type of the same size as size_t. */
#undef ssize_t
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef uid_t
+
/* Define as a marker that can be attached to declarations that might not
be used. This helps to reduce warnings, such as from
GCC -Wunused-parameter. */
diff --git a/configure b/configure
index e1ff0cb..096dc83 100755
--- a/configure
+++ b/configure
@@ -1,11 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69.183-96821 for GNU sed 4.4.
+# Generated by GNU Autoconf 2.69.193-8974 for GNU sed 4.5.
#
# Report bugs to <bug-sed@gnu.org>.
#
#
-# Copyright (C) 1992-1996, 1998-2016 Free Software Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2017 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -565,10 +565,10 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='GNU sed'
PACKAGE_TARNAME='sed'
-PACKAGE_VERSION='4.4'
-PACKAGE_STRING='GNU sed 4.4'
+PACKAGE_VERSION='4.5'
+PACKAGE_STRING='GNU sed 4.5'
PACKAGE_BUGREPORT='bug-sed@gnu.org'
-PACKAGE_URL='http://www.gnu.org/software/sed/'
+PACKAGE_URL='https://www.gnu.org/software/sed/'
ac_unique_file="sed/sed.c"
# Factoring default headers for most tests.
@@ -600,7 +600,6 @@ ac_header_c_list=
gl_use_threads_default=
ac_func_c_list=
gl_getopt_required=POSIX
-gl_getopt_required=POSIX
gt_needs=
ac_config_libobj_dir=lib
ac_subst_vars='gltests_LTLIBOBJS
@@ -623,8 +622,6 @@ GNULIB_TEST_WARN_CFLAGS
WARN_CFLAGS
WERROR_CFLAGS
XFAIL_TESTS
-TEST_REGEX_FALSE
-TEST_REGEX_TRUE
TEST_SYMLINKS_FALSE
TEST_SYMLINKS_TRUE
POSUB
@@ -641,10 +638,53 @@ GMSGFMT
MSGFMT
GETTEXT_MACRO_VERSION
USE_NLS
+HAVE_PERL_FALSE
+HAVE_PERL_TRUE
LIBTESTS_LIBDEPS
LIBSED_LTLIBDEPS
LIBSED_LIBDEPS
abs_aux_dir
+HAVE_SYS_UIO_H
+NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
+NEXT_SYS_UIO_H
+NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H
+NEXT_SYS_IOCTL_H
+HAVE_SYS_IOCTL_H
+NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
+NEXT_SIGNAL_H
+REPLACE_RAISE
+REPLACE_PTHREAD_SIGMASK
+HAVE_SIGHANDLER_T
+HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
+HAVE_STRUCT_SIGACTION_SA_SIGACTION
+HAVE_SIGACTION
+HAVE_SIGINFO_T
+HAVE_SIGSET_T
+HAVE_RAISE
+HAVE_PTHREAD_SIGMASK
+HAVE_POSIX_SIGNALBLOCKING
+GNULIB_SIGACTION
+GNULIB_SIGPROCMASK
+GNULIB_SIGNAL_H_SIGPIPE
+GNULIB_RAISE
+GNULIB_PTHREAD_SIGMASK
+GL_GENERATE_NETINET_IN_H_FALSE
+GL_GENERATE_NETINET_IN_H_TRUE
+NETINET_IN_H
+HAVE_NETINET_IN_H
+NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
+NEXT_NETINET_IN_H
+LIB_NANOSLEEP
+LIB_SELECT
+LIBSOCKET
+HAVE_SYS_SELECT_H
+NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
+NEXT_SYS_SELECT_H
+REPLACE_SELECT
+REPLACE_PSELECT
+HAVE_PSELECT
+GNULIB_SELECT
+GNULIB_PSELECT
INTL_MACOSX_LIBS
NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
NEXT_INTTYPES_H
@@ -664,6 +704,7 @@ GNULIB_STRTOUMAX
GNULIB_STRTOIMAX
GNULIB_IMAXDIV
GNULIB_IMAXABS
+INET_PTON_LIB
LIB_HAS_ACL
HAVE_DIRENT_H
NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
@@ -690,6 +731,38 @@ GNULIB_REWINDDIR
GNULIB_READDIR
GNULIB_OPENDIR
LOCALE_TR_UTF8
+NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
+NEXT_ARPA_INET_H
+HAVE_ARPA_INET_H
+REPLACE_INET_PTON
+REPLACE_INET_NTOP
+HAVE_DECL_INET_PTON
+HAVE_DECL_INET_NTOP
+GNULIB_INET_PTON
+GNULIB_INET_NTOP
+HAVE_WS2TCPIP_H
+HAVE_SYS_SOCKET_H
+NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
+NEXT_SYS_SOCKET_H
+HAVE_ACCEPT4
+HAVE_SA_FAMILY_T
+HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
+HAVE_STRUCT_SOCKADDR_STORAGE
+GNULIB_ACCEPT4
+GNULIB_SHUTDOWN
+GNULIB_SETSOCKOPT
+GNULIB_SENDTO
+GNULIB_RECVFROM
+GNULIB_SEND
+GNULIB_RECV
+GNULIB_LISTEN
+GNULIB_GETSOCKOPT
+GNULIB_GETSOCKNAME
+GNULIB_GETPEERNAME
+GNULIB_BIND
+GNULIB_ACCEPT
+GNULIB_CONNECT
+GNULIB_SOCKET
gltests_WITNESS
REPLACE_TOWLOWER
REPLACE_ISWCNTRL
@@ -706,6 +779,7 @@ GNULIB_WCTRANS
GNULIB_ISWCTYPE
GNULIB_WCTYPE
GNULIB_ISWBLANK
+HAVE_CRTDEFS_H
HAVE_WINT_T
HAVE_FEATURES_H
NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
@@ -719,22 +793,7 @@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
TIME_H_DEFINES_STRUCT_TIMESPEC
NEXT_AS_FIRST_DIRECTIVE_TIME_H
NEXT_TIME_H
-REPLACE_LOCALTIME
-REPLACE_GMTIME
-REPLACE_TIMEGM
-REPLACE_NANOSLEEP
-REPLACE_MKTIME
-REPLACE_LOCALTIME_R
-HAVE_TIMEGM
-HAVE_STRPTIME
-HAVE_NANOSLEEP
-HAVE_DECL_LOCALTIME_R
-GNULIB_TIME_RZ
-GNULIB_TIME_R
-GNULIB_TIMEGM
-GNULIB_STRPTIME
-GNULIB_NANOSLEEP
-GNULIB_MKTIME
+WINDOWS_STAT_INODES
WINDOWS_64_BIT_OFF_T
NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
NEXT_SYS_TYPES_H
@@ -791,18 +850,19 @@ NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H
NEXT_SELINUX_SELINUX_H
LIB_SELINUX
APPLE_UNIVERSAL_BUILD
+HAVE_MSVC_INVALID_PARAMETER_HANDLER
UNDEFINE_STRTOK_R
-REPLACE_STRTOK_R
REPLACE_STRSIGNAL
-REPLACE_STRNLEN
-REPLACE_STRNDUP
-REPLACE_STRNCAT
REPLACE_STRERROR_R
REPLACE_STRERROR
-REPLACE_STRCHRNUL
+REPLACE_STRTOK_R
REPLACE_STRCASESTR
REPLACE_STRSTR
+REPLACE_STRNLEN
+REPLACE_STRNDUP
+REPLACE_STRNCAT
REPLACE_STRDUP
+REPLACE_STRCHRNUL
REPLACE_STPNCPY
REPLACE_MEMMEM
REPLACE_MEMCHR
@@ -826,6 +886,7 @@ HAVE_DECL_MEMMEM
HAVE_MEMCHR
HAVE_FFSLL
HAVE_FFSL
+HAVE_EXPLICIT_BZERO
HAVE_MBSLEN
GNULIB_STRVERSCMP
GNULIB_STRSIGNAL
@@ -864,6 +925,7 @@ GNULIB_MEMMEM
GNULIB_MEMCHR
GNULIB_FFSLL
GNULIB_FFSL
+GNULIB_EXPLICIT_BZERO
LOCALE_FR_UTF8
LOCALE_ZH_CN
LOCALE_JA
@@ -903,6 +965,7 @@ NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
NEXT_LIMITS_H
HAVE_LANGINFO_YESEXPR
HAVE_LANGINFO_ERA
+HAVE_LANGINFO_ALTMON
HAVE_LANGINFO_T_FMT_AMPM
HAVE_LANGINFO_CODESET
HAVE_LANGINFO_H
@@ -911,12 +974,42 @@ NEXT_LANGINFO_H
REPLACE_NL_LANGINFO
HAVE_NL_LANGINFO
GNULIB_NL_LANGINFO
+HOST_CPU_C_ABI
+HOST_CPU
+REPLACE_LOCALTIME
+REPLACE_GMTIME
+REPLACE_TZSET
+REPLACE_TIMEGM
+REPLACE_STRFTIME
+REPLACE_NANOSLEEP
+REPLACE_MKTIME
+REPLACE_LOCALTIME_R
+REPLACE_CTIME
+HAVE_TIMEZONE_T
+HAVE_TZSET
+HAVE_TIMEGM
+HAVE_STRPTIME
+HAVE_NANOSLEEP
+HAVE_DECL_LOCALTIME_R
+GNULIB_TZSET
+GNULIB_TIME_RZ
+GNULIB_TIME_R
+GNULIB_TIMEGM
+GNULIB_STRPTIME
+GNULIB_STRFTIME
+GNULIB_NANOSLEEP
+GNULIB_LOCALTIME
+GNULIB_MKTIME
+GNULIB_CTIME
HAVE_WINSOCK2_H
+REPLACE_IOCTL
+SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
+SYS_IOCTL_H_HAVE_WINSOCK2_H
+GNULIB_IOCTL
NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
NEXT_SYS_TIME_H
REPLACE_STRUCT_TIMEVAL
REPLACE_GETTIMEOFDAY
-HAVE_TIMEZONE_T
HAVE_SYS_TIME_H
HAVE_STRUCT_TIMEVAL
HAVE_GETTIMEOFDAY
@@ -924,7 +1017,9 @@ GNULIB_GETTIMEOFDAY
LTLIBINTL
LIBINTL
GNULIB_GL_UNISTD_H_GETOPT
+GETOPT_CDEFS_H
GETOPT_H
+HAVE_SYS_CDEFS_H
HAVE_GETOPT_H
NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
NEXT_GETOPT_H
@@ -1030,9 +1125,9 @@ GNULIB_FDOPEN
GNULIB_FCLOSE
GNULIB_DPRINTF
WINDOWS_64_BIT_ST_SIZE
+WINDOWS_STAT_TIMESPEC
NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
NEXT_SYS_STAT_H
-HAVE_MSVC_INVALID_PARAMETER_HANDLER
REPLACE_UTIMENSAT
REPLACE_STAT
REPLACE_MKNOD
@@ -1053,6 +1148,7 @@ HAVE_LCHMOD
HAVE_FUTIMENS
HAVE_FSTATAT
HAVE_FCHMODAT
+GNULIB_OVERRIDES_STRUCT_STAT
GNULIB_UTIMENSAT
GNULIB_STAT
GNULIB_MKNODAT
@@ -1105,6 +1201,7 @@ REPLACE_USLEEP
REPLACE_UNLINKAT
REPLACE_UNLINK
REPLACE_TTYNAME_R
+REPLACE_TRUNCATE
REPLACE_SYMLINKAT
REPLACE_SYMLINK
REPLACE_SLEEP
@@ -1127,6 +1224,7 @@ REPLACE_GETDOMAINNAME
REPLACE_GETCWD
REPLACE_FTRUNCATE
REPLACE_FCHOWNAT
+REPLACE_FACCESSAT
REPLACE_DUP2
REPLACE_DUP
REPLACE_CLOSE
@@ -1145,6 +1243,7 @@ HAVE_DECL_FCHDIR
HAVE_DECL_ENVIRON
HAVE_USLEEP
HAVE_UNLINKAT
+HAVE_TRUNCATE
HAVE_SYMLINKAT
HAVE_SYMLINK
HAVE_SLEEP
@@ -1181,6 +1280,7 @@ GNULIB_UNLINK
GNULIB_UNISTD_H_SIGPIPE
GNULIB_UNISTD_H_NONBLOCKING
GNULIB_TTYNAME_R
+GNULIB_TRUNCATE
GNULIB_SYMLINKAT
GNULIB_SYMLINK
GNULIB_SLEEP
@@ -1245,11 +1345,13 @@ HAVE_STRUCT_RANDOM_DATA
HAVE_STRTOULL
HAVE_STRTOLL
HAVE_STRTOD
+HAVE_DECL_SETSTATE
HAVE_DECL_SETENV
HAVE_SETENV
HAVE_SECURE_GETENV
HAVE_RPMATCH
HAVE_REALPATH
+HAVE_REALLOCARRAY
HAVE_RANDOM_R
HAVE_RANDOM_H
HAVE_RANDOM
@@ -1262,6 +1364,7 @@ HAVE_MKSTEMP
HAVE_MKOSTEMPS
HAVE_MKOSTEMP
HAVE_MKDTEMP
+HAVE_DECL_INITSTATE
HAVE_GRANTPT
HAVE_GETSUBOPT
HAVE_DECL_GETLOADAVG
@@ -1280,6 +1383,7 @@ GNULIB_SECURE_GETENV
GNULIB_RPMATCH
GNULIB_REALPATH
GNULIB_REALLOC_POSIX
+GNULIB_REALLOCARRAY
GNULIB_RANDOM_R
GNULIB_RANDOM
GNULIB_QSORT_R
@@ -1302,6 +1406,7 @@ GNULIB_CALLOC_POSIX
GNULIB_ATOLL
GNULIB__EXIT
LOCALE_FR
+REPLACE_WCSFTIME
REPLACE_WCSWIDTH
REPLACE_WCWIDTH
REPLACE_WCSNRTOMBS
@@ -1317,6 +1422,7 @@ REPLACE_BTOWC
REPLACE_MBSTATE_T
HAVE_DECL_WCWIDTH
HAVE_DECL_WCTOB
+HAVE_WCSFTIME
HAVE_WCSWIDTH
HAVE_WCSTOK
HAVE_WCSSTR
@@ -1354,6 +1460,7 @@ HAVE_MBRLEN
HAVE_MBRTOWC
HAVE_MBSINIT
HAVE_BTOWC
+GNULIB_WCSFTIME
GNULIB_WCSWIDTH
GNULIB_WCSTOK
GNULIB_WCSSTR
@@ -1411,7 +1518,6 @@ build_cpu
build
RANLIB
ARFLAGS
-ac_ct_AR
AR
EGREP
GREP
@@ -1439,8 +1545,10 @@ AM_V
am__untar
am__tar
AMTAR
+am__leading_dot
SET_MAKE
AWK
+mkdir_p
MKDIR_P
INSTALL_STRIP_PROGRAM
STRIP
@@ -1457,7 +1565,6 @@ am__isrc
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
-mkdir_p
target_alias
host_alias
build_alias
@@ -1519,7 +1626,6 @@ enable_nls
with_libiconv_prefix
with_libintl_prefix
enable_i18n
-enable_regex_tests
enable_gcc_warnings
'
ac_precious_vars='build_alias
@@ -2081,7 +2187,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures GNU sed 4.4 to adapt to many kinds of systems.
+\`configure' configures GNU sed 4.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -2152,7 +2258,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of GNU sed 4.4:";;
+ short | recursive ) echo "Configuration of GNU sed 4.5:";;
esac
cat <<\_ACEOF
@@ -2175,7 +2281,6 @@ Optional Features:
--disable-rpath do not hardcode runtime library paths
--disable-nls do not use Native Language Support
--disable-i18n disable internationalization (default=enabled)
- --enable-regex-tests enable regex matcher regression tests (default=yes)
--enable-gcc-warnings turn on many GCC warnings (for developers; best with
GNU make)
@@ -2213,8 +2318,8 @@ Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to <bug-sed@gnu.org>.
-GNU sed home page: <http://www.gnu.org/software/sed/>.
-General help using GNU software: <http://www.gnu.org/gethelp/>.
+GNU sed home page: <https://www.gnu.org/software/sed/>.
+General help using GNU software: <https://www.gnu.org/gethelp/>.
_ACEOF
ac_status=$?
fi
@@ -2277,10 +2382,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-GNU sed configure 4.4
-generated by GNU Autoconf 2.69.183-96821
+GNU sed configure 4.5
+generated by GNU Autoconf 2.69.193-8974
-Copyright (C) 2016 Free Software Foundation, Inc.
+Copyright (C) 2017 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -2914,8 +3019,8 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by GNU sed $as_me 4.4, which was
-generated by GNU Autoconf 2.69.183-96821. Invocation command line was
+It was created by GNU sed $as_me 4.5, which was
+generated by GNU Autoconf 2.69.193-8974. Invocation command line was
$ $0 $@
@@ -3204,11 +3309,11 @@ as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H"
as_fn_append ac_func_c_list " strerror_r HAVE_STRERROR_R"
as_fn_append ac_func_c_list " symlink HAVE_SYMLINK"
as_fn_append ac_header_c_list " stdio_ext.h stdio_ext_h HAVE_STDIO_EXT_H"
-as_fn_append ac_func_c_list " _set_invalid_parameter_handler HAVE__SET_INVALID_PARAMETER_HANDLER"
as_fn_append ac_func_c_list " __fwriting HAVE___FWRITING"
as_fn_append ac_func_c_list " getdelim HAVE_GETDELIM"
gl_getopt_required=GNU
as_fn_append ac_header_c_list " getopt.h getopt_h HAVE_GETOPT_H"
+as_fn_append ac_header_c_list " sys/cdefs.h sys_cdefs_h HAVE_SYS_CDEFS_H"
as_fn_append ac_func_c_list " getprogname HAVE_GETPROGNAME"
as_fn_append ac_func_c_list " getexecname HAVE_GETEXECNAME"
as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
@@ -3225,30 +3330,45 @@ as_fn_append ac_func_c_list " mbrlen HAVE_MBRLEN"
as_fn_append ac_header_c_list " sys/mman.h sys_mman_h HAVE_SYS_MMAN_H"
as_fn_append ac_func_c_list " mprotect HAVE_MPROTECT"
as_fn_append ac_func_c_list " mkostemp HAVE_MKOSTEMP"
+as_fn_append ac_func_c_list " _set_invalid_parameter_handler HAVE__SET_INVALID_PARAMETER_HANDLER"
as_fn_append ac_func_c_list " nl_langinfo HAVE_NL_LANGINFO"
as_fn_append ac_header_c_list " malloc.h malloc_h HAVE_MALLOC_H"
as_fn_append ac_func_c_list " iswctype HAVE_ISWCTYPE"
as_fn_append ac_func_c_list " link HAVE_LINK"
-as_fn_append ac_func_c_list " secure_getenv HAVE_SECURE_GETENV"
-as_fn_append ac_func_c_list " getuid HAVE_GETUID"
-as_fn_append ac_func_c_list " geteuid HAVE_GETEUID"
-as_fn_append ac_func_c_list " getgid HAVE_GETGID"
-as_fn_append ac_func_c_list " getegid HAVE_GETEGID"
as_fn_append ac_header_c_list " selinux/selinux.h selinux_selinux_h HAVE_SELINUX_SELINUX_H"
as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
+as_fn_append ac_func_c_list " __xpg_strerror_r HAVE___XPG_STRERROR_R"
as_fn_append ac_header_c_list " features.h features_h HAVE_FEATURES_H"
+as_fn_append ac_header_c_list " crtdefs.h crtdefs_h HAVE_CRTDEFS_H"
as_fn_append ac_func_c_list " wcrtomb HAVE_WCRTOMB"
as_fn_append ac_func_c_list " wctob HAVE_WCTOB"
as_fn_append ac_func_c_list " iswcntrl HAVE_ISWCNTRL"
as_fn_append ac_header_c_list " wctype.h wctype_h HAVE_WCTYPE_H"
+as_fn_append ac_header_c_list " arpa/inet.h arpa_inet_h HAVE_ARPA_INET_H"
as_fn_append ac_header_c_list " dirent.h dirent_h HAVE_DIRENT_H"
+as_fn_append ac_func_c_list " fcntl HAVE_FCNTL"
as_fn_append ac_func_c_list " fpurge HAVE_FPURGE"
as_fn_append ac_func_c_list " __fpurge HAVE___FPURGE"
as_fn_append ac_func_c_list " __freading HAVE___FREADING"
+as_fn_append ac_func_c_list " ftruncate HAVE_FTRUNCATE"
as_fn_append ac_func_c_list " getdtablesize HAVE_GETDTABLESIZE"
+as_fn_append ac_header_c_list " netdb.h netdb_h HAVE_NETDB_H"
+as_fn_append ac_header_c_list " netinet/in.h netinet_in_h HAVE_NETINET_IN_H"
as_fn_append ac_func_c_list " newlocale HAVE_NEWLOCALE"
+as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H"
+as_fn_append ac_func_c_list " pipe HAVE_PIPE"
+as_fn_append ac_header_c_list " sys/wait.h sys_wait_h HAVE_SYS_WAIT_H"
as_fn_append ac_func_c_list " setenv HAVE_SETENV"
+as_fn_append ac_func_c_list " sigaction HAVE_SIGACTION"
+as_fn_append ac_func_c_list " sigaltstack HAVE_SIGALTSTACK"
+as_fn_append ac_func_c_list " siginterrupt HAVE_SIGINTERRUPT"
+as_fn_append ac_func_c_list " sleep HAVE_SLEEP"
as_fn_append ac_func_c_list " strdup HAVE_STRDUP"
+as_fn_append ac_func_c_list " catgets HAVE_CATGETS"
+as_fn_append ac_func_c_list " snprintf HAVE_SNPRINTF"
+as_fn_append ac_header_c_list " sys/ioctl.h sys_ioctl_h HAVE_SYS_IOCTL_H"
+as_fn_append ac_func_c_list " shutdown HAVE_SHUTDOWN"
+as_fn_append ac_header_c_list " sys/uio.h sys_uio_h HAVE_SYS_UIO_H"
gl_use_threads_default=no
as_fn_append ac_header_c_list " locale.h locale_h HAVE_LOCALE_H"
as_fn_append ac_header_c_list " errno.h errno_h HAVE_ERRNO_H"
@@ -3365,7 +3485,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
ac_config_headers="$ac_config_headers config.h:config_h.in"
-am__api_version='1.99a'
+am__api_version='1.16'
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
@@ -3423,7 +3543,7 @@ case $as_dir in #((
echo one > conftest.one
echo two > conftest.two
mkdir conftest.dir
- if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
test -s conftest.one && test -s conftest.two &&
test -s conftest.dir/conftest.one &&
test -s conftest.dir/conftest.two
@@ -3807,6 +3927,15 @@ printf "%s\n" "no" >&6; }
SET_MAKE="MAKE=${MAKE-make}"
fi
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
# Check whether --enable-silent-rules was given.
if test ${enable_silent_rules+y}
then :
@@ -3848,7 +3977,6 @@ else
fi
AM_BACKSLASH='\'
-mkdir_p='$(MKDIR_P)'
if test "`cd $srcdir && pwd`" != "`pwd`"; then
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
# is not polluted with repeated "-I."
@@ -3871,7 +3999,7 @@ fi
# Define the identity of the package.
PACKAGE='sed'
- VERSION='4.4'
+ VERSION='4.5'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -3895,6 +4023,12 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
# We need awk for the "check" target (and possibly the TAP driver). The
# system "awk" is bad on some platforms.
# Always define AMTAR for backward compatibility. Yes, it's still used
@@ -3943,7 +4077,7 @@ END
Aborting the configuration process, to ensure you take notice of the issue.
You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <http://www.gnu.org/software/coreutils/>.
+that behaves properly: <https://www.gnu.org/software/coreutils/>.
If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
@@ -3997,7 +4131,7 @@ AM_BACKSLASH='\'
# make --enable-silent-rules the default.
-DEPDIR=.deps
+DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
@@ -5650,6 +5784,10 @@ printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
+ printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
+
printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
@@ -5719,6 +5857,8 @@ printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
test $ac_cv_should_define__xopen_source = yes &&
printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
+ printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
+
@@ -6041,189 +6181,7 @@ printf "%s\n" "$gl_cv_c_amsterdam_compiler" >&6; }
ARFLAGS='-o'
fi
else
- if test -n "$ac_tool_prefix"; then
- for ac_prog in ar lib "link -lib"
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-printf %s "checking for $ac_word... " >&6; }
-if test ${ac_cv_prog_AR+y}
-then :
- printf %s "(cached) " >&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- case $as_dir in #(((
- '') as_dir=./ ;;
- */) ;;
- *) as_dir=$as_dir/ ;;
- esac
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
- ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
- printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-printf "%s\n" "$AR" >&6; }
-else
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-fi
-
-
- test -n "$AR" && break
- done
-fi
-if test -z "$AR"; then
- ac_ct_AR=$AR
- for ac_prog in ar lib "link -lib"
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-printf %s "checking for $ac_word... " >&6; }
-if test ${ac_cv_prog_ac_ct_AR+y}
-then :
- printf %s "(cached) " >&6
-else
- if test -n "$ac_ct_AR"; then
- ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- case $as_dir in #(((
- '') as_dir=./ ;;
- */) ;;
- *) as_dir=$as_dir/ ;;
- esac
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_AR="$ac_prog"
- printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-printf "%s\n" "$ac_ct_AR" >&6; }
-else
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-fi
-
-
- test -n "$ac_ct_AR" && break
-done
-
- if test "x$ac_ct_AR" = x; then
- AR="false"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- AR=$ac_ct_AR
- fi
-fi
-
-: ${AR=ar}
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
-printf %s "checking the archiver ($AR) interface... " >&6; }
-if test ${am_cv_ar_interface+y}
-then :
- printf %s "(cached) " >&6
-else
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
- am_cv_ar_interface=ar
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-int some_variable = 0;
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
- (eval $am_ar_try) 2>&5
- ac_status=$?
- printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- if test "$ac_status" -eq 0; then
- am_cv_ar_interface=ar
- else
- am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
- (eval $am_ar_try) 2>&5
- ac_status=$?
- printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- if test "$ac_status" -eq 0; then
- am_cv_ar_interface=lib
- else
- am_cv_ar_interface=unknown
- fi
- fi
- rm -f conftest.lib libconftest.a
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
-printf "%s\n" "$am_cv_ar_interface" >&6; }
-
-case $am_cv_ar_interface in
-ar)
- ;;
-lib)
- # Microsoft lib, so override with the ar-lib wrapper script.
- # FIXME: It is wrong to rewrite AR.
- # But if we don't then we get into trouble of one sort or another.
- # A longer-term fix would be to have automake use am__AR in this case,
- # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
- # similar.
- AR="$am_aux_dir/ar-lib $AR"
- ;;
-unknown)
- as_fn_error $? "could not determine $AR interface" "$LINENO" 5
- ;;
-esac
-
+ :
fi
if test -n "$ac_tool_prefix"; then
@@ -6851,6 +6809,8 @@ fi
# Code from module absolute-header:
+ # Code from module accept:
+ # Code from module accept-tests:
# Code from module acl:
# Code from module acl-permissions:
# Code from module acl-tests:
@@ -6860,9 +6820,13 @@ fi
# Code from module alloca-opt:
# Code from module alloca-opt-tests:
# Code from module announce-gen:
+ # Code from module arpa_inet:
+ # Code from module arpa_inet-tests:
# Code from module assert:
# Code from module binary-io:
# Code from module binary-io-tests:
+ # Code from module bind:
+ # Code from module bind-tests:
# Code from module btowc:
# Code from module btowc-tests:
# Code from module builtin-expect:
@@ -6876,12 +6840,16 @@ fi
# Code from module canonicalize-lgpl-tests:
# Code from module chdir:
# Code from module chdir-tests:
+ # Code from module cloexec:
+ # Code from module cloexec-tests:
# Code from module close:
# Code from module close-stream:
# Code from module close-tests:
# Code from module closedir:
# Code from module closeout:
# Code from module configmake:
+ # Code from module connect:
+ # Code from module connect-tests:
# Code from module ctype:
# Code from module ctype-tests:
# Code from module dfa:
@@ -6903,8 +6871,10 @@ fi
# Code from module exitfail:
# Code from module extensions:
# Code from module extern-inline:
+ # Code from module fcntl:
# Code from module fcntl-h:
# Code from module fcntl-h-tests:
+ # Code from module fcntl-tests:
# Code from module fd-hook:
# Code from module fdl:
# Code from module fdopen:
@@ -6937,6 +6907,8 @@ fi
# Code from module ftello:
# Code from module ftello-tests:
+ # Code from module ftruncate:
+ # Code from module ftruncate-tests:
# Code from module fwrite-tests:
# Code from module fwriting:
# Code from module fwriting-tests:
@@ -6965,14 +6937,19 @@ fi
# Code from module gnupload:
# Code from module hard-locale:
# Code from module havelib:
+ # Code from module host-cpu-c-abi:
# Code from module ignore-value:
# Code from module ignore-value-tests:
# Code from module include_next:
+ # Code from module inet_pton:
+ # Code from module inet_pton-tests:
# Code from module intprops:
# Code from module intprops-tests:
# Code from module inttypes:
# Code from module inttypes-incomplete:
# Code from module inttypes-tests:
+ # Code from module ioctl:
+ # Code from module ioctl-tests:
# Code from module isblank:
# Code from module isblank-tests:
# Code from module langinfo:
@@ -6983,6 +6960,8 @@ fi
# Code from module limits-h-tests:
# Code from module link:
# Code from module link-tests:
+ # Code from module listen:
+ # Code from module listen-tests:
# Code from module localcharset:
# Code from module locale:
# Code from module locale-tests:
@@ -6990,6 +6969,7 @@ fi
# Code from module localeconv-tests:
# Code from module localename:
# Code from module localename-tests:
+ # Code from module localtime-buffer:
# Code from module lock:
# Code from module lseek:
# Code from module lseek-tests:
@@ -7015,6 +6995,10 @@ fi
# Code from module msvc-inval:
# Code from module msvc-nothrow:
# Code from module multiarch:
+ # Code from module nanosleep:
+ # Code from module nanosleep-tests:
+ # Code from module netinet_in:
+ # Code from module netinet_in-tests:
# Code from module nl_langinfo:
# Code from module nl_langinfo-tests:
# Code from module nocrash:
@@ -7025,6 +7009,10 @@ fi
# Code from module opendir:
# Code from module pathmax:
# Code from module pathmax-tests:
+ # Code from module perror:
+ # Code from module perror-tests:
+ # Code from module pipe-posix:
+ # Code from module pipe-posix-tests:
# Code from module progname:
# Code from module putenv:
# Code from module qcopy-acl:
@@ -7033,6 +7021,8 @@ fi
# Code from module quotearg:
# Code from module quotearg-simple:
# Code from module quotearg-simple-tests:
+ # Code from module raise:
+ # Code from module raise-tests:
# Code from module read-file:
# Code from module read-file-tests:
# Code from module readdir:
@@ -7047,21 +7037,39 @@ fi
# Code from module rmdir:
# Code from module rmdir-tests:
# Code from module same-inode:
- # Code from module secure_getenv:
+ # Code from module select:
+ # Code from module select-tests:
# Code from module selinux-h:
# Code from module setenv:
# Code from module setenv-tests:
# Code from module setlocale:
# Code from module setlocale-tests:
+ # Code from module setsockopt:
+ # Code from module setsockopt-tests:
+ # Code from module sigaction:
+ # Code from module sigaction-tests:
+ # Code from module signal-h:
+ # Code from module signal-h-tests:
+ # Code from module sigprocmask:
+ # Code from module sigprocmask-tests:
+ # Code from module sleep:
+ # Code from module sleep-tests:
# Code from module snippet/_Noreturn:
# Code from module snippet/arg-nonnull:
# Code from module snippet/c++defs:
# Code from module snippet/unused-parameter:
# Code from module snippet/warn-on-use:
+ # Code from module socket:
+ # Code from module socketlib:
+ # Code from module sockets:
+ # Code from module sockets-tests:
+ # Code from module socklen:
# Code from module ssize_t:
# Code from module stat:
# Code from module stat-macros:
# Code from module stat-tests:
+ # Code from module stat-time:
+ # Code from module stat-time-tests:
# Code from module std-gnu11:
# Code from module stdalign:
# Code from module stdalign-tests:
@@ -7084,18 +7092,28 @@ fi
# Code from module strerror:
# Code from module strerror-override:
# Code from module strerror-tests:
+ # Code from module strerror_r-posix:
+ # Code from module strerror_r-posix-tests:
# Code from module string:
# Code from module string-tests:
# Code from module strverscmp:
# Code from module strverscmp-tests:
# Code from module symlink:
# Code from module symlink-tests:
+ # Code from module sys_ioctl:
+ # Code from module sys_ioctl-tests:
+ # Code from module sys_select:
+ # Code from module sys_select-tests:
+ # Code from module sys_socket:
+ # Code from module sys_socket-tests:
# Code from module sys_stat:
# Code from module sys_stat-tests:
# Code from module sys_time:
# Code from module sys_time-tests:
# Code from module sys_types:
# Code from module sys_types-tests:
+ # Code from module sys_uio:
+ # Code from module sys_uio-tests:
# Code from module tempname:
# Code from module test-framework-sh:
# Code from module test-framework-sh-tests:
@@ -7411,6 +7429,7 @@ fi
GNULIB_WCSSTR=0;
GNULIB_WCSTOK=0;
GNULIB_WCSWIDTH=0;
+ GNULIB_WCSFTIME=0;
HAVE_BTOWC=1;
HAVE_MBSINIT=1;
HAVE_MBRTOWC=1;
@@ -7448,6 +7467,7 @@ fi
HAVE_WCSSTR=1;
HAVE_WCSTOK=1;
HAVE_WCSWIDTH=1;
+ HAVE_WCSFTIME=1;
HAVE_DECL_WCTOB=1;
HAVE_DECL_WCWIDTH=1;
REPLACE_MBSTATE_T=0;
@@ -7463,6 +7483,7 @@ fi
REPLACE_WCSNRTOMBS=0;
REPLACE_WCWIDTH=0;
REPLACE_WCSWIDTH=0;
+ REPLACE_WCSFTIME=0;
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
@@ -7535,7 +7556,7 @@ This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
C99 mode. You have four options:
- Add the flag -fgnu89-inline to CC and reconfigure, or
- Fix your include files, using parts of
- <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
+ <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
- Use a gcc version older than 4.3, or
- Don't use the flags -std=c99 or -std=gnu99.
Configuration aborted." "$LINENO" 5
@@ -7601,8 +7622,14 @@ else
struct tm t;
char buf[16];
int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if defined __BEOS__ || defined __HAIKU__
+ return 1;
+#else
/* Check whether the given locale name is recognized by the system. */
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
@@ -7610,9 +7637,9 @@ int main () {
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
return 1;
-#else
+# else
if (setlocale (LC_ALL, "") == NULL) return 1;
-#endif
+# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
@@ -7621,32 +7648,33 @@ int main () {
some unit tests fail.
On MirBSD 10, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "UTF-8". */
-#if HAVE_LANGINFO_CODESET
+# if HAVE_LANGINFO_CODESET
{
const char *cs = nl_langinfo (CODESET);
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
|| strcmp (cs, "UTF-8") == 0)
return 1;
}
-#endif
-#ifdef __CYGWIN__
+# endif
+# ifdef __CYGWIN__
/* On Cygwin, avoid locale names without encoding suffix, because the
locale_charset() function relies on the encoding suffix. Note that
LC_ALL is set on the command line. */
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-#endif
+# endif
/* Check whether in the abbreviation of the second month, the second
character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
one byte long. This excludes the UTF-8 encoding. */
t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
-#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
+# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
-#endif
+# endif
return 0;
+#endif
}
_ACEOF
@@ -7736,6 +7764,7 @@ printf "%s\n" "$gt_cv_locale_fr" >&6; }
GNULIB_QSORT_R=0;
GNULIB_RANDOM=0;
GNULIB_RANDOM_R=0;
+ GNULIB_REALLOCARRAY=0;
GNULIB_REALLOC_POSIX=0;
GNULIB_REALPATH=0;
GNULIB_RPMATCH=0;
@@ -7754,6 +7783,7 @@ printf "%s\n" "$gt_cv_locale_fr" >&6; }
HAVE_DECL_GETLOADAVG=1;
HAVE_GETSUBOPT=1;
HAVE_GRANTPT=1;
+ HAVE_DECL_INITSTATE=1;
HAVE_MKDTEMP=1;
HAVE_MKOSTEMP=1;
HAVE_MKOSTEMPS=1;
@@ -7766,11 +7796,13 @@ printf "%s\n" "$gt_cv_locale_fr" >&6; }
HAVE_RANDOM=1;
HAVE_RANDOM_H=1;
HAVE_RANDOM_R=1;
+ HAVE_REALLOCARRAY=1;
HAVE_REALPATH=1;
HAVE_RPMATCH=1;
HAVE_SECURE_GETENV=1;
HAVE_SETENV=1;
HAVE_DECL_SETENV=1;
+ HAVE_DECL_SETSTATE=1;
HAVE_STRTOD=1;
HAVE_STRTOLL=1;
HAVE_STRTOULL=1;
@@ -7855,6 +7887,8 @@ then :
case "$host_os" in
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_realpath_works="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_func_realpath_works="guessing no" ;;
esac
@@ -8092,6 +8126,7 @@ printf "%s\n" "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
GNULIB_SLEEP=0;
GNULIB_SYMLINK=0;
GNULIB_SYMLINKAT=0;
+ GNULIB_TRUNCATE=0;
GNULIB_TTYNAME_R=0;
GNULIB_UNISTD_H_NONBLOCKING=0;
GNULIB_UNISTD_H_SIGPIPE=0;
@@ -8128,6 +8163,7 @@ printf "%s\n" "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
HAVE_SLEEP=1;
HAVE_SYMLINK=1;
HAVE_SYMLINKAT=1;
+ HAVE_TRUNCATE=1;
HAVE_UNLINKAT=1;
HAVE_USLEEP=1;
HAVE_DECL_ENVIRON=1;
@@ -8146,6 +8182,7 @@ printf "%s\n" "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
REPLACE_CLOSE=0;
REPLACE_DUP=0;
REPLACE_DUP2=0;
+ REPLACE_FACCESSAT=0;
REPLACE_FCHOWNAT=0;
REPLACE_FTRUNCATE=0;
REPLACE_GETCWD=0;
@@ -8168,6 +8205,7 @@ printf "%s\n" "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
REPLACE_SLEEP=0;
REPLACE_SYMLINK=0;
REPLACE_SYMLINKAT=0;
+ REPLACE_TRUNCATE=0;
REPLACE_TTYNAME_R=0;
REPLACE_UNLINK=0;
REPLACE_UNLINKAT=0;
@@ -8902,7 +8940,12 @@ then :
else
if test "$cross_compiling" = yes
then :
- gl_cv_header_working_fcntl_h=cross-compiling
+ case "$host_os" in
+ # Guess 'no' on native Windows.
+ mingw*) gl_cv_header_working_fcntl_h='no' ;;
+ *) gl_cv_header_working_fcntl_h=cross-compiling ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9014,6 +9057,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
+
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; }
@@ -9069,6 +9113,7 @@ fi
GNULIB_MKNODAT=0;
GNULIB_STAT=0;
GNULIB_UTIMENSAT=0;
+ GNULIB_OVERRIDES_STRUCT_STAT=0;
HAVE_FCHMODAT=1;
HAVE_FSTATAT=1;
HAVE_FUTIMENS=1;
@@ -9090,19 +9135,6 @@ fi
REPLACE_STAT=0;
REPLACE_UTIMENSAT=0;
-
-
-
- if test $ac_cv_func__set_invalid_parameter_handler = yes; then
- HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
-
-printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
-
- else
- HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
- fi
-
-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
printf %s "checking whether stat file-mode macros are broken... " >&6; }
if test ${ac_cv_header_stat_broken+y}
@@ -9186,7 +9218,42 @@ printf "%s\n" "$gl_cv_type_off_t_64" >&6; }
else
WINDOWS_64_BIT_OFF_T=0
fi
- WINDOWS_64_BIT_ST_SIZE=1
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
+printf %s "checking for 64-bit st_size... " >&6; }
+if test ${gl_cv_member_st_size_64+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ struct stat buf;
+ int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_member_st_size_64=yes
+else
+ gl_cv_member_st_size_64=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
+printf "%s\n" "$gl_cv_member_st_size_64" >&6; }
+ if test $gl_cv_member_st_size_64 = no; then
+ WINDOWS_64_BIT_ST_SIZE=1
+ else
+ WINDOWS_64_BIT_ST_SIZE=0
+ fi
;;
*)
WINDOWS_64_BIT_OFF_T=0
@@ -9282,14 +9349,14 @@ printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
+ WINDOWS_STAT_TIMESPEC=0
+
+
- if test $WINDOWS_64_BIT_ST_SIZE = 1; then
-printf "%s\n" "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
- fi
ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
#include <sys/stat.h>
@@ -10081,33 +10148,12 @@ printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; }
-
- REPLACE_GETOPT=0
- if test -n "$gl_replace_getopt"; then
- REPLACE_GETOPT=1
- fi
-
- if test $REPLACE_GETOPT = 1; then
-
- GETOPT_H=getopt.h
-
-printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
-
-
-
- fi
-
-ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
-if test "x$ac_cv_have_decl_getenv" = xyes
-then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
-
-printf "%s\n" "#define HAVE_DECL_GETENV $ac_have_decl" >>confdefs.h
-
-
+ GNULIB_GETTIMEOFDAY=0;
+ HAVE_GETTIMEOFDAY=1;
+ HAVE_STRUCT_TIMEVAL=1;
+ HAVE_SYS_TIME_H=1;
+ REPLACE_GETTIMEOFDAY=0;
+ REPLACE_STRUCT_TIMEVAL=0;
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
printf %s "checking for C/C++ restrict keyword... " >&6; }
@@ -10158,14 +10204,12 @@ printf "%s\n" "$ac_cv_c_restrict" >&6; }
esac
- GNULIB_GETTIMEOFDAY=0;
- HAVE_GETTIMEOFDAY=1;
- HAVE_STRUCT_TIMEVAL=1;
- HAVE_SYS_TIME_H=1;
- HAVE_TIMEZONE_T=0;
- REPLACE_GETTIMEOFDAY=0;
- REPLACE_STRUCT_TIMEVAL=0;
+ GNULIB_IOCTL=0;
+ SYS_IOCTL_H_HAVE_WINSOCK2_H=0;
+ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
+
+ REPLACE_IOCTL=0;
@@ -10413,6 +10457,465 @@ fi
+ NEED_LOCALTIME_BUFFER=0
+
+
+ GNULIB_CTIME=0;
+ GNULIB_MKTIME=0;
+ GNULIB_LOCALTIME=0;
+ GNULIB_NANOSLEEP=0;
+ GNULIB_STRFTIME=0;
+ GNULIB_STRPTIME=0;
+ GNULIB_TIMEGM=0;
+ GNULIB_TIME_R=0;
+ GNULIB_TIME_RZ=0;
+ GNULIB_TZSET=0;
+ HAVE_DECL_LOCALTIME_R=1;
+ HAVE_NANOSLEEP=1;
+ HAVE_STRPTIME=1;
+ HAVE_TIMEGM=1;
+ HAVE_TZSET=1;
+ HAVE_TIMEZONE_T=0;
+ REPLACE_CTIME=GNULIB_PORTCHECK;
+ REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
+ REPLACE_MKTIME=GNULIB_PORTCHECK;
+ REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
+ REPLACE_STRFTIME=GNULIB_PORTCHECK;
+ REPLACE_TIMEGM=GNULIB_PORTCHECK;
+ REPLACE_TZSET=GNULIB_PORTCHECK;
+
+ : ${GNULIB_GETTIMEOFDAY=0};
+ REPLACE_GMTIME=0;
+ REPLACE_LOCALTIME=0;
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef _MSC_VER
+MicrosoftCompiler
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "MicrosoftCompiler" >/dev/null 2>&1
+then :
+ gl_asmext='asm'
+ gl_c_asm_opt='-c -Fa'
+
+else
+ gl_asmext='s'
+ gl_c_asm_opt='-S'
+
+fi
+rm -rf conftest*
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host CPU and C ABI" >&5
+printf %s "checking host CPU and C ABI... " >&6; }
+if test ${gl_cv_host_cpu_c_abi+y}
+then :
+ printf %s "(cached) " >&6
+else
+ case "$host_cpu" in
+
+ i[4567]86 )
+ gl_cv_host_cpu_c_abi=i386
+ ;;
+
+ x86_64 )
+ # On x86_64 systems, the C compiler may be generating code in one of
+ # these ABIs:
+ # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
+ # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
+ # with native Windows (mingw, MSVC).
+ # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
+ # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if (defined __x86_64__ || defined __amd64__ \
+ || defined _M_X64 || defined _M_AMD64)
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __ILP32__ || defined _ILP32
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi=x86_64-x32
+else
+ gl_cv_host_cpu_c_abi=x86_64
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ gl_cv_host_cpu_c_abi=i386
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ;;
+
+ alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
+ gl_cv_host_cpu_c_abi=alpha
+ ;;
+
+ arm* | aarch64 )
+ # Assume arm with EABI.
+ # On arm64 systems, the C compiler may be generating code in one of
+ # these ABIs:
+ # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
+ # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
+ # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __aarch64__
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __ILP32__ || defined _ILP32
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi=arm64-ilp32
+else
+ gl_cv_host_cpu_c_abi=arm64
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ # Don't distinguish little-endian and big-endian arm, since they
+ # don't require different machine code for simple operations and
+ # since the user can distinguish them through the preprocessor
+ # defines __ARMEL__ vs. __ARMEB__.
+ # But distinguish arm which passes floating-point arguments and
+ # return values in integer registers (r0, r1, ...) - this is
+ # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which
+ # passes them in float registers (s0, s1, ...) and double registers
+ # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer
+ # sets the preprocessor defines __ARM_PCS (for the first case) and
+ # __ARM_PCS_VFP (for the second case), but older GCC does not.
+ echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c
+ # Look for a reference to the register d0 in the .s file.
+ { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; } >/dev/null 2>&1
+ if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then
+ gl_cv_host_cpu_c_abi=armhf
+ else
+ gl_cv_host_cpu_c_abi=arm
+ fi
+ rm -f conftest*
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ;;
+
+ hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
+ # On hppa, the C compiler may be generating 32-bit code or 64-bit
+ # code. In the latter case, it defines _LP64 and __LP64__.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi=hppa64
+else
+ gl_cv_host_cpu_c_abi=hppa
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ;;
+
+ ia64* )
+ # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
+ # 32-bit code. In the latter case, it defines _ILP32.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef _ILP32
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi=ia64-ilp32
+else
+ gl_cv_host_cpu_c_abi=ia64
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ;;
+
+ mips* )
+ # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
+ # at 32.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi=mips64
+else
+ # In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but
+ # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIN32.
+ # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but
+ # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIO32.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if (_MIPS_SIM == _ABIN32)
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi=mipsn32
+else
+ gl_cv_host_cpu_c_abi=mips
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ;;
+
+ powerpc* )
+ # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
+ # No need to distinguish them here; the caller may distinguish
+ # them based on the OS.
+ # On powerpc64 systems, the C compiler may still be generating
+ # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
+ # be generating 64-bit code.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __powerpc64__ || defined _ARCH_PPC64
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ # On powerpc64, there are two ABIs on Linux: The AIX compatible
+ # one and the ELFv2 one. The latter defines _CALL_ELF=2.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined _CALL_ELF && _CALL_ELF == 2
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi=powerpc64-elfv2
+else
+ gl_cv_host_cpu_c_abi=powerpc64
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+else
+ gl_cv_host_cpu_c_abi=powerpc
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ;;
+
+ rs6000 )
+ gl_cv_host_cpu_c_abi=powerpc
+ ;;
+
+ riscv32 | riscv64 )
+ # There are 2 architectures (with variants): rv32* and rv64*.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if __riscv_xlen == 64
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ cpu=riscv64
+else
+ cpu=riscv32
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
+ # Size of 'long' and 'void *':
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ main_abi=lp64
+else
+ main_abi=ilp32
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ # Float ABIs:
+ # __riscv_float_abi_double:
+ # 'float' and 'double' are passed in floating-point registers.
+ # __riscv_float_abi_single:
+ # 'float' are passed in floating-point registers.
+ # __riscv_float_abi_soft:
+ # No values are passed in floating-point registers.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __riscv_float_abi_double
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ float_abi=d
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __riscv_float_abi_single
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ float_abi=f
+else
+ float_abi=''
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}"
+ ;;
+
+ s390* )
+ # On s390x, the C compiler may be generating 64-bit (= s390x) code
+ # or 31-bit (= s390) code.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __LP64__ || defined __s390x__
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi=s390x
+else
+ gl_cv_host_cpu_c_abi=s390
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ;;
+
+ sparc | sparc64 )
+ # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
+ # C compiler still generates 32-bit code.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __sparcv9 || defined __arch64__
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi=sparc64
+else
+ gl_cv_host_cpu_c_abi=sparc
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ;;
+
+ *)
+ gl_cv_host_cpu_c_abi="$host_cpu"
+ ;;
+ esac
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi" >&5
+printf "%s\n" "$gl_cv_host_cpu_c_abi" >&6; }
+
+ HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'`
+ HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi"
+
+
+
+ # This was
+ # AC_DEFINE_UNQUOTED([__${HOST_CPU}__])
+ # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__])
+ # earlier, but KAI C++ 3.2d doesn't like this.
+ sed -e 's/-/_/g' >> confdefs.h <<EOF
+#ifndef __${HOST_CPU}__
+#define __${HOST_CPU}__ 1
+#endif
+#ifndef __${HOST_CPU_C_ABI}__
+#define __${HOST_CPU_C_ABI}__ 1
+#endif
+EOF
+
+
+
+
GNULIB_NL_LANGINFO=0;
HAVE_NL_LANGINFO=1;
@@ -10821,38 +11324,12 @@ if test "${PATH_SEPARATOR+set}" != set; then
}
fi
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
+if test -n "$LD"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
+printf %s "checking for ld... " >&6; }
+elif test "$GCC" = yes; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
printf %s "checking for ld used by $CC... " >&6; }
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [\\/]* | ?:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the pathname of ld
- ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
- while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
elif test "$with_gnu_ld" = yes; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
printf %s "checking for GNU ld... " >&6; }
@@ -10860,45 +11337,132 @@ else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
printf %s "checking for non-GNU ld... " >&6; }
fi
-if test ${acl_cv_path_LD+y}
+if test -n "$LD"; then
+ # Let the user override the test with a path.
+ :
+else
+ if test ${acl_cv_path_LD+y}
then :
printf %s "(cached) " >&6
else
- if test -z "$LD"; then
- acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$acl_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- acl_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some variants of GNU ld only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
- ;;
- *)
- test "$with_gnu_ld" != yes && break
- ;;
+
+ acl_cv_path_LD= # Final result of this test
+ ac_prog=ld # Program to search in $PATH
+ if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $acl_output in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
+ while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
+ acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
+ done
+ # Got the pathname. No search in PATH is needed.
+ acl_cv_path_LD="$acl_output"
+ ac_prog=
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
esac
fi
- done
- IFS="$acl_save_ifs"
+ if test -n "$ac_prog"; then
+ # Search for $ac_prog in $PATH.
+ acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$acl_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_ifs"
+ fi
+ case $host in
+ *-*-aix*)
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __powerpc64__ || defined _ARCH_PPC64
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ # The compiler produces 64-bit code. Add option '-b64' so that the
+ # linker groks 64-bit object files.
+ case "$acl_cv_path_LD " in
+ *" -b64 "*) ;;
+ *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
+ esac
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ;;
+ sparc64-*-netbsd*)
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __sparcv9 || defined __arch64__
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
else
- acl_cv_path_LD="$LD" # Let the user override the test with a path.
+ # The compiler produces 32-bit code. Add option '-m elf32_sparc'
+ # so that the linker groks 32-bit object files.
+ case "$acl_cv_path_LD " in
+ *" -m elf32_sparc "*) ;;
+ *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
+ esac
+
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ;;
+ esac
+
fi
-LD="$acl_cv_path_LD"
+ LD="$acl_cv_path_LD"
+fi
if test -n "$LD"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
printf "%s\n" "$LD" >&6; }
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
+ as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
fi
-test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
if test ${acl_cv_prog_gnu_ld+y}
@@ -10958,11 +11522,18 @@ fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
+printf %s "checking for the common suffixes of directories in the library search path... " >&6; }
+if test ${acl_cv_libdirstems+y}
+then :
+ printf %s "(cached) " >&6
+else
acl_libdirstem=lib
- acl_libdirstem2=
- case "$host_os" in
- solaris*)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
+ acl_libdirstem2=
+ case "$host_os" in
+ solaris*)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
printf %s "checking for 64-bit host... " >&6; }
if test ${gl_cv_solaris_64bit+y}
then :
@@ -10970,56 +11541,75 @@ then :
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
#ifdef _LP64
-sixtyfour bits
-#endif
+ int ok;
+ #else
+ error fail
+ #endif
_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "sixtyfour bits" >/dev/null 2>&1
+if ac_fn_c_try_compile "$LINENO"
then :
gl_cv_solaris_64bit=yes
else
gl_cv_solaris_64bit=no
fi
-rm -rf conftest*
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
printf "%s\n" "$gl_cv_solaris_64bit" >&6; }
- if test $gl_cv_solaris_64bit = yes; then
- acl_libdirstem=lib/64
- case "$host_cpu" in
- sparc*) acl_libdirstem2=lib/sparcv9 ;;
- i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
- esac
- fi
- ;;
- *)
- searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
- if test -n "$searchpath"; then
- acl_save_IFS="${IFS= }"; IFS=":"
- for searchdir in $searchpath; do
- if test -d "$searchdir"; then
- case "$searchdir" in
- */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
- */../ | */.. )
- # Better ignore directories of this form. They are misleading.
- ;;
- *) searchdir=`cd "$searchdir" && pwd`
- case "$searchdir" in
- */lib64 ) acl_libdirstem=lib64 ;;
- esac ;;
- esac
- fi
- done
- IFS="$acl_save_IFS"
- fi
- ;;
- esac
- test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
+ if test $gl_cv_solaris_64bit = yes; then
+ acl_libdirstem=lib/64
+ case "$host_cpu" in
+ sparc*) acl_libdirstem2=lib/sparcv9 ;;
+ i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
+ esac
+ fi
+ ;;
+ *)
+ case "$gl_cv_host_cpu_c_abi" in
+ i386 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | s390 | sparc)
+ ;;
+ *) # x86_64 | arm64 | hppa64 | ia64 | mips64 | powerpc64* | s390x | sparc64 | ...
+ searchpath=`(if test -f /usr/bin/gcc \
+ && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \
+ LC_ALL=C /usr/bin/gcc -print-search-dirs; \
+ else \
+ LC_ALL=C $CC -print-search-dirs; \
+ fi) 2>/dev/null \
+ | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+ */../ | */.. )
+ # Better ignore directories of this form. They are misleading.
+ ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib64 ) acl_libdirstem=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
+ acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2"
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
+printf "%s\n" "$acl_cv_libdirstems" >&6; }
+ # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2.
+ acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
+ acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'`
@@ -11096,6 +11686,9 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
+ case " $LDFLAGS " in
+ *" -static "*) gl_cv_have_weak=no ;;
+ esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
@@ -11122,7 +11715,7 @@ fi
#
# If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
# needs -pthread for some reason. See:
- # http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00023.html
+ # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
save_LIBS=$LIBS
for gl_pthread in '' '-pthread'; do
LIBS="$LIBS $gl_pthread"
@@ -11431,7 +12024,7 @@ then :
additional_includedir="$withval/include"
additional_libdir="$withval/$acl_libdirstem"
if test "$acl_libdirstem2" != "$acl_libdirstem" \
- && ! test -d "$withval/$acl_libdirstem"; then
+ && test ! -d "$withval/$acl_libdirstem"; then
additional_libdir="$withval/$acl_libdirstem2"
fi
fi
@@ -11965,7 +12558,7 @@ printf "%s\n" "$gl_threads_api" >&6; }
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
printf %s "checking whether lstat correctly handles trailing slash... " >&6; }
if test ${gl_cv_func_lstat_dereferences_slashed_symlink+y}
then :
@@ -11976,9 +12569,12 @@ else
if test "$cross_compiling" = yes
then :
case "$host_os" in
- *-gnu*)
+ *-gnu* | gnu*)
# Guess yes on glibc systems.
gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
+ mingw*)
+ # Guess no on native Windows.
+ gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
*)
# If we don't know, assume the worst.
gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
@@ -12157,7 +12753,7 @@ else
then :
case "$host_os" in
# Guess yes on platforms where we know the result.
- *-gnu* | freebsd* | netbsd* | openbsd* \
+ *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
| hpux* | solaris* | cygwin* | mingw*)
ac_cv_func_malloc_0_nonnull=yes ;;
# If we don't know, assume the worst.
@@ -12405,9 +13001,14 @@ struct tm t;
char buf[16];
int main ()
{
- const char *p;
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if defined __BEOS__ || defined __HAIKU__
+ return 1;
+#else
/* Check whether the given locale name is recognized by the system. */
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
@@ -12415,9 +13016,9 @@ int main ()
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
return 1;
-#else
+# else
if (setlocale (LC_ALL, "") == NULL) return 1;
-#endif
+# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
@@ -12426,32 +13027,36 @@ int main ()
some unit tests fail.
On MirBSD 10, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "UTF-8". */
-#if HAVE_LANGINFO_CODESET
+# if HAVE_LANGINFO_CODESET
{
const char *cs = nl_langinfo (CODESET);
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
|| strcmp (cs, "UTF-8") == 0)
return 1;
}
-#endif
-#ifdef __CYGWIN__
+# endif
+# ifdef __CYGWIN__
/* On Cygwin, avoid locale names without encoding suffix, because the
locale_charset() function relies on the encoding suffix. Note that
LC_ALL is set on the command line. */
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-#endif
+# endif
/* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
on Cygwin 1.5.x. */
if (MB_CUR_MAX == 1)
return 1;
/* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
This excludes the UTF-8 encoding (except on MirBSD). */
- t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
- if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
- for (p = buf; *p != '\0'; p++)
- if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
- return 1;
+ {
+ const char *p;
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ }
return 0;
+#endif
}
_ACEOF
@@ -12546,9 +13151,14 @@ struct tm t;
char buf[16];
int main ()
{
- const char *p;
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if defined __BEOS__ || defined __HAIKU__
+ return 1;
+#else
/* Check whether the given locale name is recognized by the system. */
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
@@ -12556,9 +13166,9 @@ int main ()
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
return 1;
-#else
+# else
if (setlocale (LC_ALL, "") == NULL) return 1;
-#endif
+# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
@@ -12567,32 +13177,36 @@ int main ()
some unit tests fail.
On MirBSD 10, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "UTF-8". */
-#if HAVE_LANGINFO_CODESET
+# if HAVE_LANGINFO_CODESET
{
const char *cs = nl_langinfo (CODESET);
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
|| strcmp (cs, "UTF-8") == 0)
return 1;
}
-#endif
-#ifdef __CYGWIN__
+# endif
+# ifdef __CYGWIN__
/* On Cygwin, avoid locale names without encoding suffix, because the
locale_charset() function relies on the encoding suffix. Note that
LC_ALL is set on the command line. */
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-#endif
+# endif
/* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
This excludes the UTF-8 encoding (except on MirBSD). */
- t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
- if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
- for (p = buf; *p != '\0'; p++)
- if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
- return 1;
+ {
+ const char *p;
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ }
/* Check whether a typical GB18030 multibyte sequence is recognized as a
single wide character. This excludes the GB2312 and GBK encodings. */
if (mblen ("\203\062\332\066", 5) != 4)
return 1;
return 0;
+#endif
}
_ACEOF
@@ -13339,10 +13953,11 @@ then :
else
case "$host_os" in
- # Guess no on AIX and glibc systems.
- aix* | *-gnu*)
- gl_cv_func_mbrtowc_empty_input="guessing no" ;;
- *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
+ # Guess no on AIX and glibc systems.
+ aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
+ *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
esac
if test "$cross_compiling" = yes
then :
@@ -13376,7 +13991,7 @@ fi
printf "%s\n" "$gl_cv_func_mbrtowc_empty_input" >&6; }
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
printf %s "checking whether the C locale is free of encoding errors... " >&6; }
if test ${gl_cv_C_locale_sans_EILSEQ+y}
then :
@@ -13387,7 +14002,11 @@ else
if test "$cross_compiling" = yes
then :
- :
+ case "$host_os" in
+ # Guess yes on native Windows.
+ mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -13428,6 +14047,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
+
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
printf "%s\n" "$gl_cv_C_locale_sans_EILSEQ" >&6; }
@@ -13487,6 +14107,7 @@ printf "%s\n" "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
+ GNULIB_EXPLICIT_BZERO=0;
GNULIB_FFSL=0;
GNULIB_FFSLL=0;
GNULIB_MEMCHR=0;
@@ -13525,7 +14146,8 @@ printf "%s\n" "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
GNULIB_STRSIGNAL=0;
GNULIB_STRVERSCMP=0;
HAVE_MBSLEN=0;
- HAVE_FFSL=1;
+ HAVE_EXPLICIT_BZERO=1;
+ HAVE_FFSL=1;
HAVE_FFSLL=1;
HAVE_MEMCHR=1;
HAVE_DECL_MEMMEM=1;
@@ -13548,23 +14170,24 @@ printf "%s\n" "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
REPLACE_MEMCHR=0;
REPLACE_MEMMEM=0;
REPLACE_STPNCPY=0;
+ REPLACE_STRCHRNUL=0;
REPLACE_STRDUP=0;
+ REPLACE_STRNCAT=0;
+ REPLACE_STRNDUP=0;
+ REPLACE_STRNLEN=0;
REPLACE_STRSTR=0;
REPLACE_STRCASESTR=0;
- REPLACE_STRCHRNUL=0;
+ REPLACE_STRTOK_R=0;
REPLACE_STRERROR=0;
REPLACE_STRERROR_R=0;
- REPLACE_STRNCAT=0;
- REPLACE_STRNDUP=0;
- REPLACE_STRNLEN=0;
REPLACE_STRSIGNAL=0;
- REPLACE_STRTOK_R=0;
UNDEFINE_STRTOK_R=0;
+
# Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
# fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
# irrelevant for anonymous mappings.
@@ -13636,10 +14259,10 @@ printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
if test $HAVE_MEMCHR = 1; then
# Detect platform-specific bugs in some versions of glibc:
# memchr should not dereference anything with length 0
- # http://bugzilla.redhat.com/499689
+ # https://bugzilla.redhat.com/show_bug.cgi?id=499689
# memchr should not dereference overestimated length after a match
- # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
- # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
+ # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
+ # https://sourceware.org/bugzilla/show_bug.cgi?id=10162
# Assume that memchr works on platforms that lack mprotect.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
printf %s "checking whether memchr works... " >&6; }
@@ -13649,7 +14272,13 @@ then :
else
if test "$cross_compiling" = yes
then :
- gl_cv_func_memchr_works="guessing no"
+ case "$host_os" in
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_memchr_works="guessing yes" ;;
+ # Be pessimistic for now.
+ *) gl_cv_func_memchr_works="guessing no" ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -13716,12 +14345,14 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
+
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
printf "%s\n" "$gl_cv_func_memchr_works" >&6; }
- if test "$gl_cv_func_memchr_works" != yes; then
- REPLACE_MEMCHR=1
- fi
+ case "$gl_cv_func_memchr_works" in
+ *yes) ;;
+ *) REPLACE_MEMCHR=1 ;;
+ esac
fi
ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
@@ -13818,6 +14449,19 @@ printf "%s\n" "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
+ if test $ac_cv_func__set_invalid_parameter_handler = yes; then
+ HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
+
+printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
+
+ else
+ HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
+ fi
+
+
+
+
+
gl_cv_c_multiarch=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13924,11 +14568,6 @@ esac
-
-
-
-
-
# Check whether --with-selinux was given.
if test ${with_selinux+y}
then :
@@ -14074,8 +14713,8 @@ else
char o[sizeof n == m * sizeof n[0] ? 1 : -1];
char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
/* Catch a bug in an HP-UX C compiler. See
- http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
- http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
*/
Bool q = true;
Bool *pq = &q;
@@ -14522,7 +15161,12 @@ if ac_fn_c_try_compile "$LINENO"
then :
if test "$cross_compiling" = yes
then :
- gl_cv_header_working_stdint_h=yes
+ case "$host_os" in
+ # Guess yes on native Windows.
+ mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
+ # In general, assume it works.
+ *) gl_cv_header_working_stdint_h="guessing yes" ;;
+ esac
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14623,16 +15267,17 @@ printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; }
HAVE_SYS_BITYPES_H=0
HAVE_SYS_INTTYPES_H=0
STDINT_H=stdint.h
- if test "$gl_cv_header_working_stdint_h" = yes; then
- HAVE_C99_STDINT_H=1
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
+ case "$gl_cv_header_working_stdint_h" in
+ *yes)
+ HAVE_C99_STDINT_H=1
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
printf %s "checking whether stdint.h predates C++11... " >&6; }
if test ${gl_cv_header_stdint_predates_cxx11_h+y}
then :
printf %s "(cached) " >&6
else
gl_cv_header_stdint_predates_cxx11_h=yes
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -14671,30 +15316,30 @@ fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
printf "%s\n" "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
- if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
+ if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
printf "%s\n" "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
printf "%s\n" "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
- fi
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
printf %s "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
if test ${gl_cv_header_stdint_width+y}
then :
printf %s "(cached) " >&6
else
gl_cv_header_stdint_width=no
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- /* Work if build is not clean. */
- #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
- #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
- #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
- #endif
- #include <stdint.h>
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
+ #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+ #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+ #endif
+ #include <stdint.h>
/* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
included before <wchar.h>. */
@@ -14706,7 +15351,7 @@ else
# include <wchar.h>
#endif
- int iw = UINTMAX_WIDTH;
+ int iw = UINTMAX_WIDTH;
int
main (void)
@@ -14724,11 +15369,12 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
printf "%s\n" "$gl_cv_header_stdint_width" >&6; }
- if test "$gl_cv_header_stdint_width" = yes; then
- STDINT_H=
- fi
- else
- ac_fn_c_check_header_compile "$LINENO" "sys/inttypes.h" "ac_cv_header_sys_inttypes_h" "$ac_includes_default"
+ if test "$gl_cv_header_stdint_width" = yes; then
+ STDINT_H=
+ fi
+ ;;
+ *)
+ ac_fn_c_check_header_compile "$LINENO" "sys/inttypes.h" "ac_cv_header_sys_inttypes_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_inttypes_h" = xyes
then :
printf "%s\n" "#define HAVE_SYS_INTTYPES_H 1" >>confdefs.h
@@ -14741,12 +15387,12 @@ then :
fi
- if test $ac_cv_header_sys_inttypes_h = yes; then
- HAVE_SYS_INTTYPES_H=1
- fi
- if test $ac_cv_header_sys_bitypes_h = yes; then
- HAVE_SYS_BITYPES_H=1
- fi
+ if test $ac_cv_header_sys_inttypes_h = yes; then
+ HAVE_SYS_INTTYPES_H=1
+ fi
+ if test $ac_cv_header_sys_bitypes_h = yes; then
+ HAVE_SYS_BITYPES_H=1
+ fi
if test $APPLE_UNIVERSAL_BUILD = 0; then
@@ -15046,7 +15692,8 @@ printf "%s\n" "$ac_res" >&6; }
BITSIZEOF_WINT_T=32
fi
- fi
+ ;;
+ esac
LIMITS_H=limits.h
if test -n "$LIMITS_H"; then
@@ -15082,10 +15729,12 @@ else
if test "$cross_compiling" = yes
then :
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_strerror_0_works="guessing no" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_strerror_0_works="guessing no" ;;
esac
else
@@ -15140,6 +15789,180 @@ printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
+ if test $ac_cv_func_strerror_r = yes; then
+ if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
+printf %s "checking for strerror_r with POSIX signature... " >&6; }
+if test ${gl_cv_func_strerror_r_posix_signature+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+ int strerror_r (int, char *, size_t);
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_func_strerror_r_posix_signature=yes
+else
+ gl_cv_func_strerror_r_posix_signature=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
+printf "%s\n" "$gl_cv_func_strerror_r_posix_signature" >&6; }
+ if test $gl_cv_func_strerror_r_posix_signature = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
+printf %s "checking whether strerror_r works... " >&6; }
+if test ${gl_cv_func_strerror_r_works+y}
+then :
+ printf %s "(cached) " >&6
+else
+ if test "$cross_compiling" = yes
+then :
+
+ case "$host_os" in
+ # Guess no on AIX.
+ aix*) gl_cv_func_strerror_r_works="guessing no";;
+ # Guess no on HP-UX.
+ hpux*) gl_cv_func_strerror_r_works="guessing no";;
+ # Guess no on BSD variants.
+ *bsd*) gl_cv_func_strerror_r_works="guessing no";;
+ # Guess yes otherwise.
+ *) gl_cv_func_strerror_r_works="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <errno.h>
+ #include <string.h>
+
+int
+main (void)
+{
+int result = 0;
+ char buf[79];
+ if (strerror_r (EACCES, buf, 0) < 0)
+ result |= 1;
+ errno = 0;
+ if (strerror_r (EACCES, buf, sizeof buf) != 0)
+ result |= 2;
+ strcpy (buf, "Unknown");
+ if (strerror_r (0, buf, sizeof buf) != 0)
+ result |= 4;
+ if (errno)
+ result |= 8;
+ if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
+ result |= 0x10;
+ errno = 0;
+ *buf = 0;
+ if (strerror_r (-3, buf, sizeof buf) < 0)
+ result |= 0x20;
+ if (errno)
+ result |= 0x40;
+ if (!*buf)
+ result |= 0x80;
+ return result;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_strerror_r_works=yes
+else
+ gl_cv_func_strerror_r_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
+printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
+ else
+
+ if test $ac_cv_func___xpg_strerror_r = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
+printf %s "checking whether __xpg_strerror_r works... " >&6; }
+if test ${gl_cv_func_strerror_r_works+y}
+then :
+ printf %s "(cached) " >&6
+else
+ if test "$cross_compiling" = yes
+then :
+ gl_cv_func_strerror_r_works="guessing no"
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <errno.h>
+ #include <string.h>
+ extern
+ #ifdef __cplusplus
+ "C"
+ #endif
+ int __xpg_strerror_r(int, char *, size_t);
+
+int
+main (void)
+{
+int result = 0;
+ char buf[256] = "^";
+ char copy[256];
+ char *str = strerror (-1);
+ strcpy (copy, str);
+ if (__xpg_strerror_r (-2, buf, 1) == 0)
+ result |= 1;
+ if (*buf)
+ result |= 2;
+ __xpg_strerror_r (-2, buf, 256);
+ if (strcmp (str, copy))
+ result |= 4;
+ return result;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_strerror_r_works=yes
+else
+ gl_cv_func_strerror_r_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
+printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
+ fi
+ fi
+ fi
+ fi
+
+
+
+
+
+
+
@@ -15264,6 +16087,10 @@ fi
+printf "%s\n" "#define _USE_STD_STAT 1" >>confdefs.h
+
+
+
@@ -15344,24 +16171,9 @@ printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
- GNULIB_MKTIME=0;
- GNULIB_NANOSLEEP=0;
- GNULIB_STRPTIME=0;
- GNULIB_TIMEGM=0;
- GNULIB_TIME_R=0;
- GNULIB_TIME_RZ=0;
- HAVE_DECL_LOCALTIME_R=1;
- HAVE_NANOSLEEP=1;
- HAVE_STRPTIME=1;
- HAVE_TIMEGM=1;
- REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
- REPLACE_MKTIME=GNULIB_PORTCHECK;
- REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
- REPLACE_TIMEGM=GNULIB_PORTCHECK;
+ WINDOWS_STAT_INODES=0
+
- : ${GNULIB_GETTIMEOFDAY=0};
- REPLACE_GMTIME=0;
- REPLACE_LOCALTIME=0;
@@ -15712,6 +16524,16 @@ printf "%s\n" "#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
+ if test $ac_cv_header_crtdefs_h = yes; then
+ HAVE_CRTDEFS_H=1
+ else
+ HAVE_CRTDEFS_H=0
+ fi
+
+
+
+
+
GNULIB_ISWBLANK=0;
GNULIB_WCTYPE=0;
GNULIB_ISWCTYPE=0;
@@ -15725,6 +16547,370 @@ printf "%s\n" "#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
+ GNULIB_SOCKET=0;
+ GNULIB_CONNECT=0;
+ GNULIB_ACCEPT=0;
+ GNULIB_BIND=0;
+ GNULIB_GETPEERNAME=0;
+ GNULIB_GETSOCKNAME=0;
+ GNULIB_GETSOCKOPT=0;
+ GNULIB_LISTEN=0;
+ GNULIB_RECV=0;
+ GNULIB_SEND=0;
+ GNULIB_RECVFROM=0;
+ GNULIB_SENDTO=0;
+ GNULIB_SETSOCKOPT=0;
+ GNULIB_SHUTDOWN=0;
+ GNULIB_ACCEPT4=0;
+ HAVE_STRUCT_SOCKADDR_STORAGE=1;
+ HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
+
+ HAVE_SA_FAMILY_T=1;
+ HAVE_ACCEPT4=1;
+
+
+ if test $ac_cv_header_sys_socket_h = no; then
+ ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
+if test "x$ac_cv_header_ws2tcpip_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
+
+fi
+
+ fi
+
+
+
+
+
+ case "$host_os" in
+ osf*)
+
+printf "%s\n" "#define _POSIX_PII_SOCKET 1" >>confdefs.h
+
+ ;;
+ esac
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
+printf %s "checking whether <sys/socket.h> is self-contained... " >&6; }
+if test ${gl_cv_header_sys_socket_h_selfcontained+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/socket.h>
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_header_sys_socket_h_selfcontained=yes
+else
+ gl_cv_header_sys_socket_h_selfcontained=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
+printf "%s\n" "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
+ if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
+ ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
+if test "x$ac_cv_func_shutdown" = xyes
+then :
+ printf "%s\n" "#define HAVE_SHUTDOWN 1" >>confdefs.h
+
+fi
+
+ if test $ac_cv_func_shutdown = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
+printf %s "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
+if test ${gl_cv_header_sys_socket_h_shut+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/socket.h>
+int
+main (void)
+{
+int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_header_sys_socket_h_shut=yes
+else
+ gl_cv_header_sys_socket_h_shut=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
+printf "%s\n" "$gl_cv_header_sys_socket_h_shut" >&6; }
+ if test $gl_cv_header_sys_socket_h_shut = no; then
+ SYS_SOCKET_H='sys/socket.h'
+ fi
+ fi
+ fi
+ # We need to check for ws2tcpip.h now.
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_sys_socket_h='<'sys/socket.h'>'
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
+printf %s "checking absolute name of <sys/socket.h>... " >&6; }
+if test ${gl_cv_next_sys_socket_h+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ if test $ac_cv_header_sys_socket_h = yes; then
+
+
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/socket.h>
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'sys/socket.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_sys_socket_h
+ gl_cv_next_sys_socket_h='"'$gl_header'"'
+ else
+ gl_cv_next_sys_socket_h='<'sys/socket.h'>'
+ fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
+printf "%s\n" "$gl_cv_next_sys_socket_h" >&6; }
+ fi
+ NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'sys/socket.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_sys_socket_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
+
+
+
+
+ if test $ac_cv_header_sys_socket_h = yes; then
+ HAVE_SYS_SOCKET_H=1
+ HAVE_WS2TCPIP_H=0
+ else
+ HAVE_SYS_SOCKET_H=0
+ if test $ac_cv_header_ws2tcpip_h = yes; then
+ HAVE_WS2TCPIP_H=1
+ else
+ HAVE_WS2TCPIP_H=0
+ fi
+ fi
+
+
+
+ ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
+ /* sys/types.h is not needed according to POSIX, but the
+ sys/socket.h in i386-unknown-freebsd4.10 and
+ powerpc-apple-darwin5.5 required it. */
+#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+
+"
+if test "x$ac_cv_type_struct_sockaddr_storage" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
+
+
+fi
+ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
+ /* sys/types.h is not needed according to POSIX, but the
+ sys/socket.h in i386-unknown-freebsd4.10 and
+ powerpc-apple-darwin5.5 required it. */
+#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+
+"
+if test "x$ac_cv_type_sa_family_t" = xyes
+then :
+
+printf "%s\n" "#define HAVE_SA_FAMILY_T 1" >>confdefs.h
+
+
+fi
+
+ if test $ac_cv_type_struct_sockaddr_storage = no; then
+ HAVE_STRUCT_SOCKADDR_STORAGE=0
+ fi
+ if test $ac_cv_type_sa_family_t = no; then
+ HAVE_SA_FAMILY_T=0
+ fi
+ if test $ac_cv_type_struct_sockaddr_storage != no; then
+ ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
+ #ifdef HAVE_SYS_SOCKET_H
+ #include <sys/socket.h>
+ #endif
+ #ifdef HAVE_WS2TCPIP_H
+ #include <ws2tcpip.h>
+ #endif
+
+"
+if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1" >>confdefs.h
+
+
+else
+ HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
+fi
+
+ fi
+ if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
+ || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
+ SYS_SOCKET_H='sys/socket.h'
+ fi
+
+
+
+
+ if test $ac_cv_header_sys_socket_h != yes; then
+ ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
+if test "x$ac_cv_header_winsock2_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
+
+fi
+
+ fi
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ HAVE_WINSOCK2_H=1
+ UNISTD_H_HAVE_WINSOCK2_H=1
+ SYS_IOCTL_H_HAVE_WINSOCK2_H=1
+ else
+ HAVE_WINSOCK2_H=0
+ fi
+
+
+
+
+ for gl_func in socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4; do
+ as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+printf %s "checking whether $gl_func is declared without a macro... " >&6; }
+if eval test \${$as_gl_Symbol+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Some systems require prerequisite headers. */
+#include <sys/types.h>
+#include <sys/socket.h>
+
+int
+main (void)
+{
+#undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"
+then :
+ cat >>confdefs.h <<_ACEOF
+#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+ GNULIB_INET_NTOP=0;
+ GNULIB_INET_PTON=0;
+ HAVE_DECL_INET_NTOP=1;
+ HAVE_DECL_INET_PTON=1;
+ REPLACE_INET_NTOP=0;
+ REPLACE_INET_PTON=0;
+
+
+
GNULIB_OPENDIR=0;
GNULIB_READDIR=0;
GNULIB_REWINDDIR=0;
@@ -15805,6 +16991,7 @@ printf "%s\n" "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
printf %s "checking whether stdin defaults to large file offsets... " >&6; }
if test ${gl_cv_var_stdin_large_offset+y}
@@ -15918,7 +17105,12 @@ else
echo hello world > conftest.txt
if test "$cross_compiling" = yes
then :
- gl_cv_func_fflush_stdin=cross
+ case "$host_os" in
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
+ *) gl_cv_func_fflush_stdin=cross ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15941,16 +17133,16 @@ FILE *f = fopen ("conftest.txt", "r");
return 1;
fd = fileno (f);
if (fd < 0 || fread (buffer, 1, 5, f) != 5)
- return 2;
+ { fclose (f); return 2; }
/* For deterministic results, ensure f read a bigger buffer. */
if (lseek (fd, 0, SEEK_CUR) == 5)
- return 3;
+ { fclose (f); return 3; }
/* POSIX requires fflush-fseek to set file offset of fd. This fails
on BSD systems and on mingw. */
if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
- return 4;
+ { fclose (f); return 4; }
if (lseek (fd, 0, SEEK_CUR) != 5)
- return 5;
+ { fclose (f); return 5; }
/* Verify behaviour of fflush after ungetc. See
<http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
/* Verify behaviour of fflush after a backup ungetc. This fails on
@@ -15959,14 +17151,15 @@ FILE *f = fopen ("conftest.txt", "r");
ungetc (c, f);
fflush (f);
if (fgetc (f) != c)
- return 6;
+ { fclose (f); return 6; }
/* Verify behaviour of fflush after a non-backup ungetc. This fails
on glibc 2.8 and on BSD systems. */
c = fgetc (f);
ungetc ('@', f);
fflush (f);
if (fgetc (f) != c)
- return 7;
+ { fclose (f); return 7; }
+ fclose (f);
return 0;
;
@@ -15988,18 +17181,19 @@ fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
- case $gl_cv_func_fflush_stdin in
- yes) gl_func_fflush_stdin=1 ;;
- no) gl_func_fflush_stdin=0 ;;
- *) gl_func_fflush_stdin='(-1)' ;;
+ case "$gl_cv_func_fflush_stdin" in
+ *yes) gl_func_fflush_stdin=1 ;;
+ *no) gl_func_fflush_stdin=0 ;;
+ *) gl_func_fflush_stdin='(-1)' ;;
esac
printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
- if test $gl_cv_func_fflush_stdin != yes; then
- REPLACE_FSEEKO=1
- fi
+ case "$gl_cv_func_fflush_stdin" in
+ *yes) ;;
+ *) REPLACE_FSEEKO=1 ;;
+ esac
fi
@@ -16015,11 +17209,12 @@ else
if test "$cross_compiling" = yes
then :
case "$host_os" in
- # Guess yes on glibc and bionic systems.
- *-gnu*|*-android*)
- gl_cv_func_ungetc_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_ungetc_works="guessing no" ;;
+ # Guess yes on glibc and bionic systems.
+ *-gnu* | gnu* | *-android*) gl_cv_func_ungetc_works="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_ungetc_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_ungetc_works="guessing no" ;;
esac
else
@@ -16032,19 +17227,31 @@ int
main (void)
{
FILE *f;
- if (!(f = fopen ("conftest.tmp", "w+"))) return 1;
- if (fputs ("abc", f) < 0) return 2;
+ if (!(f = fopen ("conftest.tmp", "w+")))
+ return 1;
+ if (fputs ("abc", f) < 0)
+ { fclose (f); return 2; }
rewind (f);
- if (fgetc (f) != 'a') return 3;
- if (fgetc (f) != 'b') return 4;
- if (ungetc ('d', f) != 'd') return 5;
- if (ftell (f) != 1) return 6;
- if (fgetc (f) != 'd') return 7;
- if (ftell (f) != 2) return 8;
- if (fseek (f, 0, SEEK_CUR) != 0) return 9;
- if (ftell (f) != 2) return 10;
- if (fgetc (f) != 'c') return 11;
- fclose (f); remove ("conftest.tmp");
+ if (fgetc (f) != 'a')
+ { fclose (f); return 3; }
+ if (fgetc (f) != 'b')
+ { fclose (f); return 4; }
+ if (ungetc ('d', f) != 'd')
+ { fclose (f); return 5; }
+ if (ftell (f) != 1)
+ { fclose (f); return 6; }
+ if (fgetc (f) != 'd')
+ { fclose (f); return 7; }
+ if (ftell (f) != 2)
+ { fclose (f); return 8; }
+ if (fseek (f, 0, SEEK_CUR) != 0)
+ { fclose (f); return 9; }
+ if (ftell (f) != 2)
+ { fclose (f); return 10; }
+ if (fgetc (f) != 'c')
+ { fclose (f); return 11; }
+ fclose (f);
+ remove ("conftest.tmp");
;
return 0;
}
@@ -16146,6 +17353,8 @@ else
case "$host_os" in
# Guess no on Solaris.
solaris*) gl_cv_func_ftello_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_ftello_works="guessing yes" ;;
# Guess yes otherwise.
*) gl_cv_func_ftello_works="guessing yes" ;;
esac
@@ -16170,7 +17379,7 @@ main (void)
if (fp == NULL)
return 70;
if (fwrite ("foogarsh", 1, 8, fp) < 8)
- return 71;
+ { fclose (fp); return 71; }
if (fclose (fp))
return 72;
@@ -16181,19 +17390,19 @@ main (void)
if (fp == NULL)
return 73;
if (fseek (fp, -1, SEEK_END))
- return 74;
+ { fclose (fp); return 74; }
if (!(getc (fp) == 'h'))
- return 1;
+ { fclose (fp); return 1; }
if (!(getc (fp) == EOF))
- return 2;
+ { fclose (fp); return 2; }
if (!(ftell (fp) == 8))
- return 3;
+ { fclose (fp); return 3; }
if (!(ftell (fp) == 8))
- return 4;
+ { fclose (fp); return 4; }
if (!(putc ('!', fp) == '!'))
- return 5;
+ { fclose (fp); return 5; }
if (!(ftell (fp) == 9))
- return 6;
+ { fclose (fp); return 6; }
if (!(fclose (fp) == 0))
return 7;
fp = fopen (TESTFILE, "r");
@@ -16202,9 +17411,9 @@ main (void)
{
char buf[10];
if (!(fread (buf, 1, 10, fp) == 9))
- return 10;
+ { fclose (fp); return 10; }
if (!(memcmp (buf, "foogarsh!", 9) == 0))
- return 11;
+ { fclose (fp); return 11; }
}
if (!(fclose (fp) == 0))
return 12;
@@ -16242,6 +17451,7 @@ printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>con
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
if test ${gl_cv_func_getcwd_null+y}
@@ -16251,12 +17461,12 @@ else
if test "$cross_compiling" = yes
then :
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_getcwd_null="guessing yes";;
- # Guess yes on Cygwin.
- cygwin*) gl_cv_func_getcwd_null="guessing yes";;
- # If we don't know, assume the worst.
- *) gl_cv_func_getcwd_null="guessing no";;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
+ # Guess yes on Cygwin.
+ cygwin*) gl_cv_func_getcwd_null="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_getcwd_null="guessing no";;
esac
else
@@ -16289,9 +17499,9 @@ main (void)
if (! f)
return 2;
if (f[0] != '/')
- return 3;
+ { free (f); return 3; }
if (f[1] != '\0')
- return 4;
+ { free (f); return 4; }
free (f);
return 0;
}
@@ -16363,6 +17573,103 @@ fi
printf "%s\n" "#define HAVE_DECL_GETDTABLESIZE $ac_have_decl" >>confdefs.h
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
+printf %s "checking for IPv4 sockets... " >&6; }
+ if test ${gl_cv_socket_ipv4+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+int
+main (void)
+{
+int x = AF_INET; struct in_addr y; struct sockaddr_in z;
+ if (&x && &y && &z) return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_socket_ipv4=yes
+else
+ gl_cv_socket_ipv4=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
+printf "%s\n" "$gl_cv_socket_ipv4" >&6; }
+ if test $gl_cv_socket_ipv4 = yes; then
+
+printf "%s\n" "#define HAVE_IPV4 1" >>confdefs.h
+
+ fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
+printf %s "checking for IPv6 sockets... " >&6; }
+ if test ${gl_cv_socket_ipv6+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+int
+main (void)
+{
+int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
+ if (&x && &y && &z) return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_socket_ipv6=yes
+else
+ gl_cv_socket_ipv6=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
+printf "%s\n" "$gl_cv_socket_ipv6" >&6; }
+ if test $gl_cv_socket_ipv6 = yes; then
+
+printf "%s\n" "#define HAVE_IPV6 1" >>confdefs.h
+
+ fi
+
+
GNULIB_IMAXABS=0;
GNULIB_IMAXDIV=0;
GNULIB_STRTOIMAX=0;
@@ -16681,6 +17988,644 @@ printf "%s\n" "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
+ GNULIB_PSELECT=0;
+ GNULIB_SELECT=0;
+ HAVE_PSELECT=1;
+ REPLACE_PSELECT=0;
+ REPLACE_SELECT=0;
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
+printf %s "checking whether <sys/select.h> is self-contained... " >&6; }
+if test ${gl_cv_header_sys_select_h_selfcontained+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/select.h>
+int
+main (void)
+{
+struct timeval b;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_header_sys_select_h_selfcontained=yes
+else
+ gl_cv_header_sys_select_h_selfcontained=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $gl_cv_header_sys_select_h_selfcontained = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/select.h>
+int
+main (void)
+{
+int memset; int bzero;
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/select.h>
+int
+main (void)
+{
+
+ #undef memset
+ #define memset nonexistent_memset
+ extern
+ #ifdef __cplusplus
+ "C"
+ #endif
+ void *memset (void *, int, unsigned long);
+ #undef bzero
+ #define bzero nonexistent_bzero
+ extern
+ #ifdef __cplusplus
+ "C"
+ #endif
+ void bzero (void *, unsigned long);
+ fd_set fds;
+ FD_ZERO (&fds);
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+else
+ gl_cv_header_sys_select_h_selfcontained=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
+printf "%s\n" "$gl_cv_header_sys_select_h_selfcontained" >&6; }
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_sys_select_h='<'sys/select.h'>'
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
+printf %s "checking absolute name of <sys/select.h>... " >&6; }
+if test ${gl_cv_next_sys_select_h+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ if test $ac_cv_header_sys_select_h = yes; then
+
+
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/select.h>
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'sys/select.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_sys_select_h
+ gl_cv_next_sys_select_h='"'$gl_header'"'
+ else
+ gl_cv_next_sys_select_h='<'sys/select.h'>'
+ fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
+printf "%s\n" "$gl_cv_next_sys_select_h" >&6; }
+ fi
+ NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'sys/select.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_sys_select_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
+
+
+
+
+ if test $ac_cv_header_sys_select_h = yes; then
+ HAVE_SYS_SELECT_H=1
+ else
+ HAVE_SYS_SELECT_H=0
+ fi
+
+
+
+
+
+ if test $ac_cv_header_sys_socket_h != yes; then
+ ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
+if test "x$ac_cv_header_winsock2_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
+
+fi
+
+ fi
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ HAVE_WINSOCK2_H=1
+ UNISTD_H_HAVE_WINSOCK2_H=1
+ SYS_IOCTL_H_HAVE_WINSOCK2_H=1
+ else
+ HAVE_WINSOCK2_H=0
+ fi
+
+
+
+
+ for gl_func in pselect select; do
+ as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+printf %s "checking whether $gl_func is declared without a macro... " >&6; }
+if eval test \${$as_gl_Symbol+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Some systems require prerequisite headers. */
+#include <sys/types.h>
+#if !(defined __GLIBC__ && !defined __UCLIBC__) && HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+#include <sys/select.h>
+
+int
+main (void)
+{
+#undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"
+then :
+ cat >>confdefs.h <<_ACEOF
+#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+ if test $ac_cv_header_sys_socket_h != yes; then
+ ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
+if test "x$ac_cv_header_winsock2_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
+
+fi
+
+ fi
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ HAVE_WINSOCK2_H=1
+ UNISTD_H_HAVE_WINSOCK2_H=1
+ SYS_IOCTL_H_HAVE_WINSOCK2_H=1
+ else
+ HAVE_WINSOCK2_H=0
+ fi
+
+ LIBSOCKET=
+ if test $HAVE_WINSOCK2_H = 1; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need to call WSAStartup in winsock2.h and -lws2_32" >&5
+printf %s "checking if we need to call WSAStartup in winsock2.h and -lws2_32... " >&6; }
+if test ${gl_cv_func_wsastartup+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ gl_save_LIBS="$LIBS"
+ LIBS="$LIBS -lws2_32"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef HAVE_WINSOCK2_H
+# include <winsock2.h>
+#endif
+int
+main (void)
+{
+
+ WORD wVersionRequested = MAKEWORD(1, 1);
+ WSADATA wsaData;
+ int err = WSAStartup(wVersionRequested, &wsaData);
+ WSACleanup ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_cv_func_wsastartup=yes
+else
+ gl_cv_func_wsastartup=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$gl_save_LIBS"
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
+printf "%s\n" "$gl_cv_func_wsastartup" >&6; }
+ if test "$gl_cv_func_wsastartup" = "yes"; then
+
+printf "%s\n" "#define WINDOWS_SOCKETS 1" >>confdefs.h
+
+ LIBSOCKET='-lws2_32'
+ fi
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
+printf %s "checking for library containing setsockopt... " >&6; }
+if test ${gl_cv_lib_socket+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ gl_cv_lib_socket=
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+extern
+#ifdef __cplusplus
+"C"
+#endif
+char setsockopt();
+int
+main (void)
+{
+setsockopt();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+else
+ gl_save_LIBS="$LIBS"
+ LIBS="$gl_save_LIBS -lsocket"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+extern
+#ifdef __cplusplus
+"C"
+#endif
+char setsockopt();
+int
+main (void)
+{
+setsockopt();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_cv_lib_socket="-lsocket"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$gl_cv_lib_socket"; then
+ LIBS="$gl_save_LIBS -lnetwork"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+extern
+#ifdef __cplusplus
+"C"
+#endif
+char setsockopt();
+int
+main (void)
+{
+setsockopt();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_cv_lib_socket="-lnetwork"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$gl_cv_lib_socket"; then
+ LIBS="$gl_save_LIBS -lnet"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+extern
+#ifdef __cplusplus
+"C"
+#endif
+char setsockopt();
+int
+main (void)
+{
+setsockopt();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_cv_lib_socket="-lnet"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+ fi
+ LIBS="$gl_save_LIBS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$gl_cv_lib_socket"; then
+ gl_cv_lib_socket="none needed"
+ fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
+printf "%s\n" "$gl_cv_lib_socket" >&6; }
+ if test "$gl_cv_lib_socket" != "none needed"; then
+ LIBSOCKET="$gl_cv_lib_socket"
+ fi
+ fi
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ REPLACE_SELECT=1
+ else
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
+printf %s "checking whether select supports a 0 argument... " >&6; }
+if test ${gl_cv_func_select_supports0+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes
+then :
+
+ case "$host_os" in
+ # Guess no on Interix.
+ interix*) gl_cv_func_select_supports0="guessing no";;
+ # Guess yes otherwise.
+ *) gl_cv_func_select_supports0="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <sys/time.h>
+#if HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+int main ()
+{
+ struct timeval timeout;
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 5;
+ return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_select_supports0=yes
+else
+ gl_cv_func_select_supports0=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
+printf "%s\n" "$gl_cv_func_select_supports0" >&6; }
+ case "$gl_cv_func_select_supports0" in
+ *yes) ;;
+ *) REPLACE_SELECT=1 ;;
+ esac
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
+printf %s "checking whether select detects invalid fds... " >&6; }
+if test ${gl_cv_func_select_detects_ebadf+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes
+then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_select_detects_ebadf="guessing no" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <sys/time.h>
+#if HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
+#include <unistd.h>
+#include <errno.h>
+
+int
+main (void)
+{
+
+ fd_set set;
+ dup2(0, 16);
+ FD_ZERO(&set);
+ FD_SET(16, &set);
+ close(16);
+ struct timeval timeout;
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 5;
+ return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_select_detects_ebadf=yes
+else
+ gl_cv_func_select_detects_ebadf=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
+printf "%s\n" "$gl_cv_func_select_detects_ebadf" >&6; }
+ case $gl_cv_func_select_detects_ebadf in
+ *yes) ;;
+ *) REPLACE_SELECT=1 ;;
+ esac
+ fi
+
+ LIB_SELECT="$LIBSOCKET"
+ if test $REPLACE_SELECT = 1; then
+ case "$host_os" in
+ mingw*)
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+int
+main ()
+{
+ MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+else
+ LIB_SELECT="$LIB_SELECT -luser32"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ;;
+ esac
+ fi
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
+printf %s "checking for O_CLOEXEC... " >&6; }
+if test ${gl_cv_macro_O_CLOEXEC+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <fcntl.h>
+ #ifndef O_CLOEXEC
+ choke me;
+ #endif
+
+int
+main (void)
+{
+return O_CLOEXEC;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_macro_O_CLOEXEC=yes
+else
+ gl_cv_macro_O_CLOEXEC=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
+printf "%s\n" "$gl_cv_macro_O_CLOEXEC" >&6; }
+
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
printf %s "checking for promoted mode_t type... " >&6; }
@@ -16715,6 +18660,74 @@ printf "%s\n" "$gl_cv_promoted_mode_t" >&6; }
printf "%s\n" "#define PROMOTED_MODE_T $gl_cv_promoted_mode_t" >>confdefs.h
+
+
+
+
+
+
+
+ if test $ac_cv_have_decl_strerror_r = no; then
+ HAVE_DECL_STRERROR_R=0
+ fi
+
+ if test $ac_cv_func_strerror_r = yes; then
+ if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
+ if test $gl_cv_func_strerror_r_posix_signature = yes; then
+ case "$gl_cv_func_strerror_r_works" in
+ *no) REPLACE_STRERROR_R=1 ;;
+ esac
+ else
+ REPLACE_STRERROR_R=1
+ fi
+ else
+ REPLACE_STRERROR_R=1
+ fi
+ fi
+
+
+
+ GNULIB_PTHREAD_SIGMASK=0;
+ GNULIB_RAISE=0;
+ GNULIB_SIGNAL_H_SIGPIPE=0;
+ GNULIB_SIGPROCMASK=0;
+ GNULIB_SIGACTION=0;
+ HAVE_POSIX_SIGNALBLOCKING=1;
+ HAVE_PTHREAD_SIGMASK=1;
+ HAVE_RAISE=1;
+ HAVE_SIGSET_T=1;
+ HAVE_SIGINFO_T=1;
+ HAVE_SIGACTION=1;
+ HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
+
+ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
+
+ HAVE_SIGHANDLER_T=1;
+ REPLACE_PTHREAD_SIGMASK=0;
+ REPLACE_RAISE=0;
+
+
+ ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
+ #include <signal.h>
+ /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
+ #include <sys/types.h>
+
+"
+if test "x$ac_cv_type_sigset_t" = xyes
+then :
+
+printf "%s\n" "#define HAVE_SIGSET_T 1" >>confdefs.h
+
+gl_cv_type_sigset_t=yes
+else
+ gl_cv_type_sigset_t=no
+fi
+
+ if test $gl_cv_type_sigset_t != yes; then
+ HAVE_SIGSET_T=0
+ fi
+
+
ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
if test "x$ac_cv_have_decl_setenv" = xyes
then :
@@ -16754,6 +18767,42 @@ fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
+printf %s "checking for uid_t in sys/types.h... " >&6; }
+if test ${ac_cv_type_uid_t+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "uid_t" >/dev/null 2>&1
+then :
+ ac_cv_type_uid_t=yes
+else
+ ac_cv_type_uid_t=no
+fi
+rm -rf conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
+printf "%s\n" "$ac_cv_type_uid_t" >&6; }
+if test $ac_cv_type_uid_t = no; then
+
+printf "%s\n" "#define uid_t int" >>confdefs.h
+
+
+printf "%s\n" "#define gid_t int" >>confdefs.h
+
+fi
+
+
+
+
+
ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
if test "x$ac_cv_have_decl_strdup" = xyes
then :
@@ -16764,6 +18813,13 @@ fi
printf "%s\n" "#define HAVE_DECL_STRDUP $ac_have_decl" >>confdefs.h
+
+
+
+
+
+
+
ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
if test "x$ac_cv_have_decl_unsetenv" = xyes
then :
@@ -17316,6 +19372,8 @@ then :
case "$host_os" in
# Guess no on Cygwin.
cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_btowc_nul="guessing yes" ;;
# Guess yes otherwise.
*) gl_cv_func_btowc_nul="guessing yes" ;;
esac
@@ -17363,10 +19421,12 @@ then :
else
case "$host_os" in
- # Guess no on IRIX.
- irix*) gl_cv_func_btowc_eof="guessing no" ;;
- # Guess yes otherwise.
- *) gl_cv_func_btowc_eof="guessing yes" ;;
+ # Guess no on IRIX.
+ irix*) gl_cv_func_btowc_eof="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_btowc_eof="guessing yes" ;;
esac
if test $LOCALE_FR != none; then
if test "$cross_compiling" = yes
@@ -18057,14 +20117,11 @@ printf "%s\n" "#define HAVE_DECL___FPENDING $ac_have_decl" >>confdefs.h
- if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
- REPLACE_FSTAT=1
- fi
-
-
- if test $WINDOWS_64_BIT_ST_SIZE = 1; then
- REPLACE_FSTAT=1
- fi
+ case "$host_os" in
+ mingw* | solaris*)
+ REPLACE_FSTAT=1
+ ;;
+ esac
@@ -18079,7 +20136,24 @@ printf "%s\n" "#define HAVE_DECL___FPENDING $ac_have_decl" >>confdefs.h
gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
- :
+ case "$host_os" in
+ mingw*)
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
+
+ ;;
+ esac
+
+
+ :
+
fi
@@ -18170,7 +20244,7 @@ else
size_t siz = 0;
int len = getdelim (&line, &siz, '\n', in);
if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
- return 2;
+ { free (line); fclose (in); return 2; }
}
{
/* Test result for a NULL buffer and a non-zero size.
@@ -18178,7 +20252,7 @@ else
char *line = NULL;
size_t siz = (size_t)(~0) / 4;
if (getdelim (&line, &siz, '\n', in) == -1)
- return 3;
+ { fclose (in); return 3; }
free (line);
}
fclose (in);
@@ -18269,34 +20343,6 @@ printf "%s\n" "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
- if test $REPLACE_GETOPT = 1; then
-
-
-
-
-
-
-
-
- gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
-
-
-
-
-
-
-
-
-
- gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
-
-
-
-
- GNULIB_GL_UNISTD_H_GETOPT=1
- fi
-
-
@@ -18308,10 +20354,20 @@ printf "%s\n" "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
if test $REPLACE_GETOPT = 1; then
- GETOPT_H=getopt.h
+
+ if test $ac_cv_header_sys_cdefs_h = yes; then
+ HAVE_SYS_CDEFS_H=1
+ else
+ HAVE_SYS_CDEFS_H=0
+ fi
+
+
printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
+ GETOPT_H=getopt.h
+ GETOPT_CDEFS_H=getopt-cdefs.h
+
fi
@@ -18337,9 +20393,6 @@ printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
-
-
-
GNULIB_GL_UNISTD_H_GETOPT=1
fi
@@ -18444,6 +20497,7 @@ printf "%s\n" "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
+
gl_gettimeofday_timezone=void
if test $ac_cv_func_gettimeofday != yes; then
HAVE_GETTIMEOFDAY=0
@@ -18451,6 +20505,7 @@ printf "%s\n" "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
printf %s "checking whether gettimeofday clobbers localtime buffer... " >&6; }
if test ${gl_cv_func_gettimeofday_clobber+y}
@@ -18461,10 +20516,12 @@ else
then :
# When cross-compiling:
case "$host_os" in
- # Guess all is fine on glibc systems.
- *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
+ # Guess all is fine on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
esac
else
@@ -18510,11 +20567,14 @@ printf "%s\n" "$gl_cv_func_gettimeofday_clobber" >&6; }
*yes)
REPLACE_GETTIMEOFDAY=1
- REPLACE_GMTIME=1
- REPLACE_LOCALTIME=1
+printf "%s\n" "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
-printf "%s\n" "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
+
+
+ NEED_LOCALTIME_BUFFER=1
+ REPLACE_GMTIME=1
+ REPLACE_LOCALTIME=1
;;
esac
@@ -18585,7 +20645,9 @@ printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; }
if test $REPLACE_STRUCT_TIMEVAL = 1; then
REPLACE_GETTIMEOFDAY=1
fi
-
+ case "$host_os" in
+ mingw*) REPLACE_GETTIMEOFDAY=1 ;;
+ esac
fi
printf "%s\n" "#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone" >>confdefs.h
@@ -18602,22 +20664,7 @@ printf "%s\n" "#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone" >>confde
gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
-
- ac_fn_c_check_header_compile "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_timeb_h" = xyes
-then :
- printf "%s\n" "#define HAVE_SYS_TIMEB_H 1" >>confdefs.h
-
-fi
-
- ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
-if test "x$ac_cv_func__ftime" = xyes
-then :
- printf "%s\n" "#define HAVE__FTIME 1" >>confdefs.h
-
-fi
-
-
+ :
fi
@@ -18650,6 +20697,7 @@ printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
+
if test $ac_cv_func_isblank = no; then
HAVE_ISBLANK=0
fi
@@ -18763,12 +20811,13 @@ printf "%s\n" "$gl_cv_next_langinfo_h" >&6; }
HAVE_LANGINFO_CODESET=0
HAVE_LANGINFO_T_FMT_AMPM=0
+ HAVE_LANGINFO_ALTMON=0
HAVE_LANGINFO_ERA=0
HAVE_LANGINFO_YESEXPR=0
if test $ac_cv_header_langinfo_h = yes; then
HAVE_LANGINFO_H=1
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
printf %s "checking whether langinfo.h defines CODESET... " >&6; }
if test ${gl_cv_header_langinfo_codeset+y}
then :
@@ -18834,6 +20883,39 @@ printf "%s\n" "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
HAVE_LANGINFO_T_FMT_AMPM=1
fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ALTMON_1" >&5
+printf %s "checking whether langinfo.h defines ALTMON_1... " >&6; }
+if test ${gl_cv_header_langinfo_altmon+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <langinfo.h>
+int a = ALTMON_1;
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_header_langinfo_altmon=yes
+else
+ gl_cv_header_langinfo_altmon=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_altmon" >&5
+printf "%s\n" "$gl_cv_header_langinfo_altmon" >&6; }
+ if test $gl_cv_header_langinfo_altmon = yes; then
+ HAVE_LANGINFO_ALTMON=1
+ fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
printf %s "checking whether langinfo.h defines ERA... " >&6; }
if test ${gl_cv_header_langinfo_era+y}
@@ -18910,6 +20992,7 @@ printf "%s\n" "$gl_cv_header_langinfo_yesexpr" >&6; }
+
for gl_func in nl_langinfo; do
as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
@@ -19259,6 +21342,17 @@ printf "%s\n" "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS localtime-buffer.$ac_objext"
+
+
+
if test "$gl_threads_api" = posix; then
# OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
# pthread_rwlock_* functions.
@@ -19468,10 +21562,11 @@ printf "%s\n" "#define GNULIB_LOCK 1" >>confdefs.h
+
if test $ac_cv_func_lstat = yes; then
- case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
- *no)
+ case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
+ solaris* | *no)
REPLACE_LSTAT=1
;;
esac
@@ -20173,10 +22268,11 @@ then :
else
case "$host_os" in
- # Guess no on AIX and glibc systems.
- aix* | *-gnu*)
- gl_cv_func_mbrtowc_empty_input="guessing no" ;;
- *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
+ # Guess no on AIX and glibc systems.
+ aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
+ *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
esac
if test "$cross_compiling" = yes
then :
@@ -20210,7 +22306,7 @@ fi
printf "%s\n" "$gl_cv_func_mbrtowc_empty_input" >&6; }
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
printf %s "checking whether the C locale is free of encoding errors... " >&6; }
if test ${gl_cv_C_locale_sans_EILSEQ+y}
then :
@@ -20221,7 +22317,11 @@ else
if test "$cross_compiling" = yes
then :
- :
+ case "$host_os" in
+ # Guess yes on native Windows.
+ mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -20262,6 +22362,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
+
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
printf "%s\n" "$gl_cv_C_locale_sans_EILSEQ" >&6; }
@@ -20769,6 +22870,11 @@ printf "%s\n" "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
fi
+printf "%s\n" "#define GNULIB_MSVC_NOTHROW 1" >>confdefs.h
+
+
+
+
@@ -20825,8 +22931,11 @@ printf "%s\n" "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
printf "%s\n" "#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS" >>confdefs.h
- if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \
- && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
+ if test $HAVE_LANGINFO_CODESET = 1 \
+ && test $HAVE_LANGINFO_T_FMT_AMPM = 1 \
+ && test $HAVE_LANGINFO_ALTMON = 1 \
+ && test $HAVE_LANGINFO_ERA = 1 \
+ && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
:
else
REPLACE_NL_LANGINFO=1
@@ -21009,10 +23118,10 @@ else
if test "$cross_compiling" = yes
then :
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_readlink_works="guessing no" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_readlink_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_readlink_works="guessing no" ;;
esac
else
@@ -21115,7 +23224,13 @@ then :
else
if test "$cross_compiling" = yes
then :
- gl_cv_func_re_compile_pattern_working=no
+ case "$host_os" in
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
+ # Otherwise, assume it is not working.
+ *) gl_cv_func_re_compile_pattern_working="guessing no" ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -21164,7 +23279,7 @@ int result = 0;
if (setlocale (LC_ALL, "en_US.UTF-8"))
{
{
- /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
+ /* https://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
This test needs valgrind to catch the bug on Debian
GNU/Linux 3.1 x86, but it might catch the bug better
on other platforms and it shouldn't hurt to try the
@@ -21188,7 +23303,7 @@ int result = 0;
{
/* This test is from glibc bug 15078.
The test case is from Andreas Schwab in
- <http://www.sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
+ <https://sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
*/
static char const pat[] = "[^x]x";
static char const data[] =
@@ -21286,7 +23401,7 @@ int result = 0;
result |= 16;
/* Catch a bug reported by Vin Shelton in
- http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
+ https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html
*/
re_set_syntax (RE_SYNTAX_POSIX_BASIC
& ~RE_CONTEXT_INVALID_DUP
@@ -21329,12 +23444,13 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
+
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
printf "%s\n" "$gl_cv_func_re_compile_pattern_working" >&6; }
- case $gl_cv_func_re_compile_pattern_working in #(
- yes) ac_use_included_regex=no;; #(
- no) ac_use_included_regex=yes;;
+ case "$gl_cv_func_re_compile_pattern_working" in #(
+ *yes) ac_use_included_regex=no;; #(
+ *no) ac_use_included_regex=yes;;
esac
;;
*) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
@@ -21457,6 +23573,8 @@ then :
case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_func_rename_slash_dst_works="guessing no" ;;
esac
@@ -21529,6 +23647,8 @@ then :
case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_rename_slash_src_works="guessing no" ;;
esac
@@ -21591,14 +23711,16 @@ then :
printf %s "(cached) " >&6
else
if test $ac_cv_func_link = yes; then
- rm -rf conftest.f conftest.f1
- if touch conftest.f && ln conftest.f conftest.f1 &&
+ rm -rf conftest.f conftest.f1 conftest.f2
+ if touch conftest.f conftest.f2 && ln conftest.f conftest.f1 &&
set x `ls -i conftest.f conftest.f1` && test "" = ""; then
if test "$cross_compiling" = yes
then :
case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_rename_link_works="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_rename_link_works="guessing no" ;;
esac
@@ -21607,6 +23729,7 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+# include <errno.h>
# include <stdio.h>
# include <stdlib.h>
# include <unistd.h>
@@ -21619,10 +23742,18 @@ int result = 0;
result |= 1;
if (unlink ("conftest.f1"))
result |= 2;
- if (rename ("conftest.f", "conftest.f"))
+
+ /* Allow either the POSIX-required behavior, where the
+ previous rename kept conftest.f, or the (better) NetBSD
+ behavior, where it removed conftest.f. */
+ if (rename ("conftest.f", "conftest.f") != 0
+ && errno != ENOENT)
result |= 4;
+
if (rename ("conftest.f1", "conftest.f1") == 0)
result |= 8;
+ if (rename ("conftest.f2", "conftest.f2") != 0)
+ result |= 16;
return result;
;
@@ -21642,7 +23773,7 @@ fi
else
gl_cv_func_rename_link_works="guessing no"
fi
- rm -rf conftest.f conftest.f1
+ rm -rf conftest.f conftest.f1 conftest.f2
else
gl_cv_func_rename_link_works=yes
fi
@@ -21674,6 +23805,8 @@ then :
case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_rename_dest_works="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_func_rename_dest_works="guessing no" ;;
esac
@@ -21765,10 +23898,12 @@ else
if test "$cross_compiling" = yes
then :
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_rmdir_works="guessing no" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_rmdir_works="guessing no" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rmdir_works="guessing no" ;;
esac
else
@@ -21848,61 +23983,6 @@ printf "%s\n" "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
-
-
-
- if test $ac_cv_func_secure_getenv = no; then
- HAVE_SECURE_GETENV=0
- fi
-
- if test $HAVE_SECURE_GETENV = 0; then
-
-
-
-
-
-
-
-
- gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
-
-
- ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
-if test "x$ac_cv_func___secure_getenv" = xyes
-then :
- printf "%s\n" "#define HAVE___SECURE_GETENV 1" >>confdefs.h
-
-fi
-
- if test $ac_cv_func___secure_getenv = no; then
- ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
-if test "x$ac_cv_func_issetugid" = xyes
-then :
- printf "%s\n" "#define HAVE_ISSETUGID 1" >>confdefs.h
-
-fi
-
- fi
-
-
- fi
-
-
-
-
-
- GNULIB_SECURE_GETENV=1
-
-
-
-
-
-printf "%s\n" "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
-
-
-
-
-
if test "$with_selinux" != no; then
ac_fn_c_check_header_compile "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
if test "x$ac_cv_header_selinux_selinux_h" = xyes
@@ -22099,63 +24179,31 @@ printf "%s\n" "#define ssize_t int" >>confdefs.h
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
-printf %s "checking whether stat handles trailing slashes on directories... " >&6; }
-if test ${gl_cv_func_stat_dir_slash+y}
-then :
- printf %s "(cached) " >&6
-else
- if test "$cross_compiling" = yes
-then :
- case $host_os in
- mingw*) gl_cv_func_stat_dir_slash="guessing no";;
- *) gl_cv_func_stat_dir_slash="guessing yes";;
- esac
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/stat.h>
-int
-main (void)
-{
-struct stat st; return stat (".", &st) != stat ("./", &st);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
- gl_cv_func_stat_dir_slash=yes
-else
- gl_cv_func_stat_dir_slash=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
-printf "%s\n" "$gl_cv_func_stat_dir_slash" >&6; }
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
+ case "$host_os" in
+ mingw*)
+ REPLACE_STAT=1
+ ;;
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
printf %s "checking whether stat handles trailing slashes on files... " >&6; }
if test ${gl_cv_func_stat_file_slash+y}
then :
printf %s "(cached) " >&6
else
touch conftest.tmp
- # Assume that if we have lstat, we can also check symlinks.
- if test $ac_cv_func_lstat = yes; then
- ln -s conftest.tmp conftest.lnk
- fi
- if test "$cross_compiling" = yes
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.tmp conftest.lnk
+ fi
+ if test "$cross_compiling" = yes
then :
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_stat_file_slash="guessing no" ;;
- esac
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_stat_file_slash="guessing no" ;;
+ esac
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -22166,14 +24214,14 @@ int
main (void)
{
int result = 0;
- struct stat st;
- if (!stat ("conftest.tmp/", &st))
- result |= 1;
+ struct stat st;
+ if (!stat ("conftest.tmp/", &st))
+ result |= 1;
#if HAVE_LSTAT
- if (!stat ("conftest.lnk/", &st))
- result |= 2;
+ if (!stat ("conftest.lnk/", &st))
+ result |= 2;
#endif
- return result;
+ return result;
;
return 0;
@@ -22189,21 +24237,22 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
- rm -f conftest.tmp conftest.lnk
+ rm -f conftest.tmp conftest.lnk
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
printf "%s\n" "$gl_cv_func_stat_file_slash" >&6; }
- case $gl_cv_func_stat_dir_slash in
- *no) REPLACE_STAT=1
-
-printf "%s\n" "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
-;;
- esac
- case $gl_cv_func_stat_file_slash in
- *no) REPLACE_STAT=1
+ case $gl_cv_func_stat_file_slash in
+ *no)
+ REPLACE_STAT=1
printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
;;
+ esac
+ case $host_os in
+ solaris*)
+ REPLACE_FSTAT=1 ;;
+ esac
+ ;;
esac
if test $REPLACE_STAT = 1; then
@@ -22217,7 +24266,24 @@ printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
- :
+ case "$host_os" in
+ mingw*)
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
+
+ ;;
+ esac
+
+
+ :
+
fi
@@ -22235,6 +24301,139 @@ printf "%s\n" "#define GNULIB_TEST_STAT 1" >>confdefs.h
+
+
+
+ ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h>
+ #include <sys/stat.h>
+"
+if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
+printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
+if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #if HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ #endif
+ #include <time.h>
+ struct timespec ts;
+ struct stat st;
+
+int
+main (void)
+{
+
+ st.st_atim = ts;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
+else
+ ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
+printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
+ if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
+
+printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
+
+ fi
+else
+ ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include <sys/types.h>
+ #include <sys/stat.h>
+"
+if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h
+
+
+else
+ ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
+ #include <sys/stat.h>
+"
+if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h
+
+
+else
+ ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include <sys/types.h>
+ #include <sys/stat.h>
+"
+if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1" >>confdefs.h
+
+
+fi
+
+fi
+
+fi
+
+fi
+
+
+
+
+
+ ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include <sys/types.h>
+ #include <sys/stat.h>
+"
+if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1" >>confdefs.h
+
+
+else
+ ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
+ #include <sys/stat.h>
+"
+if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1" >>confdefs.h
+
+
+else
+ ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include <sys/types.h>
+ #include <sys/stat.h>
+"
+if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1" >>confdefs.h
+
+
+fi
+
+fi
+
+fi
+
+
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
printf %s "checking for working stdalign.h... " >&6; }
if test ${gl_cv_header_working_stdalign_h+y}
@@ -22248,7 +24447,7 @@ else
/* Test that alignof yields a result consistent with offsetof.
This catches GCC bug 52023
- <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
#ifdef __cplusplus
template <class t> struct alignof_helper { char a; t b; };
# define ao(type) offsetof (alignof_helper<type>, b)
@@ -22265,8 +24464,8 @@ else
|| (defined __APPLE__ && defined __MACH__ \
? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
: __GNUC__) \
- || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \
- || __ICC || 0x5110 <= __SUNPRO_C \
+ || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
+ || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
|| 1300 <= _MSC_VER)
struct alignas_test { char c; char alignas (8) alignas_8; };
char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
@@ -22934,7 +25133,7 @@ printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
- for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r qsort_r random random_r realpath rpmatch secure_getenv setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do
+ for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r qsort_r random random_r reallocarray realpath rpmatch secure_getenv setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do
as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
printf %s "checking whether $gl_func is declared without a macro... " >&6; }
@@ -22946,6 +25145,9 @@ else
/* end confdefs.h. */
#include <stdlib.h>
#if HAVE_SYS_LOADAVG_H
+/* OpenIndiana has a bug: <sys/time.h> must be included before
+ <sys/loadavg.h>. */
+# include <sys/time.h>
# include <sys/loadavg.h>
#endif
#if HAVE_RANDOM_H
@@ -22988,6 +25190,8 @@ fi
+
+
if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
printf %s "checking for working strerror function... " >&6; }
@@ -22998,10 +25202,10 @@ else
if test "$cross_compiling" = yes
then :
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_working_strerror="guessing no" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_working_strerror="guessing no" ;;
esac
else
@@ -23038,6 +25242,10 @@ printf "%s\n" "$gl_cv_func_working_strerror" >&6; }
;;
esac
+ case "$gl_cv_func_strerror_r_works" in
+ *no) REPLACE_STRERROR=1 ;;
+ esac
+
else
REPLACE_STRERROR=1
fi
@@ -23246,14 +25454,14 @@ printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
+ WINDOWS_STAT_TIMESPEC=0
+
+
- if test $WINDOWS_64_BIT_ST_SIZE = 1; then
-printf "%s\n" "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
- fi
ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
#include <sys/stat.h>
@@ -23425,7 +25633,7 @@ printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
- for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r unlink unlinkat usleep; do
+ for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sethostname sleep symlink symlinkat truncate ttyname_r unlink unlinkat usleep; do
as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
printf %s "checking whether $gl_func is declared without a macro... " >&6; }
@@ -23649,7 +25857,9 @@ printf "%s\n" "$gl_cv_next_wchar_h" >&6; }
- for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth ; do
+
+
+ for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth wcsftime ; do
as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
printf %s "checking whether $gl_func is declared without a macro... " >&6; }
@@ -23908,6 +26118,8 @@ else
case "$host_os" in
# Guess no on AIX 4, OSF/1 and Solaris.
aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_wcrtomb_retval="guessing yes" ;;
# Guess yes otherwise.
*) gl_cv_func_wcrtomb_retval="guessing yes" ;;
esac
@@ -24030,6 +26242,9 @@ else
# Guess no on Solaris <= 9 and Cygwin.
solaris2.[1-9] | solaris2.[1-9].* | cygwin*)
gl_cv_func_wctob_works="guessing no" ;;
+ # Guess no on native Windows.
+ mingw*)
+ gl_cv_func_wctob_works="guessing no" ;;
# Guess yes otherwise.
*) gl_cv_func_wctob_works="guessing yes" ;;
esac
@@ -24252,6 +26467,8 @@ printf "%s\n" "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
+
+
if test $gl_cv_have_include_next = yes; then
gl_cv_next_wctype_h='<'wctype.h'>'
else
@@ -24333,7 +26550,7 @@ else
if test "$cross_compiling" = yes
then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
#if __GNU_LIBRARY__ == 1
@@ -24619,6 +26836,219 @@ fi
gl_module_indicator_condition=$gltests_WITNESS
+ if test "$ac_cv_header_winsock2_h" = yes; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS accept.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_ACCEPT" != 1; then
+ if test "$GNULIB_ACCEPT" = 0; then
+ GNULIB_ACCEPT=$gl_module_indicator_condition
+ else
+ GNULIB_ACCEPT="($GNULIB_ACCEPT || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_ACCEPT 1" >>confdefs.h
+
+
+
+
+
+
+
+ if test $ac_cv_header_arpa_inet_h = yes; then
+ HAVE_ARPA_INET_H=1
+ else
+ HAVE_ARPA_INET_H=0
+ fi
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
+printf %s "checking absolute name of <arpa/inet.h>... " >&6; }
+if test ${gl_cv_next_arpa_inet_h+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ if test $ac_cv_header_arpa_inet_h = yes; then
+
+
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <arpa/inet.h>
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'arpa/inet.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_arpa_inet_h
+ gl_cv_next_arpa_inet_h='"'$gl_header'"'
+ else
+ gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
+ fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
+printf "%s\n" "$gl_cv_next_arpa_inet_h" >&6; }
+ fi
+ NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'arpa/inet.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+
+ for gl_func in inet_ntop inet_pton; do
+ as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+printf %s "checking whether $gl_func is declared without a macro... " >&6; }
+if eval test \${$as_gl_Symbol+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* On some systems, this header is not self-consistent. */
+#if !(defined __GLIBC__ || defined __UCLIBC__)
+# include <sys/socket.h>
+#endif
+#ifdef __TANDEM
+# include <netdb.h>
+#endif
+#include <arpa/inet.h>
+
+int
+main (void)
+{
+#undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"
+then :
+ cat >>confdefs.h <<_ACEOF
+#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+ if test "$ac_cv_header_winsock2_h" = yes; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS bind.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_BIND" != 1; then
+ if test "$GNULIB_BIND" = 0; then
+ GNULIB_BIND=$gl_module_indicator_condition
+ else
+ GNULIB_BIND="($GNULIB_BIND || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_BIND 1" >>confdefs.h
+
+
+
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
@@ -24641,8 +27071,14 @@ else
struct tm t;
char buf[16];
int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if defined __BEOS__ || defined __HAIKU__
+ return 1;
+#else
/* Check whether the given locale name is recognized by the system. */
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
@@ -24650,9 +27086,9 @@ int main () {
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
return 1;
-#else
+# else
if (setlocale (LC_ALL, "") == NULL) return 1;
-#endif
+# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
@@ -24661,32 +27097,33 @@ int main () {
some unit tests fail.
On MirBSD 10, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "UTF-8". */
-#if HAVE_LANGINFO_CODESET
+# if HAVE_LANGINFO_CODESET
{
const char *cs = nl_langinfo (CODESET);
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
|| strcmp (cs, "UTF-8") == 0)
return 1;
}
-#endif
-#ifdef __CYGWIN__
+# endif
+# ifdef __CYGWIN__
/* On Cygwin, avoid locale names without encoding suffix, because the
locale_charset() function relies on the encoding suffix. Note that
LC_ALL is set on the command line. */
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-#endif
+# endif
/* Check whether in the abbreviation of the second month, the second
character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
one byte long. This excludes the UTF-8 encoding. */
t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
-#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
+# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
-#endif
+# endif
return 0;
+#endif
}
_ACEOF
@@ -24906,8 +27343,14 @@ else
struct tm t;
char buf[16];
int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if defined __BEOS__ || defined __HAIKU__
+ return 1;
+#else
/* Check whether the given locale name is recognized by the system. */
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
@@ -24915,9 +27358,9 @@ int main () {
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
return 1;
-#else
+# else
if (setlocale (LC_ALL, "") == NULL) return 1;
-#endif
+# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
@@ -24926,32 +27369,33 @@ int main () {
some unit tests fail.
On MirBSD 10, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "UTF-8". */
-#if HAVE_LANGINFO_CODESET
+# if HAVE_LANGINFO_CODESET
{
const char *cs = nl_langinfo (CODESET);
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
|| strcmp (cs, "UTF-8") == 0)
return 1;
}
-#endif
-#ifdef __CYGWIN__
+# endif
+# ifdef __CYGWIN__
/* On Cygwin, avoid locale names without encoding suffix, because the
locale_charset() function relies on the encoding suffix. Note that
LC_ALL is set on the command line. */
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-#endif
+# endif
/* Check whether in the abbreviation of the second month, the second
character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
one byte long. This excludes the UTF-8 encoding. */
t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
-#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
+# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
-#endif
+# endif
return 0;
+#endif
}
_ACEOF
@@ -25152,10 +27596,17 @@ printf "%s\n" "$gt_cv_locale_tr_utf8" >&6; }
+printf "%s\n" "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
+
+
+
+
+
+
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ REPLACE_CLOSE=1
+ fi
- if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
- REPLACE_CLOSE=1
- fi
@@ -25271,6 +27722,40 @@ printf "%s\n" "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
+ if test "$ac_cv_header_winsock2_h" = yes; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS connect.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_CONNECT" != 1; then
+ if test "$GNULIB_CONNECT" = 0; then
+ GNULIB_CONNECT=$gl_module_indicator_condition
+ else
+ GNULIB_CONNECT="($GNULIB_CONNECT || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_CONNECT 1" >>confdefs.h
+
+
+
+
@@ -25741,9 +28226,219 @@ printf "%s\n" "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
- if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
- REPLACE_FDOPEN=1
+
+
+ if test $ac_cv_func_fcntl = no; then
+
+
+
+ if test $ac_cv_func_fcntl = no; then
+ HAVE_FCNTL=0
+ else
+ REPLACE_FCNTL=1
+ fi
+
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
+printf %s "checking whether fcntl handles F_DUPFD correctly... " >&6; }
+if test ${gl_cv_func_fcntl_f_dupfd_works+y}
+then :
+ printf %s "(cached) " >&6
+else
+ if test "$cross_compiling" = yes
+then :
+ case $host_os in
+ aix* | cygwin* | haiku*)
+ gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
+ *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
+ esac
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <errno.h>
+ #include <fcntl.h>
+ #include <limits.h>
+ #include <sys/resource.h>
+ #include <unistd.h>
+ #ifndef RLIM_SAVED_CUR
+ # define RLIM_SAVED_CUR RLIM_INFINITY
+ #endif
+ #ifndef RLIM_SAVED_MAX
+ # define RLIM_SAVED_MAX RLIM_INFINITY
+ #endif
+
+int
+main (void)
+{
+int result = 0;
+ int bad_fd = INT_MAX;
+ struct rlimit rlim;
+ if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
+ && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
+ && rlim.rlim_cur != RLIM_INFINITY
+ && rlim.rlim_cur != RLIM_SAVED_MAX
+ && rlim.rlim_cur != RLIM_SAVED_CUR)
+ bad_fd = rlim.rlim_cur;
+ if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
+ if (errno != EINVAL) result |= 2;
+ if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
+ if (errno != EINVAL) result |= 8;
+ /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
+ {
+ int fd;
+ fd = open (".", O_RDONLY);
+ if (fd == -1)
+ result |= 16;
+ else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
+ result |= 32;
+
+ close (fd);
+ }
+ return result;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_fcntl_f_dupfd_works=yes
+else
+ gl_cv_func_fcntl_f_dupfd_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
+printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
+ case $gl_cv_func_fcntl_f_dupfd_works in
+ *yes) ;;
+ *)
+
+
+ if test $ac_cv_func_fcntl = no; then
+ HAVE_FCNTL=0
+ else
+ REPLACE_FCNTL=1
+ fi
+
+
+printf "%s\n" "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
+ ;;
+ esac
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
+printf %s "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
+if test ${gl_cv_func_fcntl_f_dupfd_cloexec+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <fcntl.h>
+#ifndef F_DUPFD_CLOEXEC
+choke me
+#endif
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef __linux__
+/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
+ it to support the semantics on older kernels that failed with EINVAL. */
+choke me
+#endif
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_func_fcntl_f_dupfd_cloexec=yes
+else
+ gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ gl_cv_func_fcntl_f_dupfd_cloexec=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
+printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
+ if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
+
+
+
+ if test $ac_cv_func_fcntl = no; then
+ HAVE_FCNTL=0
else
+ REPLACE_FCNTL=1
+ fi
+
+ fi
+ fi
+
+
+ if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS fcntl.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_FCNTL" != 1; then
+ if test "$GNULIB_FCNTL" = 0; then
+ GNULIB_FCNTL=$gl_module_indicator_condition
+ else
+ GNULIB_FCNTL="($GNULIB_FCNTL || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
+
+
+
+
+
+
+
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ REPLACE_FDOPEN=1
+ fi
+
+ if test $REPLACE_FDOPEN = 0; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopen sets errno" >&5
printf %s "checking whether fdopen sets errno... " >&6; }
if test ${gl_cv_func_fdopen_works+y}
@@ -25841,7 +28536,12 @@ else
echo hello world > conftest.txt
if test "$cross_compiling" = yes
then :
- gl_cv_func_fflush_stdin=cross
+ case "$host_os" in
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
+ *) gl_cv_func_fflush_stdin=cross ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25864,16 +28564,16 @@ FILE *f = fopen ("conftest.txt", "r");
return 1;
fd = fileno (f);
if (fd < 0 || fread (buffer, 1, 5, f) != 5)
- return 2;
+ { fclose (f); return 2; }
/* For deterministic results, ensure f read a bigger buffer. */
if (lseek (fd, 0, SEEK_CUR) == 5)
- return 3;
+ { fclose (f); return 3; }
/* POSIX requires fflush-fseek to set file offset of fd. This fails
on BSD systems and on mingw. */
if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
- return 4;
+ { fclose (f); return 4; }
if (lseek (fd, 0, SEEK_CUR) != 5)
- return 5;
+ { fclose (f); return 5; }
/* Verify behaviour of fflush after ungetc. See
<http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
/* Verify behaviour of fflush after a backup ungetc. This fails on
@@ -25882,14 +28582,15 @@ FILE *f = fopen ("conftest.txt", "r");
ungetc (c, f);
fflush (f);
if (fgetc (f) != c)
- return 6;
+ { fclose (f); return 6; }
/* Verify behaviour of fflush after a non-backup ungetc. This fails
on glibc 2.8 and on BSD systems. */
c = fgetc (f);
ungetc ('@', f);
fflush (f);
if (fgetc (f) != c)
- return 7;
+ { fclose (f); return 7; }
+ fclose (f);
return 0;
;
@@ -25911,18 +28612,19 @@ fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
- case $gl_cv_func_fflush_stdin in
- yes) gl_func_fflush_stdin=1 ;;
- no) gl_func_fflush_stdin=0 ;;
- *) gl_func_fflush_stdin='(-1)' ;;
+ case "$gl_cv_func_fflush_stdin" in
+ *yes) gl_func_fflush_stdin=1 ;;
+ *no) gl_func_fflush_stdin=0 ;;
+ *) gl_func_fflush_stdin='(-1)' ;;
esac
printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
- if test $gl_cv_func_fflush_stdin != yes; then
- REPLACE_FFLUSH=1
- fi
+ case "$gl_cv_func_fflush_stdin" in
+ *yes) ;;
+ *) REPLACE_FFLUSH=1 ;;
+ esac
if test $REPLACE_FFLUSH = 1; then
@@ -26024,7 +28726,8 @@ else
#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
- struct s { int n; double d[]; };
+ struct m { struct m *next, **list; char name[]; };
+ struct s { struct s *p; struct m *m; int n; double d[]; };
int
main (void)
{
@@ -26033,6 +28736,8 @@ int m = getchar ();
nbytes += sizeof (struct s) - 1;
nbytes -= nbytes % sizeof (struct s);
struct s *p = malloc (nbytes);
+ p->p = p;
+ p->m = NULL;
p->d[0] = 0.0;
return p->d != (double *) NULL;
;
@@ -26094,21 +28799,35 @@ int
main (void)
{
FILE *f = fopen ("conftest.txt", "w+");
- if (!f) return 1;
- if (fputc ('a', f) != 'a') return 2;
- rewind (f);
- if (fgetc (f) != 'a') return 3;
- if (fgetc (f) != EOF) return 4;
- if (fpurge (f) != 0) return 5;
- if (putc ('b', f) != 'b') return 6;
- if (fclose (f) != 0) return 7;
- if ((f = fopen ("conftest.txt", "r")) == NULL) return 8;
- if (fgetc (f) != 'a') return 9;
- if (fgetc (f) != 'b') return 10;
- if (fgetc (f) != EOF) return 11;
- if (fclose (f) != 0) return 12;
- if (remove ("conftest.txt") != 0) return 13;
- return 0;
+ if (!f)
+ return 1;
+ if (fputc ('a', f) != 'a')
+ { fclose (f); return 2; }
+ rewind (f);
+ if (fgetc (f) != 'a')
+ { fclose (f); return 3; }
+ if (fgetc (f) != EOF)
+ { fclose (f); return 4; }
+ if (fpurge (f) != 0)
+ { fclose (f); return 5; }
+ if (putc ('b', f) != 'b')
+ { fclose (f); return 6; }
+ if (fclose (f) != 0)
+ return 7;
+ if ((f = fopen ("conftest.txt", "r")) == NULL)
+ return 8;
+ if (fgetc (f) != 'a')
+ { fclose (f); return 9; }
+ if (fgetc (f) != 'b')
+ { fclose (f); return 10; }
+ if (fgetc (f) != EOF)
+ { fclose (f); return 11; }
+ if (fclose (f) != 0)
+ return 12;
+ if (remove ("conftest.txt") != 0)
+ return 13;
+ return 0;
+
;
return 0;
}
@@ -26279,7 +28998,12 @@ else
echo hello world > conftest.txt
if test "$cross_compiling" = yes
then :
- gl_cv_func_fflush_stdin=cross
+ case "$host_os" in
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
+ *) gl_cv_func_fflush_stdin=cross ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -26302,16 +29026,16 @@ FILE *f = fopen ("conftest.txt", "r");
return 1;
fd = fileno (f);
if (fd < 0 || fread (buffer, 1, 5, f) != 5)
- return 2;
+ { fclose (f); return 2; }
/* For deterministic results, ensure f read a bigger buffer. */
if (lseek (fd, 0, SEEK_CUR) == 5)
- return 3;
+ { fclose (f); return 3; }
/* POSIX requires fflush-fseek to set file offset of fd. This fails
on BSD systems and on mingw. */
if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
- return 4;
+ { fclose (f); return 4; }
if (lseek (fd, 0, SEEK_CUR) != 5)
- return 5;
+ { fclose (f); return 5; }
/* Verify behaviour of fflush after ungetc. See
<http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
/* Verify behaviour of fflush after a backup ungetc. This fails on
@@ -26320,14 +29044,15 @@ FILE *f = fopen ("conftest.txt", "r");
ungetc (c, f);
fflush (f);
if (fgetc (f) != c)
- return 6;
+ { fclose (f); return 6; }
/* Verify behaviour of fflush after a non-backup ungetc. This fails
on glibc 2.8 and on BSD systems. */
c = fgetc (f);
ungetc ('@', f);
fflush (f);
if (fgetc (f) != c)
- return 7;
+ { fclose (f); return 7; }
+ fclose (f);
return 0;
;
@@ -26349,18 +29074,19 @@ fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
- case $gl_cv_func_fflush_stdin in
- yes) gl_func_fflush_stdin=1 ;;
- no) gl_func_fflush_stdin=0 ;;
- *) gl_func_fflush_stdin='(-1)' ;;
+ case "$gl_cv_func_fflush_stdin" in
+ *yes) gl_func_fflush_stdin=1 ;;
+ *no) gl_func_fflush_stdin=0 ;;
+ *) gl_func_fflush_stdin='(-1)' ;;
esac
printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
- if test $gl_cv_func_fflush_stdin != yes; then
- REPLACE_FSEEKO=1
- fi
+ case "$gl_cv_func_fflush_stdin" in
+ *yes) ;;
+ *) REPLACE_FSEEKO=1 ;;
+ esac
fi
@@ -26512,6 +29238,8 @@ else
case "$host_os" in
# Guess no on Solaris.
solaris*) gl_cv_func_ftello_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_ftello_works="guessing yes" ;;
# Guess yes otherwise.
*) gl_cv_func_ftello_works="guessing yes" ;;
esac
@@ -26536,7 +29264,7 @@ main (void)
if (fp == NULL)
return 70;
if (fwrite ("foogarsh", 1, 8, fp) < 8)
- return 71;
+ { fclose (fp); return 71; }
if (fclose (fp))
return 72;
@@ -26547,19 +29275,19 @@ main (void)
if (fp == NULL)
return 73;
if (fseek (fp, -1, SEEK_END))
- return 74;
+ { fclose (fp); return 74; }
if (!(getc (fp) == 'h'))
- return 1;
+ { fclose (fp); return 1; }
if (!(getc (fp) == EOF))
- return 2;
+ { fclose (fp); return 2; }
if (!(ftell (fp) == 8))
- return 3;
+ { fclose (fp); return 3; }
if (!(ftell (fp) == 8))
- return 4;
+ { fclose (fp); return 4; }
if (!(putc ('!', fp) == '!'))
- return 5;
+ { fclose (fp); return 5; }
if (!(ftell (fp) == 9))
- return 6;
+ { fclose (fp); return 6; }
if (!(fclose (fp) == 0))
return 7;
fp = fopen (TESTFILE, "r");
@@ -26568,9 +29296,9 @@ main (void)
{
char buf[10];
if (!(fread (buf, 1, 10, fp) == 9))
- return 10;
+ { fclose (fp); return 10; }
if (!(memcmp (buf, "foogarsh!", 9) == 0))
- return 11;
+ { fclose (fp); return 11; }
}
if (!(fclose (fp) == 0))
return 12;
@@ -26652,6 +29380,64 @@ printf "%s\n" "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
+ if test $ac_cv_func_ftruncate = yes; then
+
+
+ case "$host_os" in
+ mingw*)
+ REPLACE_FTRUNCATE=1
+ ;;
+ esac
+
+ else
+ HAVE_FTRUNCATE=0
+ fi
+
+ if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS ftruncate.$ac_objext"
+
+
+ ac_fn_c_check_func "$LINENO" "chsize" "ac_cv_func_chsize"
+if test "x$ac_cv_func_chsize" = xyes
+then :
+ printf "%s\n" "#define HAVE_CHSIZE 1" >>confdefs.h
+
+fi
+
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_FTRUNCATE" != 1; then
+ if test "$GNULIB_FTRUNCATE" = 0; then
+ GNULIB_FTRUNCATE=$gl_module_indicator_condition
+ else
+ GNULIB_FTRUNCATE="($GNULIB_FTRUNCATE || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_FTRUNCATE 1" >>confdefs.h
+
+
+
+
+
+
case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
@@ -26701,35 +29487,36 @@ printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
if test $ac_cv_func_getdtablesize = yes &&
test $ac_cv_have_decl_getdtablesize = yes; then
- # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
- # up to an unchangeable hard limit; all other platforms correctly
- # require setrlimit before getdtablesize() can report a larger value.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
printf %s "checking whether getdtablesize works... " >&6; }
if test ${gl_cv_func_getdtablesize_works+y}
then :
printf %s "(cached) " >&6
else
- if test "$cross_compiling" = yes
+ case "$host_os" in
+ vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
+ *)
+ if test "$cross_compiling" = yes
then :
case "$host_os" in
- cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
- gl_cv_func_getdtablesize_works="guessing no" ;;
- *) gl_cv_func_getdtablesize_works="guessing yes" ;;
- esac
+ cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
+ gl_cv_func_getdtablesize_works="guessing no" ;;
+ *) gl_cv_func_getdtablesize_works="guessing yes" ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <unistd.h>
+ #include <unistd.h>
int
main (void)
{
int size = getdtablesize();
- if (dup2 (0, getdtablesize()) != -1)
- return 1;
- if (size != getdtablesize())
- return 2;
+ if (dup2 (0, getdtablesize()) != -1)
+ return 1;
+ if (size != getdtablesize())
+ return 2;
;
return 0;
@@ -26745,12 +29532,14 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
+ ;;
+ esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
printf "%s\n" "$gl_cv_func_getdtablesize_works" >&6; }
case "$gl_cv_func_getdtablesize_works" in
- *yes) ;;
+ *yes | "no (limitation)") ;;
*) REPLACE_GETDTABLESIZE=1 ;;
esac
else
@@ -26876,6 +29665,425 @@ printf "%s\n" "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
+
+
+ HAVE_INET_PTON=1
+ INET_PTON_LIB=
+
+
+
+
+ if test $ac_cv_header_sys_socket_h != yes; then
+ ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
+if test "x$ac_cv_header_winsock2_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
+
+fi
+
+ fi
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ HAVE_WINSOCK2_H=1
+ UNISTD_H_HAVE_WINSOCK2_H=1
+ SYS_IOCTL_H_HAVE_WINSOCK2_H=1
+ else
+ HAVE_WINSOCK2_H=0
+ fi
+
+
+ if test $HAVE_WINSOCK2_H = 1; then
+ ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <ws2tcpip.h>
+"
+if test "x$ac_cv_have_decl_inet_pton" = xyes
+then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
+
+ if test $ac_cv_have_decl_inet_pton = yes; then
+ REPLACE_INET_PTON=1
+ INET_PTON_LIB="-lws2_32"
+ else
+ HAVE_DECL_INET_PTON=0
+ HAVE_INET_PTON=0
+ fi
+ else
+ gl_save_LIBS=$LIBS
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
+printf %s "checking for library containing inet_pton... " >&6; }
+if test ${ac_cv_search_inet_pton+y}
+then :
+ printf %s "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inet_pton ();
+int
+main (void)
+{
+return inet_pton ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' nsl resolv network
+do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_search_inet_pton=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if test ${ac_cv_search_inet_pton+y}
+then :
+ break
+fi
+done
+if test ${ac_cv_search_inet_pton+y}
+then :
+
+else
+ ac_cv_search_inet_pton=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
+printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
+ac_res=$ac_cv_search_inet_pton
+if test "$ac_res" != no
+then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else
+ ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
+if test "x$ac_cv_func_inet_pton" = xyes
+then :
+ printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
+
+fi
+
+ if test $ac_cv_func_inet_pton = no; then
+ HAVE_INET_PTON=0
+ fi
+
+fi
+
+ LIBS=$gl_save_LIBS
+
+ if test "$ac_cv_search_inet_pton" != "no" \
+ && test "$ac_cv_search_inet_pton" != "none required"; then
+ INET_PTON_LIB="$ac_cv_search_inet_pton"
+ fi
+
+
+ ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <arpa/inet.h>
+ #if HAVE_NETDB_H
+ # include <netdb.h>
+ #endif
+
+"
+if test "x$ac_cv_have_decl_inet_pton" = xyes
+then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
+
+ if test $ac_cv_have_decl_inet_pton = no; then
+ HAVE_DECL_INET_PTON=0
+ fi
+ fi
+
+
+ if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_NTOP = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS inet_pton.$ac_objext"
+
+
+
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_INET_PTON" != 1; then
+ if test "$GNULIB_INET_PTON" = 0; then
+ GNULIB_INET_PTON=$gl_module_indicator_condition
+ else
+ GNULIB_INET_PTON="($GNULIB_INET_PTON || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+printf %s "checking whether byte ordering is bigendian... " >&6; }
+if test ${ac_cv_c_bigendian+y}
+then :
+ printf %s "(cached) " >&6
+else
+ ac_cv_c_bigendian=unknown
+ # See if we're dealing with a universal compiler.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+ # Check for potential -arch flags. It is not universal unless
+ # there are at least two -arch flags with different values.
+ ac_arch=
+ ac_prev=
+ for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+ if test -n "$ac_prev"; then
+ case $ac_word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+ ac_arch=$ac_word
+ else
+ ac_cv_c_bigendian=universal
+ break
+ fi
+ ;;
+ esac
+ ac_prev=
+ elif test "x$ac_word" = "x-arch"; then
+ ac_prev=arch
+ fi
+ done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if sys/param.h defines the BYTE_ORDER macro.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main (void)
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+ && LITTLE_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main (void)
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main (void)
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ # It does; now see whether it defined to _BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main (void)
+{
+#ifndef _BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # Compile a test program.
+ if test "$cross_compiling" = yes
+then :
+ # Try to guess by grepping values from an object file.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+short int ascii_mm[] =
+ { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+ short int ascii_ii[] =
+ { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+ int use_ascii (int i) {
+ return ascii_mm[i] + ascii_ii[i];
+ }
+ short int ebcdic_ii[] =
+ { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+ short int ebcdic_mm[] =
+ { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+ int use_ebcdic (int i) {
+ return ebcdic_mm[i] + ebcdic_ii[i];
+ }
+ extern int foo;
+
+int
+main (void)
+{
+return use_ascii (foo) == use_ebcdic (foo);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+ ac_cv_c_bigendian=yes
+ fi
+ if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main (void)
+{
+
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long int l;
+ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+ return u.c[sizeof (long int) - 1] == 1;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ ac_cv_c_bigendian=no
+else
+ ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+printf "%s\n" "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+ yes)
+ printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
+;; #(
+ no)
+ ;; #(
+ universal)
+
+printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+
+ ;; #(
+ *)
+ as_fn_error $? "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ esac
+
+
+
+
+
+
PRIPTR_PREFIX=
if test -n "$STDINT_H"; then
PRIPTR_PREFIX='"l"'
@@ -27136,6 +30344,95 @@ printf "%s\n" "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
+ HAVE_IOCTL=1
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ HAVE_IOCTL=0
+ else
+ ac_fn_c_check_func "$LINENO" "ioctl" "ac_cv_func_ioctl"
+if test "x$ac_cv_func_ioctl" = xyes
+then :
+ printf "%s\n" "#define HAVE_IOCTL 1" >>confdefs.h
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ioctl with POSIX signature" >&5
+printf %s "checking for ioctl with POSIX signature... " >&6; }
+if test ${gl_cv_func_ioctl_posix_signature+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/ioctl.h>
+ /* On some platforms, ioctl() is declared in <unistd.h>. */
+ #include <unistd.h>
+
+int
+main (void)
+{
+extern
+ #ifdef __cplusplus
+ "C"
+ #endif
+ int ioctl (int, int, ...);
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_func_ioctl_posix_signature=yes
+else
+ gl_cv_func_ioctl_posix_signature=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ioctl_posix_signature" >&5
+printf "%s\n" "$gl_cv_func_ioctl_posix_signature" >&6; }
+ if test $gl_cv_func_ioctl_posix_signature != yes; then
+ REPLACE_IOCTL=1
+ fi
+ fi
+
+ if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS ioctl.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_IOCTL" != 1; then
+ if test "$GNULIB_IOCTL" = 0; then
+ GNULIB_IOCTL=$gl_module_indicator_condition
+ else
+ GNULIB_IOCTL="($GNULIB_IOCTL || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_IOCTL 1" >>confdefs.h
+
+
+
+
+
+
if test $ac_cv_func_link = no; then
HAVE_LINK=0
else
@@ -27153,10 +30450,10 @@ else
if test "$cross_compiling" = yes
then :
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_link_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_link_works="guessing no" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_link_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_link_works="guessing no" ;;
esac
else
@@ -27241,6 +30538,41 @@ printf "%s\n" "#define GNULIB_TEST_LINK 1" >>confdefs.h
+ if test "$ac_cv_header_winsock2_h" = yes; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS listen.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_LISTEN" != 1; then
+ if test "$GNULIB_LISTEN" = 0; then
+ GNULIB_LISTEN=$gl_module_indicator_condition
+ else
+ GNULIB_LISTEN="($GNULIB_LISTEN || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_LISTEN 1" >>confdefs.h
+
+
+
+
+
@@ -27415,8 +30747,14 @@ else
struct tm t;
char buf[16];
int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if defined __BEOS__ || defined __HAIKU__
+ return 1;
+#else
/* Check whether the given locale name is recognized by the system. */
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
@@ -27424,9 +30762,9 @@ int main () {
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
return 1;
-#else
+# else
if (setlocale (LC_ALL, "") == NULL) return 1;
-#endif
+# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
@@ -27435,32 +30773,33 @@ int main () {
some unit tests fail.
On MirBSD 10, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "UTF-8". */
-#if HAVE_LANGINFO_CODESET
+# if HAVE_LANGINFO_CODESET
{
const char *cs = nl_langinfo (CODESET);
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
|| strcmp (cs, "UTF-8") == 0)
return 1;
}
-#endif
-#ifdef __CYGWIN__
+# endif
+# ifdef __CYGWIN__
/* On Cygwin, avoid locale names without encoding suffix, because the
locale_charset() function relies on the encoding suffix. Note that
LC_ALL is set on the command line. */
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-#endif
+# endif
/* Check whether in the abbreviation of the second month, the second
character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
one byte long. This excludes the UTF-8 encoding. */
t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
-#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
+# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
-#endif
+# endif
return 0;
+#endif
}
_ACEOF
@@ -27681,9 +31020,14 @@ struct tm t;
char buf[16];
int main ()
{
- const char *p;
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if defined __BEOS__ || defined __HAIKU__
+ return 1;
+#else
/* Check whether the given locale name is recognized by the system. */
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
@@ -27691,9 +31035,9 @@ int main ()
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
return 1;
-#else
+# else
if (setlocale (LC_ALL, "") == NULL) return 1;
-#endif
+# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
@@ -27702,32 +31046,36 @@ int main ()
some unit tests fail.
On MirBSD 10, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "UTF-8". */
-#if HAVE_LANGINFO_CODESET
+# if HAVE_LANGINFO_CODESET
{
const char *cs = nl_langinfo (CODESET);
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
|| strcmp (cs, "UTF-8") == 0)
return 1;
}
-#endif
-#ifdef __CYGWIN__
+# endif
+# ifdef __CYGWIN__
/* On Cygwin, avoid locale names without encoding suffix, because the
locale_charset() function relies on the encoding suffix. Note that
LC_ALL is set on the command line. */
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-#endif
+# endif
/* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
on Cygwin 1.5.x. */
if (MB_CUR_MAX == 1)
return 1;
/* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
This excludes the UTF-8 encoding (except on MirBSD). */
- t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
- if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
- for (p = buf; *p != '\0'; p++)
- if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
- return 1;
+ {
+ const char *p;
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ }
return 0;
+#endif
}
_ACEOF
@@ -27822,9 +31170,14 @@ struct tm t;
char buf[16];
int main ()
{
- const char *p;
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if defined __BEOS__ || defined __HAIKU__
+ return 1;
+#else
/* Check whether the given locale name is recognized by the system. */
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
@@ -27832,9 +31185,9 @@ int main ()
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
return 1;
-#else
+# else
if (setlocale (LC_ALL, "") == NULL) return 1;
-#endif
+# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
@@ -27843,32 +31196,36 @@ int main ()
some unit tests fail.
On MirBSD 10, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "UTF-8". */
-#if HAVE_LANGINFO_CODESET
+# if HAVE_LANGINFO_CODESET
{
const char *cs = nl_langinfo (CODESET);
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
|| strcmp (cs, "UTF-8") == 0)
return 1;
}
-#endif
-#ifdef __CYGWIN__
+# endif
+# ifdef __CYGWIN__
/* On Cygwin, avoid locale names without encoding suffix, because the
locale_charset() function relies on the encoding suffix. Note that
LC_ALL is set on the command line. */
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-#endif
+# endif
/* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
This excludes the UTF-8 encoding (except on MirBSD). */
- t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
- if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
- for (p = buf; *p != '\0'; p++)
- if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
- return 1;
+ {
+ const char *p;
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ }
/* Check whether a typical GB18030 multibyte sequence is recognized as a
single wide character. This excludes the GB2312 and GBK encodings. */
if (mblen ("\203\062\332\066", 5) != 4)
return 1;
return 0;
+#endif
}
_ACEOF
@@ -28199,6 +31556,386 @@ printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
+
+
+
+
+
+ nanosleep_save_libs=$LIBS
+
+ # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
+ # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
+ LIB_NANOSLEEP=
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
+printf %s "checking for library containing nanosleep... " >&6; }
+if test ${ac_cv_search_nanosleep+y}
+then :
+ printf %s "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char nanosleep ();
+int
+main (void)
+{
+return nanosleep ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' rt posix4
+do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_search_nanosleep=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if test ${ac_cv_search_nanosleep+y}
+then :
+ break
+fi
+done
+if test ${ac_cv_search_nanosleep+y}
+then :
+
+else
+ ac_cv_search_nanosleep=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
+printf "%s\n" "$ac_cv_search_nanosleep" >&6; }
+ac_res=$ac_cv_search_nanosleep
+if test "$ac_res" != no
+then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ test "$ac_cv_search_nanosleep" = "none required" ||
+ LIB_NANOSLEEP=$ac_cv_search_nanosleep
+fi
+
+ if test "x$ac_cv_search_nanosleep" != xno; then
+
+
+ if test $APPLE_UNIVERSAL_BUILD = 1; then
+ # A universal build on Apple Mac OS X platforms.
+ # The test result would be 'no (mishandles large arguments)' in 64-bit
+ # mode but 'yes' in 32-bit mode. But we need a configuration result that
+ # is valid in both modes.
+ gl_cv_func_nanosleep='no (mishandles large arguments)'
+ fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working nanosleep" >&5
+printf %s "checking for working nanosleep... " >&6; }
+if test ${gl_cv_func_nanosleep+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes
+then :
+ case "$host_os" in linux*) # Guess it halfway works when the kernel is Linux.
+ gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
+ mingw*) # Guess no on native Windows.
+ gl_cv_func_nanosleep='guessing no' ;;
+ *) # If we don't know, assume the worst.
+ gl_cv_func_nanosleep='guessing no' ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <errno.h>
+ #include <limits.h>
+ #include <signal.h>
+ #if HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #include <time.h>
+ #include <unistd.h>
+ #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+ #define TYPE_MAXIMUM(t) \
+ ((t) (! TYPE_SIGNED (t) \
+ ? (t) -1 \
+ : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
+
+ static void
+ check_for_SIGALRM (int sig)
+ {
+ if (sig != SIGALRM)
+ _exit (1);
+ }
+
+ int
+ main ()
+ {
+ static struct timespec ts_sleep;
+ static struct timespec ts_remaining;
+ static struct sigaction act;
+ /* Test for major problems first. */
+ if (! nanosleep)
+ return 2;
+ act.sa_handler = check_for_SIGALRM;
+ sigemptyset (&act.sa_mask);
+ sigaction (SIGALRM, &act, NULL);
+ ts_sleep.tv_sec = 0;
+ ts_sleep.tv_nsec = 1;
+ alarm (1);
+ if (nanosleep (&ts_sleep, NULL) != 0)
+ return 3;
+ /* Test for a minor problem: the handling of large arguments. */
+ ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
+ ts_sleep.tv_nsec = 999999999;
+ alarm (1);
+ if (nanosleep (&ts_sleep, &ts_remaining) != -1)
+ return 4;
+ if (errno != EINTR)
+ return 5;
+ if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10)
+ return 6;
+ return 0;
+ }
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_nanosleep=yes
+else
+ case $? in 4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)';; *) gl_cv_func_nanosleep=no;;
+ esac
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nanosleep" >&5
+printf "%s\n" "$gl_cv_func_nanosleep" >&6; }
+ case "$gl_cv_func_nanosleep" in
+ *yes)
+ REPLACE_NANOSLEEP=0
+ ;;
+ *)
+ REPLACE_NANOSLEEP=1
+ case "$gl_cv_func_nanosleep" in
+ *"mishandles large arguments"*)
+
+printf "%s\n" "#define HAVE_BUG_BIG_NANOSLEEP 1" >>confdefs.h
+
+ ;;
+ *)
+ # The replacement uses select(). Add $LIBSOCKET to $LIB_NANOSLEEP.
+ for ac_lib in $LIBSOCKET; do
+ case " $LIB_NANOSLEEP " in
+ *" $ac_lib "*) ;;
+ *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";;
+ esac
+ done
+ ;;
+ esac
+ ;;
+ esac
+ else
+ HAVE_NANOSLEEP=0
+ fi
+ LIBS=$nanosleep_save_libs
+
+ if test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS nanosleep.$ac_objext"
+
+
+
+ :
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_NANOSLEEP" != 1; then
+ if test "$GNULIB_NANOSLEEP" = 0; then
+ GNULIB_NANOSLEEP=$gl_module_indicator_condition
+ else
+ GNULIB_NANOSLEEP="($GNULIB_NANOSLEEP || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_NANOSLEEP 1" >>confdefs.h
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
+printf %s "checking whether <netinet/in.h> is self-contained... " >&6; }
+if test ${gl_cv_header_netinet_in_h_selfcontained+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <netinet/in.h>
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_header_netinet_in_h_selfcontained=yes
+else
+ gl_cv_header_netinet_in_h_selfcontained=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
+printf "%s\n" "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
+ if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
+ NETINET_IN_H=''
+ else
+ NETINET_IN_H='netinet/in.h'
+ ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
+if test "x$ac_cv_header_netinet_in_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
+
+fi
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_netinet_in_h='<'netinet/in.h'>'
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
+printf %s "checking absolute name of <netinet/in.h>... " >&6; }
+if test ${gl_cv_next_netinet_in_h+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ if test $ac_cv_header_netinet_in_h = yes; then
+
+
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <netinet/in.h>
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'netinet/in.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_netinet_in_h
+ gl_cv_next_netinet_in_h='"'$gl_header'"'
+ else
+ gl_cv_next_netinet_in_h='<'netinet/in.h'>'
+ fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
+printf "%s\n" "$gl_cv_next_netinet_in_h" >&6; }
+ fi
+ NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'netinet/in.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_netinet_in_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
+
+
+
+
+ if test $ac_cv_header_netinet_in_h = yes; then
+ HAVE_NETINET_IN_H=1
+ else
+ HAVE_NETINET_IN_H=0
+ fi
+
+ fi
+
+ if test -n "$NETINET_IN_H"; then
+ GL_GENERATE_NETINET_IN_H_TRUE=
+ GL_GENERATE_NETINET_IN_H_FALSE='#'
+else
+ GL_GENERATE_NETINET_IN_H_TRUE='#'
+ GL_GENERATE_NETINET_IN_H_FALSE=
+fi
+
+
+
+
+
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
printf %s "checking for a traditional french locale... " >&6; }
if test ${gt_cv_locale_fr+y}
@@ -28219,8 +31956,14 @@ else
struct tm t;
char buf[16];
int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if defined __BEOS__ || defined __HAIKU__
+ return 1;
+#else
/* Check whether the given locale name is recognized by the system. */
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
@@ -28228,9 +31971,9 @@ int main () {
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
return 1;
-#else
+# else
if (setlocale (LC_ALL, "") == NULL) return 1;
-#endif
+# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
@@ -28239,32 +31982,33 @@ int main () {
some unit tests fail.
On MirBSD 10, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "UTF-8". */
-#if HAVE_LANGINFO_CODESET
+# if HAVE_LANGINFO_CODESET
{
const char *cs = nl_langinfo (CODESET);
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
|| strcmp (cs, "UTF-8") == 0)
return 1;
}
-#endif
-#ifdef __CYGWIN__
+# endif
+# ifdef __CYGWIN__
/* On Cygwin, avoid locale names without encoding suffix, because the
locale_charset() function relies on the encoding suffix. Note that
LC_ALL is set on the command line. */
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-#endif
+# endif
/* Check whether in the abbreviation of the second month, the second
character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
one byte long. This excludes the UTF-8 encoding. */
t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
-#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
+# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
-#endif
+# endif
return 0;
+#endif
}
_ACEOF
@@ -28463,12 +32207,16 @@ printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
+
case "$host_os" in
mingw* | pw*)
REPLACE_OPEN=1
;;
*)
+ if test "$gl_cv_macro_O_CLOEXEC" != yes; then
+ REPLACE_OPEN=1
+ fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
printf %s "checking whether open recognizes a trailing slash... " >&6; }
if test ${gl_cv_func_open_slash+y}
@@ -28629,6 +32377,158 @@ printf "%s\n" "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
+
+
+
+ if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
+ REPLACE_PERROR=1
+ fi
+ case ${gl_cv_func_strerror_r_works-unset} in
+ unset|*yes)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5
+printf %s "checking whether perror matches strerror... " >&6; }
+if test ${gl_cv_func_perror_works+y}
+then :
+ printf %s "(cached) " >&6
+else
+ if test "$cross_compiling" = yes
+then :
+ case "$host_os" in
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_perror_works="guessing yes" ;;
+ # Otherwise guess no.
+ *) gl_cv_func_perror_works="guessing no" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <errno.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+
+int
+main (void)
+{
+char *str = strerror (-1);
+ if (!getenv("CONFTEST_OUTPUT")) return 0;
+ if (!str) str = "";
+ puts (str);
+ errno = -1;
+ perror ("");
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
+ && cmp conftest.txt1 conftest.txt2 >/dev/null; then
+ gl_cv_func_perror_works=yes
+ else
+ gl_cv_func_perror_works=no
+ fi
+ rm -rf conftest.txt1 conftest.txt2
+else
+ gl_cv_func_perror_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
+printf "%s\n" "$gl_cv_func_perror_works" >&6; }
+ case "$gl_cv_func_perror_works" in
+ *yes) ;;
+ *) REPLACE_PERROR=1 ;;
+ esac
+ ;;
+ *)
+ REPLACE_PERROR=1
+ ;;
+ esac
+
+ if test $REPLACE_PERROR = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS perror.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_PERROR" != 1; then
+ if test "$GNULIB_PERROR" = 0; then
+ GNULIB_PERROR=$gl_module_indicator_condition
+ else
+ GNULIB_PERROR="($GNULIB_PERROR || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_PERROR 1" >>confdefs.h
+
+
+
+
+
+
+
+ if test $ac_cv_func_pipe != yes; then
+ HAVE_PIPE=0
+ fi
+
+ if test $HAVE_PIPE = 0; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS pipe.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_PIPE" != 1; then
+ if test "$GNULIB_PIPE" = 0; then
+ GNULIB_PIPE=$gl_module_indicator_condition
+ else
+ GNULIB_PIPE="($GNULIB_PIPE || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_PIPE 1" >>confdefs.h
+
+
+
+
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
printf %s "checking for putenv compatible with GNU and SVID... " >&6; }
if test ${gl_cv_func_svid_putenv+y}
@@ -28638,10 +32538,12 @@ else
if test "$cross_compiling" = yes
then :
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_svid_putenv="guessing no" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_svid_putenv="guessing no" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_svid_putenv="guessing no" ;;
esac
else
@@ -28804,6 +32706,81 @@ printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
+
+
+
+ ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
+if test "x$ac_cv_func_raise" = xyes
+then :
+ printf "%s\n" "#define HAVE_RAISE 1" >>confdefs.h
+
+fi
+
+ if test $ac_cv_func_raise = no; then
+ HAVE_RAISE=0
+ else
+
+
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ REPLACE_RAISE=1
+ fi
+
+
+
+
+
+ if test $gl_cv_type_sigset_t = yes; then
+ ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
+if test "x$ac_cv_func_sigprocmask" = xyes
+then :
+ gl_cv_func_sigprocmask=1
+fi
+
+ fi
+ if test -z "$gl_cv_func_sigprocmask"; then
+ HAVE_POSIX_SIGNALBLOCKING=0
+ fi
+
+ if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
+ :
+ fi
+
+ fi
+
+ if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS raise.$ac_objext"
+
+ :
+ fi
+
+
+
+
+
+ if test "$GNULIB_RAISE" != 1; then
+ if test "$GNULIB_RAISE" = 0; then
+ GNULIB_RAISE=$gl_module_indicator_condition
+ else
+ GNULIB_RAISE="($GNULIB_RAISE || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_RAISE 1" >>confdefs.h
+
+
+
:
@@ -28898,6 +32875,197 @@ printf "%s\n" "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
+
+
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ REPLACE_SELECT=1
+ else
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
+printf %s "checking whether select supports a 0 argument... " >&6; }
+if test ${gl_cv_func_select_supports0+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes
+then :
+
+ case "$host_os" in
+ # Guess no on Interix.
+ interix*) gl_cv_func_select_supports0="guessing no";;
+ # Guess yes otherwise.
+ *) gl_cv_func_select_supports0="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <sys/time.h>
+#if HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+int main ()
+{
+ struct timeval timeout;
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 5;
+ return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_select_supports0=yes
+else
+ gl_cv_func_select_supports0=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
+printf "%s\n" "$gl_cv_func_select_supports0" >&6; }
+ case "$gl_cv_func_select_supports0" in
+ *yes) ;;
+ *) REPLACE_SELECT=1 ;;
+ esac
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
+printf %s "checking whether select detects invalid fds... " >&6; }
+if test ${gl_cv_func_select_detects_ebadf+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes
+then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_select_detects_ebadf="guessing no" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <sys/time.h>
+#if HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
+#include <unistd.h>
+#include <errno.h>
+
+int
+main (void)
+{
+
+ fd_set set;
+ dup2(0, 16);
+ FD_ZERO(&set);
+ FD_SET(16, &set);
+ close(16);
+ struct timeval timeout;
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 5;
+ return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_select_detects_ebadf=yes
+else
+ gl_cv_func_select_detects_ebadf=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
+printf "%s\n" "$gl_cv_func_select_detects_ebadf" >&6; }
+ case $gl_cv_func_select_detects_ebadf in
+ *yes) ;;
+ *) REPLACE_SELECT=1 ;;
+ esac
+ fi
+
+ LIB_SELECT="$LIBSOCKET"
+ if test $REPLACE_SELECT = 1; then
+ case "$host_os" in
+ mingw*)
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+int
+main ()
+{
+ MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+else
+ LIB_SELECT="$LIB_SELECT -luser32"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ;;
+ esac
+ fi
+
+
+ if test $REPLACE_SELECT = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS select.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_SELECT" != 1; then
+ if test "$GNULIB_SELECT" = 0; then
+ GNULIB_SELECT=$gl_module_indicator_condition
+ else
+ GNULIB_SELECT="($GNULIB_SELECT || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_SELECT 1" >>confdefs.h
+
+
+
+
+
+
if test $ac_cv_func_setenv = no; then
HAVE_SETENV=0
else
@@ -28910,10 +33078,10 @@ else
if test "$cross_compiling" = yes
then :
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_setenv_works="guessing no" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_setenv_works="guessing no" ;;
esac
else
@@ -29072,8 +33240,14 @@ else
struct tm t;
char buf[16];
int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if defined __BEOS__ || defined __HAIKU__
+ return 1;
+#else
/* Check whether the given locale name is recognized by the system. */
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
@@ -29081,9 +33255,9 @@ int main () {
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
return 1;
-#else
+# else
if (setlocale (LC_ALL, "") == NULL) return 1;
-#endif
+# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
@@ -29092,32 +33266,33 @@ int main () {
some unit tests fail.
On MirBSD 10, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "UTF-8". */
-#if HAVE_LANGINFO_CODESET
+# if HAVE_LANGINFO_CODESET
{
const char *cs = nl_langinfo (CODESET);
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
|| strcmp (cs, "UTF-8") == 0)
return 1;
}
-#endif
-#ifdef __CYGWIN__
+# endif
+# ifdef __CYGWIN__
/* On Cygwin, avoid locale names without encoding suffix, because the
locale_charset() function relies on the encoding suffix. Note that
LC_ALL is set on the command line. */
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-#endif
+# endif
/* Check whether in the abbreviation of the second month, the second
character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
one byte long. This excludes the UTF-8 encoding. */
t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
-#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
+# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
-#endif
+# endif
return 0;
+#endif
}
_ACEOF
@@ -29338,9 +33513,14 @@ struct tm t;
char buf[16];
int main ()
{
- const char *p;
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if defined __BEOS__ || defined __HAIKU__
+ return 1;
+#else
/* Check whether the given locale name is recognized by the system. */
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
@@ -29348,9 +33528,9 @@ int main ()
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
return 1;
-#else
+# else
if (setlocale (LC_ALL, "") == NULL) return 1;
-#endif
+# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
@@ -29359,32 +33539,36 @@ int main ()
some unit tests fail.
On MirBSD 10, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "UTF-8". */
-#if HAVE_LANGINFO_CODESET
+# if HAVE_LANGINFO_CODESET
{
const char *cs = nl_langinfo (CODESET);
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
|| strcmp (cs, "UTF-8") == 0)
return 1;
}
-#endif
-#ifdef __CYGWIN__
+# endif
+# ifdef __CYGWIN__
/* On Cygwin, avoid locale names without encoding suffix, because the
locale_charset() function relies on the encoding suffix. Note that
LC_ALL is set on the command line. */
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-#endif
+# endif
/* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
on Cygwin 1.5.x. */
if (MB_CUR_MAX == 1)
return 1;
/* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
This excludes the UTF-8 encoding (except on MirBSD). */
- t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
- if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
- for (p = buf; *p != '\0'; p++)
- if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
- return 1;
+ {
+ const char *p;
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ }
return 0;
+#endif
}
_ACEOF
@@ -29479,9 +33663,14 @@ struct tm t;
char buf[16];
int main ()
{
- const char *p;
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if defined __BEOS__ || defined __HAIKU__
+ return 1;
+#else
/* Check whether the given locale name is recognized by the system. */
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
@@ -29489,9 +33678,9 @@ int main ()
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
return 1;
-#else
+# else
if (setlocale (LC_ALL, "") == NULL) return 1;
-#endif
+# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
@@ -29500,32 +33689,36 @@ int main ()
some unit tests fail.
On MirBSD 10, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "UTF-8". */
-#if HAVE_LANGINFO_CODESET
+# if HAVE_LANGINFO_CODESET
{
const char *cs = nl_langinfo (CODESET);
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
|| strcmp (cs, "UTF-8") == 0)
return 1;
}
-#endif
-#ifdef __CYGWIN__
+# endif
+# ifdef __CYGWIN__
/* On Cygwin, avoid locale names without encoding suffix, because the
locale_charset() function relies on the encoding suffix. Note that
LC_ALL is set on the command line. */
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-#endif
+# endif
/* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
This excludes the UTF-8 encoding (except on MirBSD). */
- t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
- if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
- for (p = buf; *p != '\0'; p++)
- if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
- return 1;
+ {
+ const char *p;
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ }
/* Check whether a typical GB18030 multibyte sequence is recognized as a
single wide character. This excludes the GB2312 and GBK encodings. */
if (mblen ("\203\062\332\066", 5) != 4)
return 1;
return 0;
+#endif
}
_ACEOF
@@ -29589,6 +33782,549 @@ printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
+ if test "$ac_cv_header_winsock2_h" = yes; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS setsockopt.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_SETSOCKOPT" != 1; then
+ if test "$GNULIB_SETSOCKOPT" = 0; then
+ GNULIB_SETSOCKOPT=$gl_module_indicator_condition
+ else
+ GNULIB_SETSOCKOPT="($GNULIB_SETSOCKOPT || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h
+
+
+
+
+
+
+ if test $ac_cv_func_sigaction = yes; then
+ ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
+"
+if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1" >>confdefs.h
+
+
+fi
+
+ if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
+ HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
+ fi
+ else
+ HAVE_SIGACTION=0
+ fi
+
+ if test $HAVE_SIGACTION = 0; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS sigaction.$ac_objext"
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
+#include <signal.h>
+
+"
+if test "x$ac_cv_type_siginfo_t" = xyes
+then :
+
+printf "%s\n" "#define HAVE_SIGINFO_T 1" >>confdefs.h
+
+
+fi
+
+ if test $ac_cv_type_siginfo_t = no; then
+ HAVE_SIGINFO_T=0
+ fi
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_SIGACTION" != 1; then
+ if test "$GNULIB_SIGACTION" = 0; then
+ GNULIB_SIGACTION=$gl_module_indicator_condition
+ else
+ GNULIB_SIGACTION="($GNULIB_SIGACTION || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_signal_h='<'signal.h'>'
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
+printf %s "checking absolute name of <signal.h>... " >&6; }
+if test ${gl_cv_next_signal_h+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <signal.h>
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'signal.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_signal_h
+ gl_cv_next_signal_h='"'$gl_header'"'
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
+printf "%s\n" "$gl_cv_next_signal_h" >&6; }
+ fi
+ NEXT_SIGNAL_H=$gl_cv_next_signal_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'signal.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_signal_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
+
+
+
+
+
+# AIX declares sig_atomic_t to already include volatile, and C89 compilers
+# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
+ ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
+#include <signal.h>
+
+"
+if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes
+then :
+
+else
+ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
+fi
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
+#include <signal.h>
+
+"
+if test "x$ac_cv_type_sighandler_t" = xyes
+then :
+
+else
+ HAVE_SIGHANDLER_T=0
+fi
+
+
+
+ for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
+ as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+printf %s "checking whether $gl_func is declared without a macro... " >&6; }
+if eval test \${$as_gl_Symbol+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <signal.h>
+
+int
+main (void)
+{
+#undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"
+then :
+ cat >>confdefs.h <<_ACEOF
+#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+ if test $gl_cv_type_sigset_t = yes; then
+ ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
+if test "x$ac_cv_func_sigprocmask" = xyes
+then :
+ gl_cv_func_sigprocmask=1
+fi
+
+ fi
+ if test -z "$gl_cv_func_sigprocmask"; then
+ HAVE_POSIX_SIGNALBLOCKING=0
+ fi
+
+ if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS sigprocmask.$ac_objext"
+
+ :
+ fi
+
+
+
+
+
+ if test "$GNULIB_SIGPROCMASK" != 1; then
+ if test "$GNULIB_SIGPROCMASK" = 0; then
+ GNULIB_SIGPROCMASK=$gl_module_indicator_condition
+ else
+ GNULIB_SIGPROCMASK="($GNULIB_SIGPROCMASK || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
+
+
+
+
+
+ ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
+"
+if test "x$ac_cv_have_decl_sleep" = xyes
+then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+printf "%s\n" "#define HAVE_DECL_SLEEP $ac_have_decl" >>confdefs.h
+
+
+ if test $ac_cv_have_decl_sleep != yes; then
+ HAVE_SLEEP=0
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
+printf %s "checking for working sleep... " >&6; }
+if test ${gl_cv_func_sleep_works+y}
+then :
+ printf %s "(cached) " >&6
+else
+ if test "$cross_compiling" = yes
+then :
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_sleep_works="guessing no" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_sleep_works="guessing no" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <errno.h>
+#include <unistd.h>
+#include <signal.h>
+static void
+handle_alarm (int sig)
+{
+ if (sig != SIGALRM)
+ _exit (2);
+}
+
+int
+main (void)
+{
+
+ /* Failure to compile this test due to missing alarm is okay,
+ since all such platforms (mingw) also lack sleep. */
+ unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */
+ unsigned int remaining;
+ signal (SIGALRM, handle_alarm);
+ alarm (1);
+ remaining = sleep (pentecost);
+ if (remaining > pentecost)
+ return 3;
+ if (remaining <= pentecost - 10)
+ return 4;
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_sleep_works=yes
+else
+ gl_cv_func_sleep_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
+printf "%s\n" "$gl_cv_func_sleep_works" >&6; }
+ case "$gl_cv_func_sleep_works" in
+ *yes) ;;
+ *)
+ REPLACE_SLEEP=1
+ ;;
+ esac
+ fi
+
+ if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS sleep.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_SLEEP" != 1; then
+ if test "$GNULIB_SLEEP" = 0; then
+ GNULIB_SLEEP=$gl_module_indicator_condition
+ else
+ GNULIB_SLEEP="($GNULIB_SLEEP || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
+
+
+
+
+
+ if test "$ac_cv_header_winsock2_h" = yes; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS socket.$ac_objext"
+
+ fi
+ # When this module is used, sockets may actually occur as file descriptors,
+ # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
+
+
+
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
+ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
+ fi
+
+
+
+
+
+ if test "$GNULIB_SOCKET" != 1; then
+ if test "$GNULIB_SOCKET" = 0; then
+ GNULIB_SOCKET=$gl_module_indicator_condition
+ else
+ GNULIB_SOCKET="($GNULIB_SOCKET || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_SOCKET 1" >>confdefs.h
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
+/* <sys/types.h> is not needed according to POSIX, but the
+ <sys/socket.h> in i386-unknown-freebsd4.10 and
+ powerpc-apple-darwin5.5 required it. */
+#include <sys/types.h>
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#elif HAVE_WS2TCPIP_H
+# include <ws2tcpip.h>
+#endif
+
+"
+if test "x$ac_cv_type_socklen_t" = xyes
+then :
+
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
+printf %s "checking for socklen_t equivalent... " >&6; }
+ if test ${gl_cv_socklen_t_equiv+y}
+then :
+ printf %s "(cached) " >&6
+else
+ # Systems have either "struct sockaddr *" or
+ # "void *" as the second argument to getpeername
+ gl_cv_socklen_t_equiv=
+ for arg2 in "struct sockaddr" void; do
+ for t in int size_t "unsigned int" "long int" "unsigned long int"; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/socket.h>
+
+ int getpeername (int, $arg2 *, $t *);
+int
+main (void)
+{
+$t len;
+ getpeername (0, 0, &len);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_socklen_t_equiv="$t"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$gl_cv_socklen_t_equiv" != "" && break
+ done
+ test "$gl_cv_socklen_t_equiv" != "" && break
+ done
+
+fi
+
+ if test "$gl_cv_socklen_t_equiv" = ""; then
+ as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
+printf "%s\n" "$gl_cv_socklen_t_equiv" >&6; }
+
+printf "%s\n" "#define socklen_t $gl_cv_socklen_t_equiv" >>confdefs.h
+
+fi
+
+
@@ -29641,6 +34377,74 @@ printf "%s\n" "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
+
+
+
+
+ if test $ac_cv_have_decl_strerror_r = no; then
+ HAVE_DECL_STRERROR_R=0
+ fi
+
+ if test $ac_cv_func_strerror_r = yes; then
+ if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
+ if test $gl_cv_func_strerror_r_posix_signature = yes; then
+ case "$gl_cv_func_strerror_r_works" in
+ *no) REPLACE_STRERROR_R=1 ;;
+ esac
+ else
+ REPLACE_STRERROR_R=1
+ fi
+ else
+ REPLACE_STRERROR_R=1
+ fi
+ fi
+
+ if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS strerror_r.$ac_objext"
+
+
+
+
+
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_STRERROR_R" != 1; then
+ if test "$GNULIB_STRERROR_R" = 0; then
+ GNULIB_STRERROR_R=$gl_module_indicator_condition
+ else
+ GNULIB_STRERROR_R="($GNULIB_STRERROR_R || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
+
+
+
+
+
+printf "%s\n" "#define GNULIB_STRERROR_R_POSIX $gl_module_indicator_condition" >>confdefs.h
+
+
+
+
+
if test $ac_cv_func_symlink = no; then
HAVE_SYMLINK=0
else
@@ -29653,10 +34457,10 @@ else
if test "$cross_compiling" = yes
then :
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_symlink_works="guessing no" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_symlink_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_symlink_works="guessing no" ;;
esac
else
@@ -29738,6 +34542,268 @@ printf "%s\n" "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
+
+ if test $ac_cv_header_sys_ioctl_h = yes; then
+ HAVE_SYS_IOCTL_H=1
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/ioctl.h> declares ioctl" >&5
+printf %s "checking whether <sys/ioctl.h> declares ioctl... " >&6; }
+if test ${gl_cv_decl_ioctl_in_sys_ioctl_h+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/ioctl.h>
+
+int
+main (void)
+{
+(void) ioctl;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_decl_ioctl_in_sys_ioctl_h=yes
+else
+ gl_cv_decl_ioctl_in_sys_ioctl_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_ioctl_in_sys_ioctl_h" >&5
+printf "%s\n" "$gl_cv_decl_ioctl_in_sys_ioctl_h" >&6; }
+ else
+ HAVE_SYS_IOCTL_H=0
+ fi
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/ioctl.h>" >&5
+printf %s "checking absolute name of <sys/ioctl.h>... " >&6; }
+if test ${gl_cv_next_sys_ioctl_h+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ if test $ac_cv_header_sys_ioctl_h = yes; then
+
+
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/ioctl.h>
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'sys/ioctl.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_sys_ioctl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_sys_ioctl_h
+ gl_cv_next_sys_ioctl_h='"'$gl_header'"'
+ else
+ gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
+ fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_ioctl_h" >&5
+printf "%s\n" "$gl_cv_next_sys_ioctl_h" >&6; }
+ fi
+ NEXT_SYS_IOCTL_H=$gl_cv_next_sys_ioctl_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'sys/ioctl.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_sys_ioctl_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H=$gl_next_as_first_directive
+
+
+
+
+
+
+ for gl_func in ioctl; do
+ as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+printf %s "checking whether $gl_func is declared without a macro... " >&6; }
+if eval test \${$as_gl_Symbol+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/ioctl.h>
+/* Some platforms declare ioctl in the wrong header. */
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
+# include <unistd.h>
+#endif
+
+int
+main (void)
+{
+#undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"
+then :
+ cat >>confdefs.h <<_ACEOF
+#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_sys_uio_h='<'sys/uio.h'>'
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
+printf %s "checking absolute name of <sys/uio.h>... " >&6; }
+if test ${gl_cv_next_sys_uio_h+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ if test $ac_cv_header_sys_uio_h = yes; then
+
+
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/uio.h>
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'sys/uio.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_sys_uio_h
+ gl_cv_next_sys_uio_h='"'$gl_header'"'
+ else
+ gl_cv_next_sys_uio_h='<'sys/uio.h'>'
+ fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
+printf "%s\n" "$gl_cv_next_sys_uio_h" >&6; }
+ fi
+ NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'sys/uio.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_sys_uio_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
+
+
+
+
+ if test $ac_cv_header_sys_uio_h = yes; then
+ HAVE_SYS_UIO_H=1
+ else
+ HAVE_SYS_UIO_H=0
+ fi
+
+
+
+
+
+
if test $ac_cv_have_decl_unsetenv = no; then
HAVE_DECL_UNSETENV=0
fi
@@ -29927,8 +34993,14 @@ else
struct tm t;
char buf[16];
int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if defined __BEOS__ || defined __HAIKU__
+ return 1;
+#else
/* Check whether the given locale name is recognized by the system. */
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
@@ -29936,9 +35008,9 @@ int main () {
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
return 1;
-#else
+# else
if (setlocale (LC_ALL, "") == NULL) return 1;
-#endif
+# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
@@ -29947,32 +35019,33 @@ int main () {
some unit tests fail.
On MirBSD 10, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "UTF-8". */
-#if HAVE_LANGINFO_CODESET
+# if HAVE_LANGINFO_CODESET
{
const char *cs = nl_langinfo (CODESET);
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
|| strcmp (cs, "UTF-8") == 0)
return 1;
}
-#endif
-#ifdef __CYGWIN__
+# endif
+# ifdef __CYGWIN__
/* On Cygwin, avoid locale names without encoding suffix, because the
locale_charset() function relies on the encoding suffix. Note that
LC_ALL is set on the command line. */
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-#endif
+# endif
/* Check whether in the abbreviation of the second month, the second
character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
one byte long. This excludes the UTF-8 encoding. */
t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
-#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
+# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
-#endif
+# endif
return 0;
+#endif
}
_ACEOF
@@ -30193,9 +35266,14 @@ struct tm t;
char buf[16];
int main ()
{
- const char *p;
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if defined __BEOS__ || defined __HAIKU__
+ return 1;
+#else
/* Check whether the given locale name is recognized by the system. */
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
@@ -30203,9 +35281,9 @@ int main ()
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
return 1;
-#else
+# else
if (setlocale (LC_ALL, "") == NULL) return 1;
-#endif
+# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
@@ -30214,32 +35292,36 @@ int main ()
some unit tests fail.
On MirBSD 10, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "UTF-8". */
-#if HAVE_LANGINFO_CODESET
+# if HAVE_LANGINFO_CODESET
{
const char *cs = nl_langinfo (CODESET);
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
|| strcmp (cs, "UTF-8") == 0)
return 1;
}
-#endif
-#ifdef __CYGWIN__
+# endif
+# ifdef __CYGWIN__
/* On Cygwin, avoid locale names without encoding suffix, because the
locale_charset() function relies on the encoding suffix. Note that
LC_ALL is set on the command line. */
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-#endif
+# endif
/* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
on Cygwin 1.5.x. */
if (MB_CUR_MAX == 1)
return 1;
/* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
This excludes the UTF-8 encoding (except on MirBSD). */
- t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
- if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
- for (p = buf; *p != '\0'; p++)
- if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
- return 1;
+ {
+ const char *p;
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ }
return 0;
+#endif
}
_ACEOF
@@ -30334,9 +35416,14 @@ struct tm t;
char buf[16];
int main ()
{
- const char *p;
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if defined __BEOS__ || defined __HAIKU__
+ return 1;
+#else
/* Check whether the given locale name is recognized by the system. */
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
@@ -30344,9 +35431,9 @@ int main ()
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
return 1;
-#else
+# else
if (setlocale (LC_ALL, "") == NULL) return 1;
-#endif
+# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
@@ -30355,32 +35442,36 @@ int main ()
some unit tests fail.
On MirBSD 10, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "UTF-8". */
-#if HAVE_LANGINFO_CODESET
+# if HAVE_LANGINFO_CODESET
{
const char *cs = nl_langinfo (CODESET);
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
|| strcmp (cs, "UTF-8") == 0)
return 1;
}
-#endif
-#ifdef __CYGWIN__
+# endif
+# ifdef __CYGWIN__
/* On Cygwin, avoid locale names without encoding suffix, because the
locale_charset() function relies on the encoding suffix. Note that
LC_ALL is set on the command line. */
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-#endif
+# endif
/* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
This excludes the UTF-8 encoding (except on MirBSD). */
- t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
- if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
- for (p = buf; *p != '\0'; p++)
- if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
- return 1;
+ {
+ const char *p;
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ }
/* Check whether a typical GB18030 multibyte sequence is recognized as a
single wide character. This excludes the GB2312 and GBK encodings. */
if (mblen ("\203\062\332\066", 5) != 4)
return 1;
return 0;
+#endif
}
_ACEOF
@@ -30464,6 +35555,20 @@ printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
+# The test suite needs to know if we have a working perl.
+# FIXME: this is suboptimal. Ideally, we would be able to call gl_PERL
+# with an ACTION-IF-NOT-FOUND argument ...
+cu_have_perl=yes
+case $PERL in *"/missing "*) cu_have_perl=no;; esac
+ if test $cu_have_perl = yes; then
+ HAVE_PERL_TRUE=
+ HAVE_PERL_FALSE='#'
+else
+ HAVE_PERL_TRUE='#'
+ HAVE_PERL_FALSE=
+fi
+
+
# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
# ------------------------------------------------
# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
@@ -31020,7 +36125,7 @@ then :
additional_includedir="$withval/include"
additional_libdir="$withval/$acl_libdirstem"
if test "$acl_libdirstem2" != "$acl_libdirstem" \
- && ! test -d "$withval/$acl_libdirstem"; then
+ && test ! -d "$withval/$acl_libdirstem"; then
additional_libdir="$withval/$acl_libdirstem2"
fi
fi
@@ -31917,7 +37022,7 @@ then :
additional_includedir="$withval/include"
additional_libdir="$withval/$acl_libdirstem"
if test "$acl_libdirstem2" != "$acl_libdirstem" \
- && ! test -d "$withval/$acl_libdirstem"; then
+ && test ! -d "$withval/$acl_libdirstem"; then
additional_libdir="$withval/$acl_libdirstem2"
fi
fi
@@ -32561,30 +37666,6 @@ if test "x$enable_i18n" = xno; then
ac_cv_func_wcscoll=no
fi
-# Check whether --enable-regex-tests was given.
-if test ${enable_regex_tests+y}
-then :
- enableval=$enable_regex_tests; if test "x$with_included_regex" = xno; then
- enable_regex_tests=no
-fi
-else
- enable_regex_tests=$with_included_regex
-fi
-
-
- if test "x$enable_regex_tests" = xyes; then
- TEST_REGEX_TRUE=
- TEST_REGEX_FALSE='#'
-else
- TEST_REGEX_TRUE='#'
- TEST_REGEX_FALSE=
-fi
-
-if test "x$enable_regex_tests" = xyes; then
-
-printf "%s\n" "#define _REGEX_RE_COMP 1" >>confdefs.h
-
-fi
# Determine whether we should run UTF-8 tests by checking if cyrillic
# letters are case-folded properly. The test for UTF-8 locales (both
@@ -32733,7 +37814,15 @@ fi
if test "$gl_gcc_warnings" = yes; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
printf %s "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
if test ${gl_cv_warn_c__Werror__Wunknown_warning_option+y}
then :
@@ -32773,6 +37862,14 @@ else
gl_unknown_warnings_are_errors=
fi
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
printf %s "checking whether C compiler handles -Werror... " >&6; }
@@ -32825,6 +37922,13 @@ fi
nw="$nw -Wswitch-default" # Too many warnings for now
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
if test -n "$GCC"; then
@@ -32942,14 +38046,13 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
# To compare this list to your installed GCC's, run this Bash command:
#
# comm -3 \
- # <(sed -n 's/^ *\(-[^ ]*\) .*/\1/p' manywarnings.m4 | sort) \
+ # <(sed -n 's/^ *\(-[^ 0-9][^ ]*\) .*/\1/p' manywarnings.m4 | sort) \
# <(gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort |
- # grep -v -x -f <(
+ # grep -v -x -F -f <(
# awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec))
gl_manywarn_set=
- for gl_manywarn_item in \
- -fno-common \
+ for gl_manywarn_item in -fno-common \
-W \
-Wabi \
-Waddress \
@@ -32958,6 +38061,8 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
-Wattributes \
-Wbad-function-cast \
-Wbool-compare \
+ -Wbool-operation \
+ -Wbuiltin-declaration-mismatch \
-Wbuiltin-macro-redefined \
-Wcast-align \
-Wchar-subscripts \
@@ -32967,6 +38072,7 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
-Wcomments \
-Wcoverage-mismatch \
-Wcpp \
+ -Wdangling-else \
-Wdate-time \
-Wdeprecated \
-Wdeprecated-declarations \
@@ -32976,10 +38082,13 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
-Wdiscarded-qualifiers \
-Wdiv-by-zero \
-Wdouble-promotion \
+ -Wduplicated-branches \
-Wduplicated-cond \
+ -Wduplicate-decl-specifier \
-Wempty-body \
-Wendif-labels \
-Wenum-compare \
+ -Wexpansion-to-defined \
-Wextra \
-Wformat-contains-nul \
-Wformat-extra-args \
@@ -33000,6 +38109,7 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
-Winit-self \
-Winline \
-Wint-conversion \
+ -Wint-in-bool-context \
-Wint-to-pointer-cast \
-Winvalid-memory-model \
-Winvalid-pch \
@@ -33008,6 +38118,7 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
-Wlogical-op \
-Wmain \
-Wmaybe-uninitialized \
+ -Wmemset-elt-size \
-Wmemset-transposed-args \
-Wmisleading-indentation \
-Wmissing-braces \
@@ -33033,9 +38144,12 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
-Wpacked-bitfield-compat \
-Wparentheses \
-Wpointer-arith \
+ -Wpointer-compare \
-Wpointer-sign \
-Wpointer-to-int-cast \
-Wpragmas \
+ -Wpsabi \
+ -Wrestrict \
-Wreturn-local-addr \
-Wreturn-type \
-Wscalar-storage-order \
@@ -33059,6 +38173,7 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
-Wswitch \
-Wswitch-bool \
-Wswitch-default \
+ -Wswitch-unreachable \
-Wsync-nand \
-Wsystem-headers \
-Wtautological-compare \
@@ -33092,10 +38207,39 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
# gcc --help=warnings outputs an unusual form for these options; list
# them here so that the above 'comm' command doesn't report a false match.
+ # Would prefer "min (PTRDIFF_MAX, SIZE_MAX)", but it must be a literal.
+ # Also, AC_COMPUTE_INT requires it to fit in a long; it is 2**63 on
+ # the only platforms where it does not fit in a long, so make that
+ # a special case.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking max safe object size" >&5
+printf %s "checking max safe object size... " >&6; }
+ if ac_fn_c_compute_int "$LINENO" "LONG_MAX < (PTRDIFF_MAX < (size_t) -1 ? PTRDIFF_MAX : (size_t) -1)
+ ? -1
+ : PTRDIFF_MAX < (size_t) -1 ? (long) PTRDIFF_MAX : (long) (size_t) -1" "gl_alloc_max" "#include <limits.h>
+ #include <stddef.h>
+ #include <stdint.h>
+ "
+then :
+
+else
+ gl_alloc_max=2147483647
+fi
+
+ case $gl_alloc_max in
+ -1) gl_alloc_max=9223372036854775807;;
+ esac
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_alloc_max" >&5
+printf "%s\n" "$gl_alloc_max" >&6; }
+ gl_manywarn_set="$gl_manywarn_set -Walloc-size-larger-than=$gl_alloc_max"
gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2"
+ gl_manywarn_set="$gl_manywarn_set -Wformat-overflow=2"
+ gl_manywarn_set="$gl_manywarn_set -Wformat-truncation=2"
+ gl_manywarn_set="$gl_manywarn_set -Wimplicit-fallthrough=5"
gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc"
gl_manywarn_set="$gl_manywarn_set -Wshift-overflow=2"
+ gl_manywarn_set="$gl_manywarn_set -Wstringop-overflow=2"
gl_manywarn_set="$gl_manywarn_set -Wunused-const-variable=2"
+ gl_manywarn_set="$gl_manywarn_set -Wvla-larger-than=4031"
# These are needed for older GCC versions.
if test -n "$GCC"; then
@@ -33119,6 +38263,13 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
ws=$gl_manywarn_set
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
gl_warn_set=
set x $ws; shift
@@ -33136,6 +38287,7 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
for w in $ws; do
+
as_gl_Warn=`printf "%s\n" "gl_cv_warn_c_$w" | $as_tr_sh`
gl_positive="$w"
case $gl_positive in
@@ -33183,6 +38335,7 @@ fi
done
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
printf %s "checking whether C compiler handles -Wno-sign-compare... " >&6; }
if test ${gl_cv_warn_c__Wno_sign_compare+y}
@@ -33257,6 +38410,7 @@ fi
printf "%s\n" "$utils_cv_clang" >&6; }
if test $utils_cv_clang = yes; then
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-extra-args" >&5
printf %s "checking whether C compiler handles -Wno-format-extra-args... " >&6; }
if test ${gl_cv_warn_c__Wno_format_extra_args+y}
@@ -33297,6 +38451,7 @@ fi
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare" >&5
printf %s "checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare... " >&6; }
if test ${gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare+y}
@@ -33339,6 +38494,7 @@ fi
fi
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
printf %s "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
if test ${gl_cv_warn_c__fdiagnostics_show_option+y}
@@ -33379,6 +38535,7 @@ fi
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
printf %s "checking whether C compiler handles -funit-at-a-time... " >&6; }
if test ${gl_cv_warn_c__funit_at_a_time+y}
@@ -33776,6 +38933,11 @@ fi
+if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
+ as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
gltests_libobjs=
gltests_ltlibobjs=
if test -n "$gltests_LIBOBJS"; then
@@ -33791,12 +38953,12 @@ fi
gltests_LTLIBOBJS=$gltests_ltlibobjs
-if test -z "${TEST_SYMLINKS_TRUE}" && test -z "${TEST_SYMLINKS_FALSE}"; then
- as_fn_error $? "conditional \"TEST_SYMLINKS\" was never defined.
+if test -z "${HAVE_PERL_TRUE}" && test -z "${HAVE_PERL_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_PERL\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${TEST_REGEX_TRUE}" && test -z "${TEST_REGEX_FALSE}"; then
- as_fn_error $? "conditional \"TEST_REGEX\" was never defined.
+if test -z "${TEST_SYMLINKS_TRUE}" && test -z "${TEST_SYMLINKS_FALSE}"; then
+ as_fn_error $? "conditional \"TEST_SYMLINKS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${CROSS_COMPILING_TRUE}" && test -z "${CROSS_COMPILING_FALSE}"; then
@@ -34180,8 +39342,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by GNU sed $as_me 4.4, which was
-generated by GNU Autoconf 2.69.183-96821. Invocation command line was
+This file was extended by GNU sed $as_me 4.5, which was
+generated by GNU Autoconf 2.69.193-8974. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -34245,18 +39407,18 @@ Configuration commands:
$config_commands
Report bugs to <bug-sed@gnu.org>.
-GNU sed home page: <http://www.gnu.org/software/sed/>.
-General help using GNU software: <http://www.gnu.org/gethelp/>."
+GNU sed home page: <https://www.gnu.org/software/sed/>.
+General help using GNU software: <https://www.gnu.org/gethelp/>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`printf "%s\n" "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-GNU sed config.status 4.4
-configured by $0, generated by GNU Autoconf 2.69.183-96821,
+GNU sed config.status 4.5
+configured by $0, generated by GNU Autoconf 2.69.193-8974,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2016 Free Software Foundation, Inc.
+Copyright (C) 2017 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
diff --git a/configure.ac b/configure.ac
index 8076382..4c57d68 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-# Copyright (C) 1993-2017 Free Software Foundation, Inc.
+# Copyright (C) 1993-2018 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
@@ -11,7 +11,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
dnl Process this file with -*- autoconf -*- to produce a configure script.
AC_INIT([GNU sed],
@@ -32,6 +32,13 @@ gl_EARLY
gl_INIT
gl_DISABLE_THREADS
+# The test suite needs to know if we have a working perl.
+# FIXME: this is suboptimal. Ideally, we would be able to call gl_PERL
+# with an ACTION-IF-NOT-FOUND argument ...
+cu_have_perl=yes
+case $PERL in *"/missing "*) cu_have_perl=no;; esac
+AM_CONDITIONAL([HAVE_PERL], [test $cu_have_perl = yes])
+
# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
# ------------------------------------------------
# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
@@ -123,18 +130,6 @@ if test "x$enable_i18n" = xno; then
ac_cv_func_wcscoll=no
fi
-AC_ARG_ENABLE(regex-tests,
-[ --enable-regex-tests enable regex matcher regression tests (default=yes)],
-[if test "x$with_included_regex" = xno; then
- enable_regex_tests=no
-fi],
-enable_regex_tests=$with_included_regex)
-
-AM_CONDITIONAL(TEST_REGEX, test "x$enable_regex_tests" = xyes)
-if test "x$enable_regex_tests" = xyes; then
- AC_DEFINE_UNQUOTED([_REGEX_RE_COMP], 1,
- [Include BSD functions in regex, used by the testsuite])
-fi
# Determine whether we should run UTF-8 tests by checking if cyrillic
# letters are case-folded properly. The test for UTF-8 locales (both
diff --git a/doc/config.texi b/doc/config.texi
index 42c0b76..69f2198 100644
--- a/doc/config.texi
+++ b/doc/config.texi
@@ -5,8 +5,8 @@
@end direntry
@clear PERL
-@set SSEDEXT @acronym{GNU} extensions
-@set SSED @acronym{GNU} @command{sed}
+@set SSEDEXT GNU extensions
+@set SSED GNU @command{sed}
@c Ugly hack to enable using new texinfo commands '@codequotebacktick'
@c and '@codequoteundirected' or define empty fallbacks if they are
@@ -33,3 +33,35 @@
@end macro
@end ifcommandnotdefined
@end ifset
+
+
+@c define variables that will render as characters
+@c on both HTML (with @U{}) and PDF (with greek symbols).
+@c Use with: @value{ucsigma}
+@c
+@c Based on:
+@c https://lists.gnu.org/archive/html/help-texinfo/2012-06/msg00004.html
+@iftex
+@set ucsigma @math{@Sigma{}}
+@end iftex
+@ifnottex
+@set ucsigma @U{03A3}
+@end ifnottex
+
+@iftex
+@set lcsigma @math{@sigma{}}
+@end iftex
+@ifnottex
+@set lcsigma @U{03C3}
+@end ifnottex
+
+@c Unicode Replacement Character (U+FFFD):
+@c no easy/portable tex equivalent, so use another
+@c distinct symbol (which will be rendered very differently
+@c than ascii characters in @examples.
+@iftex
+@set unicodeFFFD @math{@otimes{}}
+@end iftex
+@ifnottex
+@set unicodeFFFD @U{FFFD}
+@end ifnottex
diff --git a/doc/fdl.texi b/doc/fdl.texi
index 9c3bbe5..542edaa 100644
--- a/doc/fdl.texi
+++ b/doc/fdl.texi
@@ -6,7 +6,7 @@
@display
Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
-@uref{http://fsf.org/}
+@uref{https://fsf.org/}
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -414,7 +414,7 @@ The Free Software Foundation may publish new, revised versions
of the GNU Free Documentation License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns. See
-@uref{http://www.gnu.org/copyleft/}.
+@uref{https://www.gnu.org/copyleft/}.
Each version of the License is given a distinguishing version number.
If the Document specifies that a particular numbered version of this
diff --git a/doc/local.mk b/doc/local.mk
index 3026c64..3031692 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -11,7 +11,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
info_TEXINFOS = doc/sed.texi
doc_sed_TEXINFOS = doc/config.texi doc/version.texi doc/fdl.texi
diff --git a/doc/sed-dummy.1 b/doc/sed-dummy.1
index 3832baf..e98258a 100644
--- a/doc/sed-dummy.1
+++ b/doc/sed-dummy.1
@@ -13,5 +13,5 @@ cross-compilation).
For the full documentation for
.B sed
see
-.UR http://www.gnu.org/software/sed
-GNU SED Website (http://www.gnu.org/software/sed)
+.UR https://www.gnu.org/software/sed
+GNU SED Website (https://www.gnu.org/software/sed)
diff --git a/doc/sed.1 b/doc/sed.1
index 2db3cdc..3a85f27 100644
--- a/doc/sed.1
+++ b/doc/sed.1
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.28.
-.TH SED "1" "February 2017" "sed 4.4" "User Commands"
+.TH SED "1" "March 2018" "sed 4.5" "User Commands"
.SH NAME
sed \- stream editor for filtering and transforming text
.SH SYNOPSIS
@@ -60,7 +60,7 @@ continuous long stream.
.HP
\fB\-\-sandbox\fR
.IP
-operate in sandbox mode.
+operate in sandbox mode (disable e/r/w commands).
.HP
\fB\-u\fR, \fB\-\-unbuffered\fR
.IP
@@ -82,8 +82,8 @@ non-option argument is taken as the sed script to interpret. All
remaining arguments are names of input files; if no input files are
specified, then the standard input is read.
.PP
-GNU sed home page: <http://www.gnu.org/software/sed/>.
-General help using GNU software: <http://www.gnu.org/gethelp/>.
+GNU sed home page: <https://www.gnu.org/software/sed/>.
+General help using GNU software: <https://www.gnu.org/gethelp/>.
E-mail bug reports to: <bug-sed@gnu.org>.
.SH "COMMAND SYNOPSIS"
This is just a brief synopsis of \*(sd commands to serve as
@@ -317,6 +317,8 @@ Match the last line.
.RI / regexp /
Match lines matching the regular expression
.IR regexp .
+Matching is performed on the current pattern space, which
+can be modified with commands such as ``s///''.
.TP
.BI \fR\e\fPc regexp c
Match lines matching the regular expression
@@ -383,12 +385,12 @@ of your report if at all possible.
.SH AUTHOR
Written by Jay Fenlason, Tom Lord, Ken Pizzini,
and Paolo Bonzini.
-GNU sed home page: <http://www.gnu.org/software/sed/>.
-General help using GNU software: <http://www.gnu.org/gethelp/>.
+GNU sed home page: <https://www.gnu.org/software/sed/>.
+General help using GNU software: <https://www.gnu.org/gethelp/>.
E-mail bug reports to: <bug-sed@gnu.org>.
.SH COPYRIGHT
-Copyright \(co 2017 Free Software Foundation, Inc.
-License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
+Copyright \(co 2018 Free Software Foundation, Inc.
+License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
.br
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
diff --git a/doc/sed.info b/doc/sed.info
index 92e42d4..98df6d4 100644
--- a/doc/sed.info
+++ b/doc/sed.info
@@ -1,8 +1,8 @@
-This is sed.info-t, produced by makeinfo version 6.3 from sed.texi.
+This is sed.info, produced by makeinfo version 6.3 from sed.texi.
-This file documents version 4.4 of GNU 'sed', a stream editor.
+This file documents version 4.5 of GNU 'sed', a stream editor.
- Copyright (C) 1998-2017 Free Software Foundation, Inc.
+ Copyright (C) 1998-2018 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
@@ -17,14 +17,14 @@ START-INFO-DIR-ENTRY
END-INFO-DIR-ENTRY

-File: sed.info-t, Node: Top, Next: Introduction, Up: (dir)
+File: sed.info, Node: Top, Next: Introduction, Up: (dir)
GNU 'sed'
*********
-This file documents version 4.4 of GNU 'sed', a stream editor.
+This file documents version 4.5 of GNU 'sed', a stream editor.
- Copyright (C) 1998-2017 Free Software Foundation, Inc.
+ Copyright (C) 1998-2018 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
@@ -51,7 +51,7 @@ This file documents version 4.4 of GNU 'sed', a stream editor.
command-line options.

-File: sed.info-t, Node: Introduction, Next: Invoking sed, Prev: Top, Up: Top
+File: sed.info, Node: Introduction, Next: Invoking sed, Prev: Top, Up: Top
1 Introduction
**************
@@ -65,7 +65,7 @@ text in a pipeline which particularly distinguishes it from other types
of editors.

-File: sed.info-t, Node: Invoking sed, Next: sed scripts, Prev: Introduction, Up: Top
+File: sed.info, Node: Invoking sed, Next: sed scripts, Prev: Introduction, Up: Top
2 Running sed
*************
@@ -80,7 +80,7 @@ individual 'sed' commands are discussed in the next chapter.
* Exit status::

-File: sed.info-t, Node: Overview, Next: Command-Line Options, Up: Invoking sed
+File: sed.info, Node: Overview, Next: Command-Line Options, Up: Invoking sed
2.1 Overview
============
@@ -107,7 +107,7 @@ in-place instead of printing to standard output. See also the 'W' and
's///w' commands for writing output to other files. The following
command modifies 'file.txt' and does not produce any output:
- sed -i 's/hello/world' file.txt
+ sed -i 's/hello/world/' file.txt
By default 'sed' prints all processed input (except input that has
been modified/deleted by commands such as 'd'). Use '-n' to suppress
@@ -141,7 +141,7 @@ effective SCRIPT will be concatenation of all the individual SCRIPTs).
sed --file=myscript.sed input.txt > output.txt

-File: sed.info-t, Node: Command-Line Options, Next: Exit status, Prev: Overview, Up: Invoking sed
+File: sed.info, Node: Command-Line Options, Next: Exit status, Prev: Overview, Up: Invoking sed
2.2 Command-Line Options
========================
@@ -202,6 +202,23 @@ The full format for invoking 'sed' is:
If no extension is supplied, the original file is overwritten
without making a backup.
+ Because '-i' takes an optional argument, it should not be followed
+ by other short options:
+ 'sed -Ei '...' FILE'
+ Same as '-E -i' with no backup suffix - 'FILE' will be edited
+ in-place without creating a backup.
+
+ 'sed -iE '...' FILE'
+ This is equivalent to '--in-place=E', creating 'FILEE' as
+ backup of 'FILE'
+
+ Be cautious of using '-n' with '-i': the former disables automatic
+ printing of lines and the latter changes the file in-place without
+ a backup. Used carelessly (and without an explicit 'p' command),
+ the output file will be empty:
+ # WRONG USAGE: 'FILE' will be truncated.
+ sed -ni 's/foo/bar/' FILE
+
'-l N'
'--line-length=N'
Specify the default line-wrap length for the 'l' command. A length
@@ -303,7 +320,7 @@ commands together with the '/dev/stdout' special file
output is actually changed.

-File: sed.info-t, Node: Exit status, Prev: Command-Line Options, Up: Invoking sed
+File: sed.info, Node: Exit status, Prev: Command-Line Options, Up: Invoking sed
2.3 Exit status
===============
@@ -334,7 +351,7 @@ with a custom exit code value (this is a GNU 'sed' extension):
42

-File: sed.info-t, Node: sed scripts, Next: sed addresses, Prev: Invoking sed, Up: Top
+File: sed.info, Node: sed scripts, Next: sed addresses, Prev: Invoking sed, Up: Top
3 'sed' scripts
***************
@@ -351,7 +368,7 @@ File: sed.info-t, Node: sed scripts, Next: sed addresses, Prev: Invoking sed,
* Multiple commands syntax:: Extension for easier scripting

-File: sed.info-t, Node: sed script overview, Next: sed commands list, Up: sed scripts
+File: sed.info, Node: sed script overview, Next: sed commands list, Up: sed scripts
3.1 'sed' script overview
=========================
@@ -413,7 +430,7 @@ Commands can also be preceded with optional non-significant whitespace
characters. *Note Multiple commands syntax::.

-File: sed.info-t, Node: sed commands list, Next: The "s" Command, Prev: sed script overview, Up: sed scripts
+File: sed.info, Node: sed commands list, Next: The "s" Command, Prev: sed script overview, Up: sed scripts
3.2 'sed' commands summary
==========================
@@ -518,7 +535,7 @@ in parentheses.
return an exit code to the caller.
'r filename'
- Reads text file a file. Example:
+ Reads file FILENAME.
'R filename'
Queue a line of FILENAME to be read and inserted into the output
@@ -577,7 +594,7 @@ in parentheses.
Specify the location of LABEL for branch commands ('b', 't', 'T').

-File: sed.info-t, Node: The "s" Command, Next: Common Commands, Prev: sed commands list, Up: sed scripts
+File: sed.info, Node: The "s" Command, Next: Common Commands, Prev: sed commands list, Up: sed scripts
3.3 The 's' Command
===================
@@ -712,7 +729,7 @@ FLAGS:
(1) This is equivalent to 'p' unless the '-i' option is being used.

-File: sed.info-t, Node: Common Commands, Next: Other Commands, Prev: The "s" Command, Up: sed scripts
+File: sed.info, Node: Common Commands, Next: Other Commands, Prev: The "s" Command, Up: sed scripts
3.4 Often-Used Commands
=======================
@@ -746,7 +763,7 @@ commands.
1
2
- This command only accepts a single address. Note that the current
+ This command accepts only one address. Note that the current
pattern space is printed if auto-print is not disabled with the
'-n' options. The ability to return an exit code from the 'sed'
script is a GNU 'sed' extension.
@@ -811,7 +828,7 @@ commands.
X

-File: sed.info-t, Node: Other Commands, Next: Programming Commands, Prev: Common Commands, Up: sed scripts
+File: sed.info, Node: Other Commands, Next: Programming Commands, Prev: Common Commands, Up: sed scripts
3.5 Less Frequently-Used Commands
=================================
@@ -1029,7 +1046,7 @@ commands.
'r FILENAME'
- Reads text file a file. Example:
+ Reads file FILENAME. Example:
$ seq 3 | sed '2r/etc/hostname'
1
@@ -1105,7 +1122,7 @@ commands.
(1) This is equivalent to 'p' unless the '-i' option is being used.

-File: sed.info-t, Node: Programming Commands, Next: Extended Commands, Prev: Other Commands, Up: sed scripts
+File: sed.info, Node: Programming Commands, Next: Extended Commands, Prev: Other Commands, Up: sed scripts
3.6 Commands for 'sed' gurus
============================
@@ -1131,7 +1148,7 @@ can enable one to write quite convoluted scripts.
The LABEL may be omitted, in which case the next cycle is started.

-File: sed.info-t, Node: Extended Commands, Next: Multiple commands syntax, Prev: Programming Commands, Up: sed scripts
+File: sed.info, Node: Extended Commands, Next: Multiple commands syntax, Prev: Programming Commands, Up: sed scripts
3.7 Commands Specific to GNU 'sed'
==================================
@@ -1164,7 +1181,7 @@ required quite often, yet are unsupported by standard 'sed's.
newline).
'Q [EXIT-CODE]'
- This command only accepts a single address.
+ This command accepts only one address.
This command is the same as 'q', but will not print the contents of
pattern space. Like 'q', it provides the ability to return an exit
@@ -1223,7 +1240,7 @@ required quite often, yet are unsupported by standard 'sed's.
the script in most multibyte locales (including UTF-8 locales).

-File: sed.info-t, Node: Multiple commands syntax, Prev: Extended Commands, Up: sed scripts
+File: sed.info, Node: Multiple commands syntax, Prev: Extended Commands, Up: sed scripts
3.8 Multiple commands syntax
============================
@@ -1394,7 +1411,7 @@ newline:
1.txt#foo

-File: sed.info-t, Node: sed addresses, Next: sed regular expressions, Prev: sed scripts, Up: Top
+File: sed.info, Node: sed addresses, Next: sed regular expressions, Prev: sed scripts, Up: Top
4 Addresses: selecting lines
****************************
@@ -1407,7 +1424,7 @@ File: sed.info-t, Node: sed addresses, Next: sed regular expressions, Prev: s
* Range Addresses:: selecting a range of lines

-File: sed.info-t, Node: Addresses overview, Next: Numeric Addresses, Up: sed addresses
+File: sed.info, Node: Addresses overview, Next: Numeric Addresses, Up: sed addresses
4.1 Addresses overview
======================
@@ -1453,7 +1470,7 @@ excluding lines 4 to 17):
sed '4,17!s/hello/world/' input.txt > output.txt

-File: sed.info-t, Node: Numeric Addresses, Next: Regexp Addresses, Prev: Addresses overview, Up: sed addresses
+File: sed.info, Node: Numeric Addresses, Next: Regexp Addresses, Prev: Addresses overview, Up: sed addresses
4.2 Selecting lines by numbers
==============================
@@ -1492,7 +1509,7 @@ Addresses in a 'sed' script can be in any of the following forms:
10

-File: sed.info-t, Node: Regexp Addresses, Next: Range Addresses, Prev: Numeric Addresses, Up: sed addresses
+File: sed.info, Node: Regexp Addresses, Next: Range Addresses, Prev: Numeric Addresses, Up: sed addresses
4.3 selecting lines by text matching
====================================
@@ -1543,7 +1560,7 @@ be in *note Extended Regular Expression (ERE): ERE syntax. syntax.
In many other programming languages, a lower case 'i' is used for
case-insensitive regular expression matching. However, in 'sed'
- the 'i' is used for the insert command (TODO: add 'pxref').
+ the 'i' is used for the insert command (*note insert command::).
Observe the difference between the following examples.
@@ -1575,6 +1592,20 @@ be in *note Extended Regular Expression (ERE): ERE syntax. syntax.
beginning or the end of the buffer. In addition, the period
character does not match a new-line character in multi-line mode.
+ Regex addresses operate on the content of the current pattern space.
+If the pattern space is changed (for example with 's///' command) the
+regular expression matching will operate on the changed text.
+
+ In the following example, automatic printing is disabled with '-n'.
+The 's/2/X/' command changes lines containing '2' to 'X'. The command
+'/[0-9]/p' matches lines with digits and prints them. Because the
+second line is changed before the '/[0-9]/' regex, it will not match and
+will not be printed:
+
+ $ seq 3 | sed -n 's/2/X/ ; /[0-9]/p'
+ 1
+ 3
+
---------- Footnotes ----------
(1) There are of course many other ways to do the same, e.g.
@@ -1582,7 +1613,7 @@ be in *note Extended Regular Expression (ERE): ERE syntax. syntax.
awk -F: '$7 == "/bin/bash"' /etc/passwd

-File: sed.info-t, Node: Range Addresses, Prev: Regexp Addresses, Up: sed addresses
+File: sed.info, Node: Range Addresses, Prev: Regexp Addresses, Up: sed addresses
4.4 Range Addresses
===================
@@ -1662,7 +1693,7 @@ GNU extensions:
ADDR1 can be a line number or a regular expression.

-File: sed.info-t, Node: sed regular expressions, Next: advanced sed, Prev: sed addresses, Up: Top
+File: sed.info, Node: sed regular expressions, Next: advanced sed, Prev: sed addresses, Up: Top
5 Regular Expressions: selecting text
*************************************
@@ -1678,10 +1709,10 @@ File: sed.info-t, Node: sed regular expressions, Next: advanced sed, Prev: se
* regexp extensions:: Additional regular expression commands
* Back-references and Subexpressions:: Back-references and Subexpressions
* Escapes:: Specifying special characters
-* Locale Considerations::
+* Locale Considerations:: Multibyte characters and locale considrations

-File: sed.info-t, Node: Regular Expressions Overview, Next: BRE vs ERE, Up: sed regular expressions
+File: sed.info, Node: Regular Expressions Overview, Next: BRE vs ERE, Up: sed regular expressions
5.1 Overview of regular expression in 'sed'
===========================================
@@ -1722,18 +1753,18 @@ the letter 'd':
characters in regular expressions.

-File: sed.info-t, Node: BRE vs ERE, Next: BRE syntax, Prev: Regular Expressions Overview, Up: sed regular expressions
+File: sed.info, Node: BRE vs ERE, Next: BRE syntax, Prev: Regular Expressions Overview, Up: sed regular expressions
5.2 Basic (BRE) and extended (ERE) regular expression
=====================================================
Basic and extended regular expressions are two variations on the syntax
-of the specified pattern. Basic Regular Expression (BRE) is the default
-in 'sed' (and similarly in 'grep'). Extended Regular Expression syntax
-(ERE) is activated by using the '-r' or '-E' options (and similarly,
-'grep -E').
+of the specified pattern. Basic Regular Expression (BRE) syntax is the
+default in 'sed' (and similarly in 'grep'). Use the POSIX-specified
+'-E' option ('-r', '--regexp-extended') to enable Extended Regular
+Expression (ERE) syntax.
- In GNU 'sed' the only difference between basic and extended regular
+ In GNU 'sed', the only difference between basic and extended regular
expressions is in the behavior of a few special characters: '?', '+',
parentheses, braces ('{}'), and '|'.
@@ -1742,20 +1773,22 @@ unless prefixed backslash ('\'); While with extended (ERE) syntax it is
reversed: these characters are special unless they are prefixed with
backslash ('\').
-Desired pattern Basic (BRE) Syntax Extended (ERE) Syntax
-
----------------------------------------------------------------------------
-literal '+' (plus $ echo "a+b=c" | sed -n '/a+b/p' $ echo "a+b=c" | sed -E -n '/a\+b/p'
-sign) a+b=c a+b=c
-
-One or more 'a' $ echo "aab" | sed -n '/a\+b/p' $ echo "aab" | sed -E -n '/a+b/p'
-characters followed by aab aab
-'b' (plus sign as
+Desired pattern Basic (BRE) Syntax Extended (ERE) Syntax
+
+--------------------------------------------------------------------------
+literal '+' (plus $ echo 'a+b=c' > foo $ echo 'a+b=c' > foo
+sign) $ sed -n '/a+b/p' foo $ sed -E -n '/a\+b/p' foo
+ a+b=c a+b=c
+
+One or more 'a' $ echo aab > foo $ echo aab > foo
+characters $ sed -n '/a\+b/p' foo $ sed -E -n '/a+b/p' foo
+followed by 'b' aab aab
+(plus sign as
special
meta-character)

-File: sed.info-t, Node: BRE syntax, Next: ERE syntax, Prev: BRE vs ERE, Up: sed regular expressions
+File: sed.info, Node: BRE syntax, Next: ERE syntax, Prev: BRE vs ERE, Up: sed regular expressions
5.3 Overview of basic regular expression syntax
===============================================
@@ -1930,7 +1963,7 @@ Examples:
last of which is an 'A'.

-File: sed.info-t, Node: ERE syntax, Next: Character Classes and Bracket Expressions, Prev: BRE syntax, Up: sed regular expressions
+File: sed.info, Node: ERE syntax, Next: Character Classes and Bracket Expressions, Prev: BRE syntax, Up: sed regular expressions
5.4 Overview of extended regular expression syntax
==================================================
@@ -1970,7 +2003,7 @@ Examples:
'a' or 'b'.

-File: sed.info-t, Node: Character Classes and Bracket Expressions, Next: regexp extensions, Prev: ERE syntax, Up: sed regular expressions
+File: sed.info, Node: Character Classes and Bracket Expressions, Next: regexp extensions, Prev: ERE syntax, Up: sed regular expressions
5.5 Character Classes and Bracket Expressions
=============================================
@@ -2110,7 +2143,7 @@ Also, when not in 'POSIXLY_CORRECT' mode, special escapes like '\n' and
represents the close character class symbol.

-File: sed.info-t, Node: regexp extensions, Next: Back-references and Subexpressions, Prev: Character Classes and Bracket Expressions, Up: sed regular expressions
+File: sed.info, Node: regexp extensions, Next: Back-references and Subexpressions, Prev: Character Classes and Bracket Expressions, Up: sed regular expressions
5.6 regular expression extensions
=================================
@@ -2148,7 +2181,7 @@ extended: ERE syntax. regular expressions (that is, with or without the
the character to the left and the character to the right are either
both "word" characters or both "non-word" characters.
- $ echo "abc %-= def." | sed 's/\w/X/g'
+ $ echo "abc %-= def." | sed 's/\B/X/g'
aXbXc X%X-X=X dXeXf.X
'\s'
@@ -2161,7 +2194,7 @@ extended: ERE syntax. regular expressions (that is, with or without the
'\S'
Matches non-whitespace characters.
- $ echo "abc %-= def." | sed 's/\w/X/g'
+ $ echo "abc %-= def." | sed 's/\S/X/g'
XXX XXX XXXX
'\<'
@@ -2197,7 +2230,7 @@ extended: ERE syntax. regular expressions (that is, with or without the
'$' in multi-line mode.

-File: sed.info-t, Node: Back-references and Subexpressions, Next: Escapes, Prev: regexp extensions, Up: sed regular expressions
+File: sed.info, Node: Back-references and Subexpressions, Next: Escapes, Prev: regexp extensions, Up: sed regular expressions
5.7 Back-references and Subexpressions
======================================
@@ -2257,7 +2290,7 @@ given with '-e' or from a file ('-f FILE'), back-references are local to
each expression.

-File: sed.info-t, Node: Escapes, Next: Locale Considerations, Prev: Back-references and Subexpressions, Up: sed regular expressions
+File: sed.info, Node: Escapes, Next: Locale Considerations, Prev: Back-references and Subexpressions, Up: sed regular expressions
5.8 Escape Sequences - specifying special characters
====================================================
@@ -2317,6 +2350,37 @@ represents:
'\b' (backspace) was omitted because of the conflict with the
existing "word boundary" meaning.
+5.8.1 Escaping Precedence
+-------------------------
+
+GNU 'sed' processes escape sequences _before_ passing the text onto the
+regular-expression matching of the 's///' command and Address matching.
+Thus the follwing two commands are equivalent ('0x5e' is the hexadecimal
+ASCII value of the character '^'):
+
+ $ echo 'a^c' | sed 's/^/b/'
+ ba^c
+
+ $ echo 'a^c' | sed 's/\x5e/b/'
+ ba^c
+
+ As are the following ('0x5b','0x5d' are the hexadecimal ASCII values
+of '[',']', respectively):
+
+ $ echo abc | sed 's/[a]/x/'
+ Xbc
+ $ echo abc | sed 's/\x5ba\x5d/x/'
+ Xbc
+
+ However it is recommended to avoid such special characters due to
+unexpected edge-cases. For example, the following are not equivalent:
+
+ $ echo 'a^c' | sed 's/\^/b/'
+ abc
+
+ $ echo 'a^c' | sed 's/\\\x5e/b/'
+ a^c
+
---------- Footnotes ----------
(1) All the escapes introduced here are GNU extensions, with the
@@ -2324,21 +2388,130 @@ exception of '\n'. In basic regular expression mode, setting
'POSIXLY_CORRECT' disables them inside bracket expressions.

-File: sed.info-t, Node: Locale Considerations, Prev: Escapes, Up: sed regular expressions
+File: sed.info, Node: Locale Considerations, Prev: Escapes, Up: sed regular expressions
-5.9 Locale Considerations
-=========================
+5.9 Multibyte characters and Locale Considerations
+==================================================
+
+GNU 'sed' processes valid multibyte characters in multibyte locales
+(e.g. 'UTF-8'). (1)
+
+The following example uses the Greek letter Capital Sigma (U+03A3,
+Unicode code point '0x03A3'). In a 'UTF-8' locale, 'sed' correctly
+processes the Sigma as one character despite it being 2 octets (bytes):
+
+ $ locale | grep LANG
+ LANG=en_US.UTF-8
+
+ $ printf 'a\u03A3b'
+ aU+03A3b
+
+ $ printf 'a\u03A3b' | sed 's/./X/g'
+ XXX
+
+ $ printf 'a\u03A3b' | od -tx1 -An
+ 61 ce a3 62
+
+To force 'sed' to process octets separately, use the 'C' locale (also
+known as the 'POSIX' locale):
+
+ $ printf 'a\u03A3b' | LC_ALL=C sed 's/./X/g'
+ XXXX
+
+5.9.1 Invalid multibyte characters
+----------------------------------
+
+'sed''s regular expressions _do not_ match invalid multibyte sequences
+in a multibyte locale.
+
+In the following examples, the ascii value '0xCE' is an incomplete
+multibyte character (shown here as U+FFFD). The regular expression '.'
+does not match it:
+
+ $ printf 'a\xCEb\n'
+ aU+FFFDe
+
+ $ printf 'a\xCEb\n' | sed 's/./X/g'
+ XU+FFFDX
+
+ $ printf 'a\xCEc\n' | sed 's/./X/g' | od -tx1c -An
+ 58 ce 58 0a
+ X X \n
+
+Similarly, the 'catch-all' regular expression '.*' does not match the
+entire line:
+
+ $ printf 'a\xCEc\n' | sed 's/.*//' | od -tx1c -An
+ ce 63 0a
+ c \n
+
+GNU 'sed' offers the special 'z' command to clear the current pattern
+space regardless of invalid multibyte characters (i.e. it works like
+'s/.*//' but also removes invalid multibyte characters):
+
+ $ printf 'a\xCEc\n' | sed 'z' | od -tx1c -An
+ 0a
+ \n
+
+Alternatively, force the 'C' locale to process each octet separately
+(every octet is a valid character in the 'C' locale):
+
+ $ printf 'a\xCEc\n' | LC_ALL=C sed 's/.*//' | od -tx1c -An
+ 0a
+ \n
+
+ 'sed''s inability to process invalid multibyte characters can be used
+to detect such invalid sequences in a file. In the following examples,
+the '\xCE\xCE' is an invalid multibyte sequence, while '\xCE\A3' is a
+valid multibyte sequence (of the Greek Sigma character).
+
+The following 'sed' program removes all valid characters using 's/.//g'.
+Any content left in the pattern space (the invalid characters) are added
+to the hold space using the 'H' command. On the last line ('$'), the
+hold space is retrieved ('x'), newlines are removed ('s/\n//g'), and any
+remaining octets are printed unambiguously ('l'). Thus, any invalid
+multibyte sequences are printed as octal values:
+
+ $ printf 'ab\nc\n\xCE\xCEde\n\xCE\xA3f\n' > invalid.txt
+
+ $ cat invalid.txt
+ ab
+ c
+ U+FFFDU+FFFDde
+ U+03A3f
-TODO: fix following paragraphs (copied verbatim from 'bracket
-expression' section).
+ $ sed -n 's/.//g ; H ; ${x;s/\n//g;l}' invalid.txt
+ \316\316$
- TODO: mention locale support is heavily dependent on the OS/libc, not
-on sed.
+With a few more commands, 'sed' can print the exact line number
+corresponding to each invalid characters (line 3). These characters can
+then be removed by forcing the 'C' locale and using octal escape
+sequences:
- The current locale affects the characters matched by 'sed''s regular
-expressions.
+ $ sed -n 's/.//g;=;l' invalid.txt | paste - - | awk '$2!="$"'
+ 3 \316\316$
- In other locales, the sorting sequence is not specified, and '[a-d]'
+ $ LC_ALL=C sed '3s/\o316\o316//' invalid.txt > fixed.txt
+
+5.9.2 Upper/Lower case conversion
+---------------------------------
+
+GNU 'sed''s substitute command ('s') supports upper/lower case
+conversions using '\U','\L' codes. These conversions support multibyte
+characters:
+
+ $ printf 'ABC\u03a3\n'
+ ABCU+03A3
+
+ $ printf 'ABC\u03a3\n' | sed 's/.*/\L&/'
+ abcU+03C3
+
+*Note The "s" Command::.
+
+5.9.3 Multibyte regexp character classes
+----------------------------------------
+
+In other locales, the sorting sequence is not specified, and '[a-d]'
might be equivalent to '[abcd]' or to '[aBbCcDd]', or it might fail to
match any character, or the set of characters that it matches might even
be erratic. To obtain the traditional interpretation of bracket
@@ -2360,8 +2533,14 @@ current locale.
$ printf 'cliché\n' | LC_ALL=fr_FR.utf8 sed 's/[[=e=]]/X/g'
clichX
+ ---------- Footnotes ----------
+
+ (1) Some regexp edge-cases depends on the operating system and libc
+implementation. The examples shown are known to work as-expected on
+GNU/Linux systems using glibc.
+

-File: sed.info-t, Node: advanced sed, Next: Examples, Prev: sed regular expressions, Up: Top
+File: sed.info, Node: advanced sed, Next: Examples, Prev: sed regular expressions, Up: Top
6 Advanced 'sed': cycles and buffers
************************************
@@ -2374,7 +2553,7 @@ File: sed.info-t, Node: advanced sed, Next: Examples, Prev: sed regular expre
* Branching and flow control::

-File: sed.info-t, Node: Execution Cycle, Next: Hold and Pattern Buffers, Up: advanced sed
+File: sed.info, Node: Execution Cycle, Next: Hold and Pattern Buffers, Up: advanced sed
6.1 How 'sed' Works
===================
@@ -2408,7 +2587,7 @@ surprise" even though it does not make commands like 'sed -n p' exactly
identical to 'cat'.

-File: sed.info-t, Node: Hold and Pattern Buffers, Next: Multiline techniques, Prev: Execution Cycle, Up: advanced sed
+File: sed.info, Node: Hold and Pattern Buffers, Next: Multiline techniques, Prev: Execution Cycle, Up: advanced sed
6.2 Hold and Pattern Buffers
============================
@@ -2416,7 +2595,7 @@ File: sed.info-t, Node: Hold and Pattern Buffers, Next: Multiline techniques,
TODO

-File: sed.info-t, Node: Multiline techniques, Next: Branching and flow control, Prev: Hold and Pattern Buffers, Up: advanced sed
+File: sed.info, Node: Multiline techniques, Next: Branching and flow control, Prev: Hold and Pattern Buffers, Up: advanced sed
6.3 Multiline techniques - using D,G,H,N,P to process multiple lines
====================================================================
@@ -2522,7 +2701,7 @@ commands:
lines:: and *note Line length adjustment::.

-File: sed.info-t, Node: Branching and flow control, Prev: Multiline techniques, Up: advanced sed
+File: sed.info, Node: Branching and flow control, Prev: Multiline techniques, Up: advanced sed
6.4 Branching and Flow Control
==============================
@@ -2730,7 +2909,7 @@ more about 'N', 'P' and 'D' commands *note Multiline techniques::).
For more line-joining examples *note Joining lines::.

-File: sed.info-t, Node: Examples, Next: Limitations, Prev: advanced sed, Up: Top
+File: sed.info, Node: Examples, Next: Limitations, Prev: advanced sed, Up: Top
7 Some Sample Scripts
*********************
@@ -2767,7 +2946,7 @@ Emulating standard utilities:
* cat -s:: Squeezing blank lines

-File: sed.info-t, Node: Joining lines, Next: Centering lines, Up: Examples
+File: sed.info, Node: Joining lines, Next: Centering lines, Up: Examples
7.1 Joining lines
=================
@@ -2836,7 +3015,7 @@ techniques:: and *note Branching and flow control::.
# sed -e :a -e '$!N;s/\n */ /;ta' -e 'P;D'

-File: sed.info-t, Node: Centering lines, Next: Increment a number, Prev: Joining lines, Up: Examples
+File: sed.info, Node: Centering lines, Next: Increment a number, Prev: Joining lines, Up: Examples
7.2 Centering Lines
===================
@@ -2873,7 +3052,7 @@ regular expressions to be matched--this is a common technique.
s/^\(.*\)\n\(.*\)\2/\2\1/

-File: sed.info-t, Node: Increment a number, Next: Rename files to lower case, Prev: Centering lines, Up: Examples
+File: sed.info, Node: Increment a number, Next: Rename files to lower case, Prev: Centering lines, Up: Examples
7.3 Increment a Number
======================
@@ -2926,7 +3105,7 @@ zeros.
calculator! It is distributed together with sed.

-File: sed.info-t, Node: Rename files to lower case, Next: Print bash environment, Prev: Increment a number, Up: Examples
+File: sed.info, Node: Rename files to lower case, Next: Print bash environment, Prev: Increment a number, Up: Examples
7.4 Rename Files to Lower Case
==============================
@@ -3038,7 +3217,7 @@ using shell variables and proper quoting.
' | $apply_cmd

-File: sed.info-t, Node: Print bash environment, Next: Reverse chars of lines, Prev: Rename files to lower case, Up: Examples
+File: sed.info, Node: Print bash environment, Next: Reverse chars of lines, Prev: Rename files to lower case, Up: Examples
7.5 Print 'bash' Environment
============================
@@ -3072,7 +3251,7 @@ of the 'set' Bourne-shell command.
'

-File: sed.info-t, Node: Reverse chars of lines, Next: Text search across multiple lines, Prev: Print bash environment, Up: Examples
+File: sed.info, Node: Reverse chars of lines, Next: Text search across multiple lines, Prev: Print bash environment, Up: Examples
7.6 Reverse Characters of Lines
===============================
@@ -3118,7 +3297,7 @@ example
~/sedscripts/reverseline.sed

-File: sed.info-t, Node: Text search across multiple lines, Next: Line length adjustment, Prev: Reverse chars of lines, Up: Examples
+File: sed.info, Node: Text search across multiple lines, Next: Line length adjustment, Prev: Reverse chars of lines, Up: Examples
7.7 Text search across multiple lines
=====================================
@@ -3204,7 +3383,7 @@ and the regular expression works on it):
<https://gnu.org/s/coreutils/manual/html_node/Squeezing-and-deleting.html>.

-File: sed.info-t, Node: Line length adjustment, Next: tac, Prev: Text search across multiple lines, Up: Examples
+File: sed.info, Node: Line length adjustment, Next: tac, Prev: Text search across multiple lines, Up: Examples
7.8 Line length adjustment
==========================
@@ -3213,7 +3392,7 @@ This section uses 'N' and 'D' commands to search for consecutive words
spanning multiple lines, and the 'b' command for branching. *Note
Multiline techniques:: and *note Branching and flow control::.
- These (somewhat contrived) examples deal with formatting and wrapping
+ This (somewhat contrived) example deal with formatting and wrapping
lines of text of the following input file:
$ cat two-cities-mix.txt
@@ -3226,50 +3405,50 @@ lines of text of the following input file:
the age
of foolishness,
- The following command will wrap lines at 40 characters:
- $ sed -E ':x {N ; s/\n/ /g ; s/(.{40,40})/\1\n/ ; /\n/!bx ; P ; D}' \
- two-cities-mix.txt
- It was the best of times, it was the wor
- st of times, it was the age of wisdom, i
- t was the age of foolishness,
+The following sed program wraps lines at 40 characters:
+ $ cat wrap40.sed
+ # outer loop
+ :x
- The following command will split lines by comma character:
- $ sed -E ':x {N ; s/\n/ /g ; s/,/,\n/ ; /\n/!bx ; s/^ *// ; P ; D}' \
- two-cities-mix.txt
- It was the best of times,
- it was the worst of times,
- it was the age of wisdom,
- it was the age of foolishness,
+ # Appead a newline followed by the next input line to the pattern buffer
+ N
- Both examples use similar construct:
+ # Remove all newlines from the pattern buffer
+ s/\n/ /g
- * The ':x' is a label. It will be used later by the 'b' command to
- jump to the beginning of the 'sed' program without starting a new
- cycle.
- * The 'N' command reads the next line from the input file, and
- appends it to the existing content of the pattern space (with a
- newline preceding it).
+ # Inner loop
+ :y
+
+ # Add a newline after the first 40 characters
+ s/(.{40,40})/\1\n/
- * The first 's/\n/ /g' command replaces all newlines with spaces,
- discarding the line structure of the input file.
+ # If there is a newline in the pattern buffer
+ # (i.e. the previous substitution added a newline)
+ /\n/ {
+ # There are newlines in the pattern buffer -
+ # print the content until the first newline.
+ P
- * The second 's///' command adds newlines based on the desired
- pattern (after 40 characters in the first example, after comma
- character in the second example).
+ # Remove the printed characters and the first newline
+ s/.*\n//
- * The '/\n/!bx' command searches for a newline in the pattern space
- ('/n/'), and if it is _not_ found ('!'), branches (=jumps) to the
- previously defined label 'x'. This will cause 'sed' to read the
- next line without processing any further commands in this cycle.
+ # branch to label 'y' - repeat inner loop
+ by
+ }
+
+ # No newlines in the pattern buffer - Branch to label 'x' (outer loop)
+ # and read the next input line
+ bx
- * If a newline is found in the pattern space, 'P' is used to print up
- to the newline (that is - the newly structured line) then 'D'
- deletes the pattern space up to the newline, and starts a new
- cycle.
+The wrapped output:
+ $ sed -E -f wrap40.sed two-cities-mix.txt
+ It was the best of times, it was the wor
+ st of times, it was the age of wisdom, i
+ t was the age of foolishness,

-File: sed.info-t, Node: tac, Next: cat -n, Prev: Line length adjustment, Up: Examples
+File: sed.info, Node: tac, Next: cat -n, Prev: Line length adjustment, Up: Examples
7.9 Reverse Lines of Files
==========================
@@ -3296,7 +3475,7 @@ easily overflow internal buffers.
h

-File: sed.info-t, Node: cat -n, Next: cat -b, Prev: tac, Up: Examples
+File: sed.info, Node: cat -n, Next: cat -b, Prev: tac, Up: Examples
7.10 Numbering Lines
====================
@@ -3365,7 +3544,7 @@ hold space, to be used in the next iteration.
h

-File: sed.info-t, Node: cat -b, Next: wc -c, Prev: cat -n, Up: Examples
+File: sed.info, Node: cat -b, Next: wc -c, Prev: cat -n, Up: Examples
7.11 Numbering Non-blank Lines
==============================
@@ -3405,7 +3584,7 @@ properly...
h

-File: sed.info-t, Node: wc -c, Next: wc -w, Prev: cat -b, Up: Examples
+File: sed.info, Node: wc -c, Next: wc -w, Prev: cat -b, Up: Examples
7.12 Counting Characters
========================
@@ -3478,7 +3657,7 @@ letters remain.
(1) Some implementations have a limit of 199 commands per script

-File: sed.info-t, Node: wc -w, Next: wc -l, Prev: wc -c, Up: Examples
+File: sed.info, Node: wc -w, Next: wc -l, Prev: wc -c, Up: Examples
7.13 Counting Words
===================
@@ -3535,7 +3714,7 @@ commenting 'sed' scripts.
p

-File: sed.info-t, Node: wc -l, Next: head, Prev: wc -w, Up: Examples
+File: sed.info, Node: wc -l, Next: head, Prev: wc -w, Up: Examples
7.14 Counting Lines
===================
@@ -3547,7 +3726,7 @@ functionality for free!!! Look:
$=

-File: sed.info-t, Node: head, Next: tail, Prev: wc -l, Up: Examples
+File: sed.info, Node: head, Next: tail, Prev: wc -l, Up: Examples
7.15 Printing the First Lines
=============================
@@ -3560,7 +3739,7 @@ before the 'q' command.
10q

-File: sed.info-t, Node: tail, Next: uniq, Prev: head, Up: Examples
+File: sed.info, Node: tail, Next: uniq, Prev: head, Up: Examples
7.16 Printing the Last Lines
============================
@@ -3611,7 +3790,7 @@ on the last line of input, appending the next input line to pattern
space, and removing the first line.

-File: sed.info-t, Node: uniq, Next: uniq -d, Prev: tail, Up: Examples
+File: sed.info, Node: uniq, Next: uniq -d, Prev: tail, Up: Examples
7.17 Make Duplicate Lines Unique
================================
@@ -3645,7 +3824,7 @@ probably the most difficult to master.
technique is often used in advanced 'sed' scripts.

-File: sed.info-t, Node: uniq -d, Next: uniq -u, Prev: uniq, Up: Examples
+File: sed.info, Node: uniq -d, Next: uniq -u, Prev: uniq, Up: Examples
7.18 Print Duplicated Lines of Input
====================================
@@ -3679,7 +3858,7 @@ This script prints only duplicated lines, like 'uniq -d'.
D

-File: sed.info-t, Node: uniq -u, Next: cat -s, Prev: uniq -d, Up: Examples
+File: sed.info, Node: uniq -u, Next: cat -s, Prev: uniq -d, Up: Examples
7.19 Remove All Duplicated Lines
================================
@@ -3714,7 +3893,7 @@ This script prints only unique lines, like 'uniq -u'.
D

-File: sed.info-t, Node: cat -s, Prev: uniq -u, Up: Examples
+File: sed.info, Node: cat -s, Prev: uniq -u, Up: Examples
7.20 Squeezing Blank Lines
==========================
@@ -3795,7 +3974,7 @@ line.
bx

-File: sed.info-t, Node: Limitations, Next: Other Resources, Prev: Examples, Up: Top
+File: sed.info, Node: Limitations, Next: Other Resources, Prev: Examples, Up: Top
8 GNU 'sed''s Limitations and Non-limitations
*********************************************
@@ -3813,7 +3992,7 @@ repetition. This means that the available stack space may limit the
size of the buffer that can be processed by certain patterns.

-File: sed.info-t, Node: Other Resources, Next: Reporting Bugs, Prev: Limitations, Up: Top
+File: sed.info, Node: Other Resources, Next: Reporting Bugs, Prev: Limitations, Up: Top
9 Other Resources for Learning About 'sed'
******************************************
@@ -3840,7 +4019,7 @@ developers.
GNU 'sed' mailing list).

-File: sed.info-t, Node: Reporting Bugs, Next: GNU Free Documentation License, Prev: Other Resources, Up: Top
+File: sed.info, Node: Reporting Bugs, Next: GNU Free Documentation License, Prev: Other Resources, Up: Top
10 Reporting Bugs
*****************
@@ -4000,7 +4179,7 @@ Regex syntax clashes (problems with backslashes)
(1) which is the actual "bug" that prompted the change in behavior

-File: sed.info-t, Node: GNU Free Documentation License, Next: Concept Index, Prev: Reporting Bugs, Up: Top
+File: sed.info, Node: GNU Free Documentation License, Next: Concept Index, Prev: Reporting Bugs, Up: Top
Appendix A GNU Free Documentation License
*****************************************
@@ -4008,7 +4187,7 @@ Appendix A GNU Free Documentation License
Version 1.3, 3 November 2008
Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
- <http://fsf.org/>
+ <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -4405,7 +4584,7 @@ Appendix A GNU Free Documentation License
the GNU Free Documentation License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns. See
- <http://www.gnu.org/copyleft/>.
+ <https://www.gnu.org/copyleft/>.
Each version of the License is given a distinguishing version
number. If the Document specifies that a particular numbered
@@ -4482,7 +4661,7 @@ software license, such as the GNU General Public License, to permit
their use in free software.

-File: sed.info-t, Node: Concept Index, Next: Command and Option Index, Prev: GNU Free Documentation License, Up: Top
+File: sed.info, Node: Concept Index, Next: Command and Option Index, Prev: GNU Free Documentation License, Up: Top
Concept Index
*************
@@ -4591,11 +4770,11 @@ exception of the 'sed' commands and command-line options.
* exit status: Exit status. (line 6)
* exit status, example: Exit status. (line 25)
* Extended regular expressions, choosing: Command-Line Options.
- (line 102)
+ (line 119)
* Extended regular expressions, syntax: ERE syntax. (line 6)
* File name, printing: Extended Commands. (line 30)
* Files to be processed as input: Command-Line Options.
- (line 148)
+ (line 165)
* Flow of control in scripts: Programming Commands.
(line 11)
* Global substitution: The "s" Command. (line 74)
@@ -4604,7 +4783,7 @@ exception of the 'sed' commands and command-line options.
* GNU extensions, /dev/stdin file: Other Commands. (line 227)
* GNU extensions, /dev/stdin file <1>: Extended Commands. (line 53)
* GNU extensions, /dev/stdout file: Command-Line Options.
- (line 156)
+ (line 173)
* GNU extensions, /dev/stdout file <1>: The "s" Command. (line 101)
* GNU extensions, /dev/stdout file <2>: Other Commands. (line 240)
* GNU extensions, 0 address: Range Addresses. (line 31)
@@ -4618,7 +4797,7 @@ exception of the 'sed' commands and command-line options.
* GNU extensions, checking for their presence: Extended Commands.
(line 69)
* GNU extensions, disabling: Command-Line Options.
- (line 69)
+ (line 86)
* GNU extensions, emptying pattern space: Extended Commands. (line 85)
* GNU extensions, emptying pattern space <1>: Reporting Bugs. (line 143)
* GNU extensions, evaluating Bourne-shell commands: The "s" Command.
@@ -4626,7 +4805,7 @@ exception of the 'sed' commands and command-line options.
* GNU extensions, evaluating Bourne-shell commands <1>: Extended Commands.
(line 12)
* GNU extensions, extended regular expressions: Command-Line Options.
- (line 102)
+ (line 119)
* GNU extensions, g and NUMBER modifier: The "s" Command. (line 80)
* GNU extensions, I modifier: The "s" Command. (line 117)
* GNU extensions, I modifier <1>: Regexp Addresses. (line 47)
@@ -4706,7 +4885,7 @@ exception of the 'sed' commands and command-line options.
(line 14)
* Last line, selecting: Numeric Addresses. (line 13)
* Line length, setting: Command-Line Options.
- (line 64)
+ (line 81)
* Line length, setting <1>: Other Commands. (line 207)
* Line number, printing: Other Commands. (line 194)
* Line selection: Numeric Addresses. (line 6)
@@ -4756,7 +4935,7 @@ exception of the 'sed' commands and command-line options.
* POSIXLY_CORRECT behavior, bracket expressions: Character Classes and Bracket Expressions.
(line 112)
* POSIXLY_CORRECT behavior, enabling: Command-Line Options.
- (line 72)
+ (line 89)
* POSIXLY_CORRECT behavior, escapes: Escapes. (line 11)
* POSIXLY_CORRECT behavior, N command: Reporting Bugs. (line 56)
* Print first line from pattern space: Other Commands. (line 269)
@@ -4783,6 +4962,8 @@ exception of the 'sed' commands and command-line options.
* Read next input line: Common Commands. (line 61)
* Read text from a file: Other Commands. (line 219)
* Read text from a file <1>: Extended Commands. (line 53)
+* regex addresses and input lines: Regexp Addresses. (line 84)
+* regex addresses and pattern space: Regexp Addresses. (line 84)
* regular expression addresses: Addresses overview. (line 18)
* regular expression, example: sed script overview. (line 28)
* Replace hold space with copy of pattern space: Other Commands.
@@ -4798,7 +4979,7 @@ exception of the 'sed' commands and command-line options.
* restarting a cycle: Branching and flow control.
(line 75)
* Sandbox mode: Command-Line Options.
- (line 124)
+ (line 141)
* script parameter: Overview. (line 43)
* Script structure: sed script overview. (line 6)
* Script, from a file: Command-Line Options.
@@ -4819,7 +5000,7 @@ exception of the 'sed' commands and command-line options.
* Special addressing forms: Range Addresses. (line 31)
* standard input: Overview. (line 15)
* Standard input, processing as input: Command-Line Options.
- (line 150)
+ (line 167)
* standard output: Overview. (line 23)
* stdin: Overview. (line 15)
* stdout: Overview. (line 23)
@@ -4845,7 +5026,7 @@ exception of the 'sed' commands and command-line options.
(line 101)
* Transliteration: Other Commands. (line 11)
* Unbuffered I/O, choosing: Command-Line Options.
- (line 131)
+ (line 148)
* upper-case letters: Character Classes and Bracket Expressions.
(line 84)
* Usage summary, printing: Command-Line Options.
@@ -4855,7 +5036,7 @@ exception of the 'sed' commands and command-line options.
* whitespace characters: Character Classes and Bracket Expressions.
(line 80)
* Working on separate files: Command-Line Options.
- (line 115)
+ (line 132)
* Write first line to a file: Extended Commands. (line 80)
* Write to a file: Other Commands. (line 240)
* xdigit class: Character Classes and Bracket Expressions.
@@ -4863,7 +5044,7 @@ exception of the 'sed' commands and command-line options.
* Zero, as range start address: Range Addresses. (line 31)

-File: sed.info-t, Node: Command and Option Index, Prev: Concept Index, Up: Top
+File: sed.info, Node: Command and Option Index, Prev: Concept Index, Up: Top
Command and Option Index
************************
@@ -4876,62 +5057,62 @@ options.
* # (comments): Common Commands. (line 12)
* --binary: Command-Line Options.
- (line 81)
+ (line 98)
* --expression: Command-Line Options.
(line 30)
* --file: Command-Line Options.
(line 35)
* --follow-symlinks: Command-Line Options.
- (line 92)
+ (line 109)
* --help: Command-Line Options.
(line 17)
* --in-place: Command-Line Options.
(line 40)
* --line-length: Command-Line Options.
- (line 64)
+ (line 81)
* --null-data: Command-Line Options.
- (line 139)
+ (line 156)
* --posix: Command-Line Options.
- (line 69)
+ (line 86)
* --quiet: Command-Line Options.
(line 23)
* --regexp-extended: Command-Line Options.
- (line 102)
+ (line 119)
* --sandbox: Command-Line Options.
- (line 124)
+ (line 141)
* --separate: Command-Line Options.
- (line 115)
+ (line 132)
* --silent: Command-Line Options.
(line 23)
* --unbuffered: Command-Line Options.
- (line 131)
+ (line 148)
* --version: Command-Line Options.
(line 13)
* --zero-terminated: Command-Line Options.
- (line 139)
+ (line 156)
* -b: Command-Line Options.
- (line 81)
+ (line 98)
* -e: Command-Line Options.
(line 30)
* -E: Command-Line Options.
- (line 102)
+ (line 119)
* -f: Command-Line Options.
(line 35)
* -i: Command-Line Options.
(line 40)
* -l: Command-Line Options.
- (line 64)
+ (line 81)
* -n: Command-Line Options.
(line 23)
* -n, forcing from within a script: Common Commands. (line 20)
* -r: Command-Line Options.
- (line 102)
+ (line 119)
* -s: Command-Line Options.
- (line 115)
+ (line 132)
* -u: Command-Line Options.
- (line 131)
+ (line 148)
* -z: Command-Line Options.
- (line 139)
+ (line 156)
* : (label) command: Programming Commands.
(line 14)
* = (print line number) command: Other Commands. (line 194)
@@ -4996,79 +5177,81 @@ options.

Tag Table:
-Node: Top728
-Node: Introduction2176
-Node: Invoking sed2732
-Node: Overview3047
-Node: Command-Line Options5306
-Ref: Command-Line Options-Footnote-111851
-Ref: Command-Line Options-Footnote-212043
-Node: Exit status12142
-Node: sed scripts13046
-Node: sed script overview13621
-Node: sed commands list16144
-Node: The "s" Command20949
-Ref: The "s" Command-Footnote-126413
-Node: Common Commands26485
-Node: Other Commands29517
-Ref: Other Commands-Footnote-138536
-Node: Programming Commands38608
-Node: Extended Commands39522
-Node: Multiple commands syntax43421
-Node: sed addresses47740
-Node: Addresses overview48171
-Node: Numeric Addresses49949
-Node: Regexp Addresses51302
-Ref: Regexp Addresses-Footnote-154689
-Node: Range Addresses54829
-Node: sed regular expressions57311
-Node: Regular Expressions Overview58113
-Node: BRE vs ERE59622
-Node: BRE syntax61216
-Node: ERE syntax67603
-Node: Character Classes and Bracket Expressions69077
-Node: regexp extensions73917
-Node: Back-references and Subexpressions76307
-Node: Escapes78713
-Ref: Escapes-Footnote-180911
-Node: Locale Considerations81102
-Node: advanced sed82373
-Node: Execution Cycle82734
-Ref: Execution Cycle-Footnote-183931
-Node: Hold and Pattern Buffers84232
-Node: Multiline techniques84422
-Node: Branching and flow control87638
-Node: Examples95689
-Node: Joining lines96891
-Node: Centering lines98680
-Node: Increment a number99599
-Ref: Increment a number-Footnote-1101078
-Node: Rename files to lower case101198
-Node: Print bash environment103973
-Node: Reverse chars of lines104730
-Ref: Reverse chars of lines-Footnote-1105763
-Node: Text search across multiple lines105980
-Node: Line length adjustment109207
-Node: tac111633
-Node: cat -n112402
-Node: cat -b114226
-Node: wc -c114977
-Ref: wc -c-Footnote-1116889
-Node: wc -w116958
-Node: wc -l118424
-Node: head118671
-Node: tail119004
-Node: uniq120687
-Node: uniq -d121476
-Node: uniq -u122189
-Node: cat -s122900
-Node: Limitations124749
-Node: Other Resources125592
-Node: Reporting Bugs126495
-Ref: N_command_last_line127660
-Ref: Reporting Bugs-Footnote-1133805
-Node: GNU Free Documentation License133876
-Node: Concept Index159031
-Node: Command and Option Index186029
+Node: Top726
+Node: Introduction2172
+Node: Invoking sed2726
+Node: Overview3039
+Node: Command-Line Options5297
+Ref: Command-Line Options-Footnote-112547
+Ref: Command-Line Options-Footnote-212739
+Node: Exit status12838
+Node: sed scripts13740
+Node: sed script overview14313
+Node: sed commands list16834
+Node: The "s" Command21624
+Ref: The "s" Command-Footnote-127086
+Node: Common Commands27158
+Node: Other Commands30183
+Ref: insert command33297
+Ref: Other Commands-Footnote-139197
+Node: Programming Commands39269
+Node: Extended Commands40181
+Node: Multiple commands syntax44073
+Node: sed addresses48390
+Node: Addresses overview48819
+Node: Numeric Addresses50595
+Node: Regexp Addresses51946
+Ref: Regexp Addresses-Footnote-155902
+Node: Range Addresses56042
+Node: sed regular expressions58522
+Node: Regular Expressions Overview59371
+Node: BRE vs ERE60878
+Node: BRE syntax62562
+Node: ERE syntax68947
+Node: Character Classes and Bracket Expressions70419
+Node: regexp extensions75257
+Node: Back-references and Subexpressions77645
+Node: Escapes80049
+Ref: Escapes-Footnote-183066
+Node: Locale Considerations83257
+Ref: Locale Considerations-Footnote-187880
+Node: advanced sed88052
+Node: Execution Cycle88411
+Ref: Execution Cycle-Footnote-189606
+Node: Hold and Pattern Buffers89907
+Node: Multiline techniques90095
+Node: Branching and flow control93309
+Node: Examples101358
+Node: Joining lines102558
+Node: Centering lines104345
+Node: Increment a number105262
+Ref: Increment a number-Footnote-1106739
+Node: Rename files to lower case106859
+Node: Print bash environment109632
+Node: Reverse chars of lines110387
+Ref: Reverse chars of lines-Footnote-1111418
+Node: Text search across multiple lines111635
+Node: Line length adjustment114860
+Node: tac116597
+Node: cat -n117364
+Node: cat -b119186
+Node: wc -c119935
+Ref: wc -c-Footnote-1121845
+Node: wc -w121914
+Node: wc -l123378
+Node: head123623
+Node: tail123954
+Node: uniq125635
+Node: uniq -d126422
+Node: uniq -u127133
+Node: cat -s127842
+Node: Limitations129689
+Node: Other Resources130530
+Node: Reporting Bugs131431
+Ref: N_command_last_line132594
+Ref: Reporting Bugs-Footnote-1138739
+Node: GNU Free Documentation License138810
+Node: Concept Index163965
+Node: Command and Option Index191107

End Tag Table
diff --git a/doc/sed.texi b/doc/sed.texi
index 7cc67d6..a49d76c 100644
--- a/doc/sed.texi
+++ b/doc/sed.texi
@@ -34,7 +34,7 @@
This file documents version @value{VERSION} of
@value{SSED}, a stream editor.
-Copyright @copyright{} 1998-2017 Free Software Foundation, Inc.
+Copyright @copyright{} 1998-2018 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
@@ -154,7 +154,7 @@ other files. The following command modifies @file{file.txt} and
does not produce any output:
@example
-sed -i 's/hello/world' file.txt
+sed -i 's/hello/world/' file.txt
@end example
@cindex -n, example
@@ -307,6 +307,31 @@ directory (provided the directory already exists).
If no extension is supplied, the original file is
overwritten without making a backup.
+Because @option{-i} takes an optional argument, it should
+not be followed by other short options:
+@table @code
+@item sed -Ei '...' FILE
+Same as @option{-E -i} with no backup suffix - @file{FILE} will be
+edited in-place without creating a backup.
+
+@item sed -iE '...' FILE
+This is equivalent to @option{--in-place=E}, creating @file{FILEE} as backup
+of @file{FILE}
+@end table
+
+Be cautious of using @option{-n} with @option{-i}: the former disables
+automatic printing of lines and the latter changes the file in-place
+without a backup. Used carelessly (and without an explicit @code{p} command),
+the output file will be empty:
+@codequotebacktick on
+@codequoteundirected on
+@example
+# WRONG USAGE: 'FILE' will be truncated.
+sed -ni 's/foo/bar/' FILE
+@end example
+@codequotebacktick off
+@codequoteundirected off
+
@item -l @var{N}
@itemx --line-length=@var{N}
@opindex -l
@@ -319,13 +344,13 @@ not specified, it is taken to be 70.
@item --posix
@opindex --posix
@cindex @value{SSEDEXT}, disabling
-@value{SSED} includes several extensions to @acronym{POSIX}
+@value{SSED} includes several extensions to POSIX
sed. In order to simplify writing portable scripts, this
option disables all the extensions that this manual documents,
including additional commands.
@cindex @code{POSIXLY_CORRECT} behavior, enabling
Most of the extensions accept @command{sed} programs that
-are outside the syntax mandated by @acronym{POSIX}, but some
+are outside the syntax mandated by POSIX, but some
of them (such as the behavior of the @command{N} command
described in @ref{Reporting Bugs}) actually violate the
standard. If you want to disable only the latter kind of
@@ -362,12 +387,12 @@ so that the link destination will not be modified.
@opindex -r
@opindex --regexp-extended
@cindex Extended regular expressions, choosing
-@cindex @acronym{GNU} extensions, extended regular expressions
+@cindex GNU extensions, extended regular expressions
Use extended regular expressions rather than basic
regular expressions. Extended regexps are those that
@command{egrep} accepts; they can be clearer because they
usually have fewer backslashes.
-Historically this was a @acronym{GNU} extension,
+Historically this was a GNU extension,
but the @option{-E}
extension has since been added to the POSIX standard
(http://austingroupbugs.net/view.php?id=528),
@@ -700,7 +725,7 @@ ability to return an exit code to the caller.
@c useful to quit on a conditional without printing
@item r filename
-Reads text file a file. Example:
+Reads file @var{filename}.
@item R filename
Queue a line of @var{filename} to be read and
@@ -878,7 +903,7 @@ not just the first.
@cindex Replacing only @var{n}th match of regexp in a line
Only replace the @var{number}th match of the @var{regexp}.
-@cindex @acronym{GNU} extensions, @code{g} and @var{number} modifier
+@cindex GNU extensions, @code{g} and @var{number} modifier
interaction in @code{s} command
@cindex Mixing @code{g} and @var{number} modifiers in the @code{s} command
Note: the @sc{posix} standard does not specify what should happen
@@ -930,9 +955,9 @@ a @sc{nul} character. This is a @value{SSED} extension.
@item I
@itemx i
-@cindex @acronym{GNU} extensions, @code{I} modifier
+@cindex GNU extensions, @code{I} modifier
@cindex Case-insensitive matching
-The @code{I} modifier to regular-expression matching is a @acronym{GNU}
+The @code{I} modifier to regular-expression matching is a GNU
extension which makes @command{sed} match @var{regexp} in a
case-insensitive manner.
@@ -1000,7 +1025,7 @@ $ seq 3 | sed 2q
2
@end example
-This command only accepts a single address.
+This command accepts only one address.
Note that the current pattern space is printed if auto-print is
not disabled with the @option{-n} options. The ability to return
an exit code from the @command{sed} script is a @value{SSED} extension.
@@ -1135,7 +1160,7 @@ contain the same number of characters (after de-escaping).
See the @command{tr} command from GNU coreutils for similar functionality.
@item a @var{text}
-Appending @var{text} after a line. This is a @acronym{GNU} extension
+Appending @var{text} after a line. This is a GNU extension
to the standard @code{a} command - see below for details.
Example: Add the word @samp{hello} after the second line:
@@ -1184,7 +1209,7 @@ to be output at the end of the current cycle,
or when the next input line is read.
@cindex @value{SSEDEXT}, two addresses supported by most commands
-As a @acronym{GNU} extension, this command accepts two addresses.
+As a GNU extension, this command accepts two addresses.
Escape sequences in @var{text} are processed, so you should
use @code{\\} in @var{text} to print a single backslash.
@@ -1207,7 +1232,7 @@ world
@codequoteundirected off
@codequotebacktick off
-As a @acronym{GNU} extension, the @code{a} command and @var{text} can be
+As a GNU extension, the @code{a} command and @var{text} can be
separated into two @code{-e} parameters, enabling easier scripting:
@codequoteundirected on
@codequotebacktick on
@@ -1224,7 +1249,7 @@ $ sed -e '2a\' -e "$VAR"
@codequotebacktick off
@item i @var{text}
-insert @var{text} before a line. This is a @acronym{GNU} extension
+insert @var{text} before a line. This is a GNU extension
to the standard @code{i} command - see below for details.
Example: Insert the word @samp{hello} before the second line:
@@ -1243,6 +1268,7 @@ hello
Leading whitespace after the @code{i} command is ignored.
The text to add is read until the end of the line.
+@anchor{insert command}
@item i\
@itemx @var{text}
@findex i (insert text lines) command
@@ -1266,7 +1292,7 @@ hello'
@codequotebacktick off
@cindex @value{SSEDEXT}, two addresses supported by most commands
-As a @acronym{GNU} extension, this command accepts two addresses.
+As a GNU extension, this command accepts two addresses.
Escape sequences in @var{text} are processed, so you should
use @code{\\} in @var{text} to print a single backslash.
@@ -1289,7 +1315,7 @@ s/./X/'
@codequoteundirected off
@codequotebacktick off
-As a @acronym{GNU} extension, the @code{i} command and @var{text} can be
+As a GNU extension, the @code{i} command and @var{text} can be
separated into two @code{-e} parameters, enabling easier scripting:
@codequoteundirected on
@codequotebacktick on
@@ -1306,7 +1332,7 @@ $ sed -e '2i\' -e "$VAR"
@codequotebacktick off
@item c @var{text}
-Replaces the line(s) with @var{text}. This is a @acronym{GNU} extension
+Replaces the line(s) with @var{text}. This is a GNU extension
to the standard @code{c} command - see below for details.
Example: Replace the 2nd to 9th lines with the word @samp{hello}:
@@ -1368,7 +1394,7 @@ s/./X/'
@codequoteundirected off
@codequotebacktick off
-As a @acronym{GNU} extension, the @code{c} command and @var{text} can be
+As a GNU extension, the @code{c} command and @var{text} can be
separated into two @code{-e} parameters, enabling easier scripting:
@codequoteundirected on
@codequotebacktick on
@@ -1405,7 +1431,7 @@ ccc
@codequotebacktick off
@cindex @value{SSEDEXT}, two addresses supported by most commands
-As a @acronym{GNU} extension, this command accepts two addresses.
+As a GNU extension, this command accepts two addresses.
@@ -1431,7 +1457,7 @@ parameter is a @value{SSED} extension.
@findex r (read file) command
@cindex Read text from a file
-Reads text file a file. Example:
+Reads file @var{filename}. Example:
@codequoteundirected on
@codequotebacktick on
@@ -1457,7 +1483,7 @@ is supported for the file name, which reads the contents of the
standard input.
@cindex @value{SSEDEXT}, two addresses supported by most commands
-As a @acronym{GNU} extension, this command accepts two addresses. The
+As a GNU extension, this command accepts two addresses. The
file will then be reread and inserted on each of the addressed lines.
@item w @var{filename}
@@ -1622,7 +1648,7 @@ Print out the file name of the current input file (with a trailing
newline).
@item Q [@var{exit-code}]
-This command only accepts a single address.
+This command accepts only one address.
@findex Q (silent Quit) command
@cindex @value{SSEDEXT}, quitting silently
@@ -2118,8 +2144,8 @@ are specified.
@item @var{first}~@var{step}
-@cindex @acronym{GNU} extensions, @samp{@var{n}~@var{m}} addresses
-This @acronym{GNU} extension matches every @var{step}th line
+@cindex GNU extensions, @samp{@var{n}~@var{m}} addresses
+This GNU extension matches every @var{step}th line
starting with line @var{first}.
In particular, lines will be selected when there exists
a non-negative @var{n} such that the current line-number equals
@@ -2212,15 +2238,15 @@ sed -n '\;^/home/alice/documents/;p'
@item /@var{regexp}/I
@itemx \%@var{regexp}%I
-@cindex @acronym{GNU} extensions, @code{I} modifier
+@cindex GNU extensions, @code{I} modifier
@cindex case insensitive, regular expression
-The @code{I} modifier to regular-expression matching is a @acronym{GNU}
+The @code{I} modifier to regular-expression matching is a GNU
extension which causes the @var{regexp} to be matched in
a case-insensitive manner.
In many other programming languages, a lower case @code{i} is used
for case-insensitive regular expression matching. However, in @command{sed}
-the @code{i} is used for the insert command (TODO: add @code{pxref}).
+the @code{i} is used for the insert command (@pxref{insert command}).
Observe the difference between the following examples.
@@ -2264,6 +2290,33 @@ the period character does not match a new-line character in
multi-line mode.
@end table
+
+@cindex regex addresses and pattern space
+@cindex regex addresses and input lines
+Regex addresses operate on the content of the current
+pattern space. If the pattern space is changed (for example with @code{s///}
+command) the regular expression matching will operate on the changed text.
+
+In the following example, automatic printing is disabled with
+@option{-n}. The @code{s/2/X/} command changes lines containing
+@samp{2} to @samp{X}. The command @code{/[0-9]/p} matches
+lines with digits and prints them.
+Because the second line is changed before the @code{/[0-9]/} regex,
+it will not match and will not be printed:
+
+@codequoteundirected on
+@codequotebacktick on
+@example
+@group
+$ seq 3 | sed -n 's/2/X/ ; /[0-9]/p'
+1
+3
+@end group
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+
@node Range Addresses
@section Range Addresses
@@ -2307,13 +2360,13 @@ $ seq 10 | sed -n '4,1p'
@cindex Zero, as range start address
@cindex @var{addr1},+N
@cindex @var{addr1},~N
-@cindex @acronym{GNU} extensions, special two-address forms
-@cindex @acronym{GNU} extensions, @code{0} address
-@cindex @acronym{GNU} extensions, 0,@var{addr2} addressing
-@cindex @acronym{GNU} extensions, @var{addr1},+@var{N} addressing
-@cindex @acronym{GNU} extensions, @var{addr1},~@var{N} addressing
+@cindex GNU extensions, special two-address forms
+@cindex GNU extensions, @code{0} address
+@cindex GNU extensions, 0,@var{addr2} addressing
+@cindex GNU extensions, @var{addr1},+@var{N} addressing
+@cindex GNU extensions, @var{addr1},~@var{N} addressing
@value{SSED} also supports some special two-address forms; all these
-are @acronym{GNU} extensions:
+are GNU extensions:
@table @code
@item 0,/@var{regexp}/
A line number of @code{0} can be used in an address specification like
@@ -2388,7 +2441,7 @@ $ seq 10 | sed -n '6,~4p'
* regexp extensions:: Additional regular expression commands
* Back-references and Subexpressions:: Back-references and Subexpressions
* Escapes:: Specifying special characters
-* Locale Considerations::
+* Locale Considerations:: Multibyte characters and locale considrations
@end menu
@node Regular Expressions Overview
@@ -2446,12 +2499,12 @@ characters in regular expressions.
@section Basic (BRE) and extended (ERE) regular expression
Basic and extended regular expressions are two variations on the
-syntax of the specified pattern. Basic Regular Expression (BRE) is the
-default in @command{sed} (and similarly in @command{grep}). Extended
-Regular Expression syntax (ERE) is activated by using the @option{-r}
-or @option{-E} options (and similarly, @command{grep -E}).
+syntax of the specified pattern. Basic Regular Expression (BRE) syntax is the
+default in @command{sed} (and similarly in @command{grep}).
+Use the POSIX-specified @option{-E} option (@option{-r},
+@option{--regexp-extended}) to enable Extended Regular Expression (ERE) syntax.
-In @value{SSED} the only difference between basic and extended regular
+In @value{SSED}, the only difference between basic and extended regular
expressions is in the behavior of a few special characters: @samp{?},
@samp{+}, parentheses, braces (@samp{@{@}}), and @samp{|}.
@@ -2460,7 +2513,7 @@ unless prefixed backslash (@samp{\}); While with extended (ERE) syntax
it is reversed: these characters are special unless they are prefixed
with backslash (@samp{\}).
-@multitable @columnfractions .33 .33 .33
+@multitable @columnfractions .28 .36 .35
@headitem Desired pattern
@tab Basic (BRE) Syntax
@@ -2469,32 +2522,56 @@ with backslash (@samp{\}).
@item literal @samp{+} (plus sign)
@tab
+@exampleindent 0
+@codequoteundirected on
+@codequotebacktick on
@example
-$ echo "a+b=c" | sed -n '/a+b/p'
+$ echo 'a+b=c' > foo
+$ sed -n '/a+b/p' foo
a+b=c
@end example
+@codequotebacktick off
+@codequoteundirected off
@tab
+@exampleindent 0
+@codequoteundirected on
+@codequotebacktick on
@example
-$ echo "a+b=c" | sed -E -n '/a\+b/p'
+$ echo 'a+b=c' > foo
+$ sed -E -n '/a\+b/p' foo
a+b=c
@end example
+@codequotebacktick off
+@codequoteundirected off
@item One or more @samp{a} characters followed by @samp{b}
(plus sign as special meta-character)
@tab
+@exampleindent 0
+@codequoteundirected on
+@codequotebacktick on
@example
-$ echo "aab" | sed -n '/a\+b/p'
+$ echo aab > foo
+$ sed -n '/a\+b/p' foo
aab
@end example
+@codequotebacktick off
+@codequoteundirected off
@tab
+@exampleindent 0
+@codequoteundirected on
+@codequotebacktick on
@example
-$ echo "aab" | sed -E -n '/a+b/p'
+$ echo aab > foo
+$ sed -E -n '/a+b/p' foo
aab
@end example
+@codequotebacktick off
+@codequoteundirected off
@end multitable
@@ -2512,16 +2589,16 @@ of regular expression syntax as used in @command{sed}.
A single ordinary character matches itself.
@item *
-@cindex @acronym{GNU} extensions, to basic regular expressions
+@cindex GNU extensions, to basic regular expressions
Matches a sequence of zero or more instances of matches for the
preceding regular expression, which must be an ordinary character, a
special character preceded by @code{\}, a @code{.}, a grouped regexp
-(see below), or a bracket expression. As a @acronym{GNU} extension, a
+(see below), or a bracket expression. As a GNU extension, a
postfixed regular expression can also be followed by @code{*}; for
-example, @code{a**} is equivalent to @code{a*}. @acronym{POSIX}
+example, @code{a**} is equivalent to @code{a*}. POSIX
1003.1-2001 says that @code{*} stands for itself when it appears at
the start of a regular expression or subexpression, but many
-non@acronym{GNU} implementations do not support this and portable
+nonGNU implementations do not support this and portable
scripts should instead use @code{\*} in these contexts.
@item .
Matches any character, including newline.
@@ -2542,7 +2619,7 @@ for example with an @code{s} command.
@code{^} acts as a special character only at the beginning of the
regular expression or subexpression (that is, after @code{\(} or
@code{\|}). Portable scripts should avoid @code{^} at the beginning of
-a subexpression, though, as @acronym{POSIX} allows implementations that
+a subexpression, though, as POSIX allows implementations that
treat @code{^} as an ordinary character in that context.
@item $
@@ -2563,12 +2640,12 @@ and @var{char2}.
@xref{Character Classes and Bracket Expressions}.
@item \+
-@cindex @acronym{GNU} extensions, to basic regular expressions
-As @code{*}, but matches one or more. It is a @acronym{GNU} extension.
+@cindex GNU extensions, to basic regular expressions
+As @code{*}, but matches one or more. It is a GNU extension.
@item \?
-@cindex @acronym{GNU} extensions, to basic regular expressions
-As @code{*}, but only matches zero or one. It is a @acronym{GNU} extension.
+@cindex GNU extensions, to basic regular expressions
+As @code{*}, but only matches zero or one. It is a GNU extension.
@item \@{@var{i}\@}
As @code{*}, but matches exactly @var{i} sequences (@var{i} is a
@@ -2586,13 +2663,13 @@ Groups the inner @var{regexp} as a whole, this is used to:
@itemize @bullet
@item
-@cindex @acronym{GNU} extensions, to basic regular expressions
+@cindex GNU extensions, to basic regular expressions
Apply postfix operators, like @code{\(abcd\)*}:
this will search for zero or more whole sequences
of @samp{abcd}, while @code{abcd*} would search
for @samp{abc} followed by zero or more occurrences
of @samp{d}. Note that support for @code{\(abcd\)*} is
-required by @acronym{POSIX} 1003.1-2001, but many non-@acronym{GNU}
+required by POSIX 1003.1-2001, but many non-GNU
implementations do not support it and hence it is not universally
portable.
@@ -2602,12 +2679,12 @@ Use back references (see below).
@item @var{regexp1}\|@var{regexp2}
-@cindex @acronym{GNU} extensions, to basic regular expressions
+@cindex GNU extensions, to basic regular expressions
Matches either @var{regexp1} or @var{regexp2}. Use
parentheses to use complex alternative regular expressions.
The matching process tries each alternative in turn, from
left to right, and the first one that succeeds is used.
-It is a @acronym{GNU} extension.
+It is a GNU extension.
@item @var{regexp1}@var{regexp2}
Matches the concatenation of @var{regexp1} and @var{regexp2}.
@@ -2684,7 +2761,7 @@ Instead, this matches a string consisting of a single dollar sign,
because it is escaped.
@item [a-zA-Z0-9]
-In the C locale, this matches any @acronym{ASCII} letters or digits.
+In the C locale, this matches any ASCII letters or digits.
@item [^ @kbd{tab}]\+
(Here @kbd{tab} stands for a single tab character.)
@@ -3008,7 +3085,7 @@ are either both ``word'' characters or both ``non-word''
characters.
@example
-$ echo "abc %-= def." | sed 's/\w/X/g'
+$ echo "abc %-= def." | sed 's/\B/X/g'
aXbXc X%X-X=X dXeXf.X
@end example
@@ -3027,7 +3104,7 @@ abcX%-=Xdef.
Matches non-whitespace characters.
@example
-$ echo "abc %-= def." | sed 's/\w/X/g'
+$ echo "abc %-= def." | sed 's/\S/X/g'
XXX XXX XXXX
@end example
@@ -3149,7 +3226,7 @@ regular expressions are given with @option{-e} or from a file
@node Escapes
@section Escape Sequences - specifying special characters
-@cindex @acronym{GNU} extensions, special escapes
+@cindex GNU extensions, special escapes
Until this chapter, we have only encountered escapes of the form
@samp{\^}, which tell @command{sed} not to interpret the circumflex
as a special character, but rather to take it literally. For
@@ -3158,7 +3235,7 @@ or more backslashes.
@cindex @code{POSIXLY_CORRECT} behavior, escapes
This chapter introduces another kind of escape@footnote{All
-the escapes introduced here are @acronym{GNU}
+the escapes introduced here are GNU
extensions, with the exception of @code{\n}. In basic regular
expression mode, setting @code{POSIXLY_CORRECT} disables them inside
bracket expressions.}---that
@@ -3213,18 +3290,274 @@ Produces or matches a character whose hexadecimal @sc{ascii} value is @var{xx}.
@samp{\b} (backspace) was omitted because of the conflict with
the existing ``word boundary'' meaning.
+@subsection Escaping Precedence
+
+@value{SSED} processes escape sequences @emph{before} passing
+the text onto the regular-expression matching of the @command{s///} command
+and Address matching. Thus the follwing two commands are equivalent
+(@samp{0x5e} is the hexadecimal @sc{ascii} value of the character @samp{^}):
+
+@codequoteundirected on
+@codequotebacktick on
+@example
+@group
+$ echo 'a^c' | sed 's/^/b/'
+ba^c
+
+$ echo 'a^c' | sed 's/\x5e/b/'
+ba^c
+@end group
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+As are the following (@samp{0x5b},@samp{0x5d} are the hexadecimal
+@sc{ascii} values of @samp{[},@samp{]}, respectively):
+
+@codequoteundirected on
+@codequotebacktick on
+@example
+@group
+$ echo abc | sed 's/[a]/x/'
+Xbc
+$ echo abc | sed 's/\x5ba\x5d/x/'
+Xbc
+@end group
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+However it is recommended to avoid such special characters
+due to unexpected edge-cases. For example, the following
+are not equivalent:
+
+@codequoteundirected on
+@codequotebacktick on
+@example
+@group
+$ echo 'a^c' | sed 's/\^/b/'
+abc
+
+$ echo 'a^c' | sed 's/\\\x5e/b/'
+a^c
+@end group
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+@c also: this fails in different places:
+@c $ sed 's/[//'
+@c sed: -e expression #1, char 5: unterminated `s' command
+@c $ sed 's/\x5b//'
+@c sed: -e expression #1, char 8: Invalid regular expression
+@c
+@c which is OK but confusing to explain why (the first
+@c fails in compile.c:snarf_char_class while the second
+@c is passed to the regex engine and then fails).
+
@node Locale Considerations
-@section Locale Considerations
+@section Multibyte characters and Locale Considerations
+
+@value{SSED} processes valid multibyte characters in multibyte locales
+(e.g. @code{UTF-8}). @footnote{Some regexp edge-cases depends on the
+operating system and libc implementation. The examples shown are known
+to work as-expected on GNU/Linux systems using glibc.}
-TODO: fix following paragraphs (copied verbatim from 'bracket
-expression' section).
+@noindent The following example uses the Greek letter Capital Sigma
+(@value{ucsigma},
+Unicode code point @code{0x03A3}). In a @code{UTF-8} locale,
+@command{sed} correctly processes the Sigma as one character despite
+it being 2 octets (bytes):
-TODO: mention locale support is heavily dependent on the OS/libc, not on sed.
+@codequoteundirected on
+@codequotebacktick on
+@example
+@group
+$ locale | grep LANG
+LANG=en_US.UTF-8
-The current locale affects the characters matched by @command{sed}'s
-regular expressions.
+$ printf 'a\u03A3b'
+a@value{ucsigma}b
+$ printf 'a\u03A3b' | sed 's/./X/g'
+XXX
+
+$ printf 'a\u03A3b' | od -tx1 -An
+ 61 ce a3 62
+@end group
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+@noindent
+To force @command{sed} to process octets separately, use the @code{C} locale
+(also known as the @code{POSIX} locale):
+
+@codequoteundirected on
+@codequotebacktick on
+@example
+$ printf 'a\u03A3b' | LC_ALL=C sed 's/./X/g'
+XXXX
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+@subsection Invalid multibyte characters
+
+@command{sed}'s regular expressions @emph{do not} match
+invalid multibyte sequences in a multibyte locale.
+
+@noindent
+In the following examples, the ascii value @code{0xCE} is
+an incomplete multibyte character (shown here as @value{unicodeFFFD}).
+The regular expression @samp{.} does not match it:
+
+@codequoteundirected on
+@codequotebacktick on
+@example
+@group
+$ printf 'a\xCEb\n'
+a@value{unicodeFFFD}e
+
+$ printf 'a\xCEb\n' | sed 's/./X/g'
+X@value{unicodeFFFD}X
+
+$ printf 'a\xCEc\n' | sed 's/./X/g' | od -tx1c -An
+ 58 ce 58 0a
+ X X \n
+@end group
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+@noindent Similarly, the 'catch-all' regular expression @samp{.*} does not
+match the entire line:
+
+@codequoteundirected on
+@codequotebacktick on
+@example
+@group
+$ printf 'a\xCEc\n' | sed 's/.*//' | od -tx1c -An
+ ce 63 0a
+ c \n
+@end group
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+@noindent
+@value{SSED} offers the special @command{z} command to clear the
+current pattern space regardless of invalid multibyte characters
+(i.e. it works like @code{s/.*//} but also removes invalid multibyte
+characters):
+
+@codequoteundirected on
+@codequotebacktick on
+@example
+@group
+$ printf 'a\xCEc\n' | sed 'z' | od -tx1c -An
+ 0a
+ \n
+@end group
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+@noindent Alternatively, force the @code{C} locale to process
+each octet separately (every octet is a valid character in the @code{C}
+locale):
+
+@codequoteundirected on
+@codequotebacktick on
+@example
+@group
+$ printf 'a\xCEc\n' | LC_ALL=C sed 's/.*//' | od -tx1c -An
+ 0a
+ \n
+@end group
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+
+@command{sed}'s inability to process invalid multibyte characters
+can be used to detect such invalid sequences in a file.
+In the following examples, the @code{\xCE\xCE} is an invalid
+multibyte sequence, while @code{\xCE\A3} is a valid multibyte sequence
+(of the Greek Sigma character).
+
+@noindent
+The following @command{sed} program removes all valid
+characters using @code{s/.//g}. Any content left in the pattern space
+(the invalid characters) are added to the hold space using the
+@code{H} command. On the last line (@code{$}), the hold space is retrieved
+(@code{x}), newlines are removed (@code{s/\n//g}), and any remaining
+octets are printed unambiguously (@code{l}). Thus, any invalid
+multibyte sequences are printed as octal values:
+
+@codequoteundirected on
+@codequotebacktick on
+@example
+@group
+$ printf 'ab\nc\n\xCE\xCEde\n\xCE\xA3f\n' > invalid.txt
+
+$ cat invalid.txt
+ab
+c
+@value{unicodeFFFD}@value{unicodeFFFD}de
+@value{ucsigma}f
+
+$ sed -n 's/.//g ; H ; $@{x;s/\n//g;l@}' invalid.txt
+\316\316$
+@end group
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+@noindent With a few more commands, @command{sed} can print
+the exact line number corresponding to each invalid characters (line 3).
+These characters can then be removed by forcing the @code{C} locale
+and using octal escape sequences:
+
+@codequoteundirected on
+@codequotebacktick on
+@example
+$ sed -n 's/.//g;=;l' invalid.txt | paste - - | awk '$2!="$"'
+3 \316\316$
+
+$ LC_ALL=C sed '3s/\o316\o316//' invalid.txt > fixed.txt
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+@subsection Upper/Lower case conversion
+
+
+@value{SSED}'s substitute command (@code{s}) supports upper/lower
+case conversions using @code{\U},@code{\L} codes.
+These conversions support multibyte characters:
+
+@codequoteundirected on
+@codequotebacktick on
+@example
+$ printf 'ABC\u03a3\n'
+ABC@value{ucsigma}
+
+$ printf 'ABC\u03a3\n' | sed 's/.*/\L&/'
+abc@value{lcsigma}
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+@noindent
+@xref{The "s" Command}.
+
+
+@subsection Multibyte regexp character classes
+
+@c TODO: fix following paragraphs (copied verbatim from 'bracket
+@c expression' section).
In other locales, the sorting sequence is not specified, and
@samp{[a-d]} might be equivalent to @samp{[abcd]} or to
@@ -3247,11 +3580,15 @@ in the current locale.
TODO: show example of collation
+@codequoteundirected on
+@codequotebacktick on
@example
# TODO: this works on glibc systems, not on musl-libc/freebsd/macosx.
$ printf 'cliché\n' | LC_ALL=fr_FR.utf8 sed 's/[[=e=]]/X/g'
clichX
@end example
+@codequoteundirected off
+@codequotebacktick off
@node advanced sed
@@ -4297,7 +4634,7 @@ A successful match means the @var{PATTERN} was repeated twice in succession.
The word-boundery expression (@samp{\b}) at both ends ensures partial
words are not matched (e.g. @samp{the then} is not a desired match).
@c Thanks to Jim for pointing this out in
-@c http://lists.gnu.org/archive/html/sed-devel/2016-12/msg00041.html
+@c https://lists.gnu.org/archive/html/sed-devel/2016-12/msg00041.html
@item
The @option{-E} option enables extended regular expression syntax, alleviating
@@ -4361,7 +4698,7 @@ consecutive words spanning multiple lines, and the @code{b} command for
branching.
@xref{Multiline techniques} and @ref{Branching and flow control}.
-These (somewhat contrived) examples deal with formatting and wrapping
+This (somewhat contrived) example deal with formatting and wrapping
lines of text of the following input file:
@example
@@ -4378,70 +4715,66 @@ of foolishness,
@end group
@end example
-The following command will wrap lines at 40 characters:
+@exdent The following sed program wraps lines at 40 characters:
@codequoteundirected on
@codequotebacktick on
@example
@group
-$ sed -E ':x @{N ; s/\n/ /g ; s/(.@{40,40@})/\1\n/ ; /\n/!bx ; P ; D@}' \
- two-cities-mix.txt
-It was the best of times, it was the wor
-st of times, it was the age of wisdom, i
-t was the age of foolishness,
+$ cat wrap40.sed
+# outer loop
+:x
+
+# Appead a newline followed by the next input line to the pattern buffer
+N
+
+# Remove all newlines from the pattern buffer
+s/\n/ /g
+
+
+# Inner loop
+:y
+
+# Add a newline after the first 40 characters
+s/(.@{40,40@})/\1\n/
+
+# If there is a newline in the pattern buffer
+# (i.e. the previous substitution added a newline)
+/\n/ @{
+ # There are newlines in the pattern buffer -
+ # print the content until the first newline.
+ P
+
+ # Remove the printed characters and the first newline
+ s/.*\n//
+
+ # branch to label 'y' - repeat inner loop
+ by
+ @}
+
+# No newlines in the pattern buffer - Branch to label 'x' (outer loop)
+# and read the next input line
+bx
@end group
@end example
@codequoteundirected off
@codequotebacktick off
-The following command will split lines by comma character:
+
+
+@exdent The wrapped output:
@codequoteundirected on
@codequotebacktick on
@example
@group
-$ sed -E ':x @{N ; s/\n/ /g ; s/,/,\n/ ; /\n/!bx ; s/^ *// ; P ; D@}' \
- two-cities-mix.txt
-It was the best of times,
-it was the worst of times,
-it was the age of wisdom,
-it was the age of foolishness,
+$ sed -E -f wrap40.sed two-cities-mix.txt
+It was the best of times, it was the wor
+st of times, it was the age of wisdom, i
+t was the age of foolishness,
@end group
@end example
@codequoteundirected off
@codequotebacktick off
-Both examples use similar construct:
-
-@itemize @bullet
-
-@item
-The @samp{:x} is a label. It will be used later by the @command{b} command
-to jump to the beginning of the @command{sed} program without starting
-a new cycle.
-
-@item
-The @samp{N} command reads the next line from the input file, and appends
-it to the existing content of the pattern space (with a newline preceding it).
-
-@item
-The first @samp{s/\n/ /g} command replaces all newlines with spaces, discarding
-the line structure of the input file.
-
-@item
-The second @samp{s///} command adds newlines based on the desired pattern
-(after 40 characters in the first example, after comma character in the second
-example).
-
-@item
-The @samp{/\n/!bx} command searches for a newline in the pattern space
-(@samp{/n/}), and if it is @emph{not} found (@samp{!}), branches (=jumps)
-to the previously defined label @samp{x}. This will cause @command{sed}
-to read the next line without processing any further commands in this cycle.
-
-@item
-If a newline is found in the pattern space, @command{P} is used to print
-up to the newline (that is - the newly structured line) then @command{D}
-deletes the pattern space up to the newline, and starts a new cycle.
-@end itemize
@@ -4452,7 +4785,7 @@ This one begins a series of totally useless (yet interesting)
scripts emulating various Unix commands. This, in particular,
is a @command{tac} workalike.
-Note that on implementations other than @acronym{GNU} @command{sed}
+Note that on implementations other than GNU @command{sed}
this script might easily overflow internal buffers.
@c start-------------------------------------------
@@ -4483,7 +4816,7 @@ h
@section Numbering Lines
This script replaces @samp{cat -n}; in fact it formats its output
-exactly like @acronym{GNU} @command{cat} does.
+exactly like GNU @command{cat} does.
Of course this is completely useless and for two reasons: first,
because somebody else did it in C, second, because the following
@@ -5099,7 +5432,7 @@ bx
@node Limitations
@chapter @value{SSED}'s Limitations and Non-limitations
-@cindex @acronym{GNU} extensions, unlimited line length
+@cindex GNU extensions, unlimited line length
@cindex Portability, line length limitations
For those who want to write portable @command{sed} scripts,
be aware that some implementations have been known to
@@ -5232,7 +5565,7 @@ scripts that rely on the traditional behavior, or to set
the @code{POSIXLY_CORRECT} variable to a non-empty value.
@item Regex syntax clashes (problems with backslashes)
-@cindex @acronym{GNU} extensions, to basic regular expressions
+@cindex GNU extensions, to basic regular expressions
@cindex Non-bugs, regex syntax clashes
@command{sed} uses the @sc{posix} basic regular expression syntax. According to
the standard, the meaning of some escape sequences is undefined in
@@ -5240,7 +5573,7 @@ this syntax; notable in the case of @command{sed} are @code{\|},
@code{\+}, @code{\?}, @code{\`}, @code{\'}, @code{\<},
@code{\>}, @code{\b}, @code{\B}, @code{\w}, and @code{\W}.
-As in all @acronym{GNU} programs that use @sc{posix} basic regular
+As in all GNU programs that use @sc{posix} basic regular
expressions, @command{sed} interprets these escape sequences as special
characters. So, @code{x\+} matches one or more occurrences of @samp{x}.
@code{abc\|def} matches either @samp{abc} or @samp{def}.
@@ -5251,19 +5584,19 @@ assumption that @code{\|} and @code{\+} match the literal characters
@code{|} and @code{+}. Such scripts must be modified by removing the
spurious backslashes if they are to be used with modern implementations
of @command{sed}, like
-@acronym{GNU} @command{sed}.
+GNU @command{sed}.
On the other hand, some scripts use s|abc\|def||g to remove occurrences
of @emph{either} @code{abc} or @code{def}. While this worked until
@command{sed} 4.0.x, newer versions interpret this as removing the
string @code{abc|def}. This is again undefined behavior according to
-@acronym{POSIX}, and this interpretation is arguably more robust: older
+POSIX, and this interpretation is arguably more robust: older
@command{sed}s, for example, required that the regex matcher parsed
@code{\/} as @code{/} in the common case of escaping a slash, which is
again undefined behavior; the new behavior avoids this, and this is good
because the regex matcher is only partially under our control.
-@cindex @acronym{GNU} extensions, special escapes
+@cindex GNU extensions, special escapes
In addition, this version of @command{sed} supports several escape characters
(some of which are multi-character) to insert non-printable characters
in scripts (@code{\a}, @code{\c}, @code{\d}, @code{\o}, @code{\r},
@@ -5295,7 +5628,7 @@ in a read-only directory, and will break hard or symbolic links when
@item @code{0a} does not work (gives an error)
@cindex @code{0} address
-@cindex @acronym{GNU} extensions, @code{0} address
+@cindex GNU extensions, @code{0} address
@cindex Non-bugs, @code{0} address
There is no line 0. 0 is a special address that is only used to treat
@@ -5316,9 +5649,9 @@ uses the current locale's collation order -- in C parlance, that means using
case-insensitive collation order, others don't.
Another problem is that @code{[a-z]} tries to use collation symbols.
-This only happens if you are on the @acronym{GNU} system, using
-@acronym{GNU} libc's regular expression matcher instead of compiling the
-one supplied with @acronym{GNU} sed. In a Danish locale, for example,
+This only happens if you are on the GNU system, using
+GNU libc's regular expression matcher instead of compiling the
+one supplied with GNU sed. In a Danish locale, for example,
the regular expression @code{^[a-z]$} matches the string @samp{aa},
because this is a single collating symbol that comes after @samp{a}
and before @samp{b}; @samp{ll} behaves similarly in Spanish
diff --git a/doc/sed.x b/doc/sed.x
index 401bd88..b2e0beb 100644
--- a/doc/sed.x
+++ b/doc/sed.x
@@ -257,6 +257,8 @@ Match the last line.
.RI / regexp /
Match lines matching the regular expression
.IR regexp .
+Matching is performed on the current pattern space, which
+can be modified with commands such as ``s///''.
.TP
.BI \fR\e\fPc regexp c
Match lines matching the regular expression
diff --git a/doc/stamp-vti b/doc/stamp-vti
index 803c837..40812fc 100644
--- a/doc/stamp-vti
+++ b/doc/stamp-vti
@@ -1,4 +1,4 @@
-@set UPDATED 3 February 2017
-@set UPDATED-MONTH February 2017
-@set EDITION 4.4
-@set VERSION 4.4
+@set UPDATED 30 March 2018
+@set UPDATED-MONTH March 2018
+@set EDITION 4.5
+@set VERSION 4.5
diff --git a/doc/version.texi b/doc/version.texi
index 803c837..40812fc 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -1,4 +1,4 @@
-@set UPDATED 3 February 2017
-@set UPDATED-MONTH February 2017
-@set EDITION 4.4
-@set VERSION 4.4
+@set UPDATED 30 March 2018
+@set UPDATED-MONTH March 2018
+@set EDITION 4.5
+@set VERSION 4.5
diff --git a/gnulib-tests/Makefile.in b/gnulib-tests/Makefile.in
index 6ba29be..0eeaacc 100644
--- a/gnulib-tests/Makefile.in
+++ b/gnulib-tests/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.99a from Makefile.am.
+# Makefile.in generated by automake 1.16a from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2015 Free Software Foundation, Inc.
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,7 @@
@SET_MAKE@
-# Copyright (C) 2002-2017 Free Software Foundation, Inc.
+# Copyright (C) 2002-2018 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
@@ -27,7 +27,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this file. If not, see <http://www.gnu.org/licenses/>.
+# along with this file. If not, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License,
# this file may be distributed as part of a program that
@@ -112,16 +112,18 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
XFAIL_TESTS =
-TESTS = test-set-mode-acl.sh test-set-mode-acl-1.sh \
- test-set-mode-acl-2.sh test-copy-acl.sh test-copy-acl-1.sh \
- test-copy-acl-2.sh test-alignof$(EXEEXT) \
- test-alloca-opt$(EXEEXT) test-binary-io.sh test-btowc1.sh \
+TESTS = test-accept$(EXEEXT) test-set-mode-acl.sh \
+ test-set-mode-acl-1.sh test-set-mode-acl-2.sh test-copy-acl.sh \
+ test-copy-acl-1.sh test-copy-acl-2.sh test-alignof$(EXEEXT) \
+ test-alloca-opt$(EXEEXT) test-arpa_inet$(EXEEXT) \
+ test-binary-io.sh test-bind$(EXEEXT) test-btowc1.sh \
test-btowc2.sh test-c-ctype$(EXEEXT) test-c-strcase.sh \
test-canonicalize-lgpl$(EXEEXT) test-chdir$(EXEEXT) \
- test-close$(EXEEXT) test-ctype$(EXEEXT) \
+ test-cloexec$(EXEEXT) test-close$(EXEEXT) \
+ test-connect$(EXEEXT) test-ctype$(EXEEXT) \
dfa-invalid-char-class.sh dfa-match.sh test-dirent$(EXEEXT) \
test-dup2$(EXEEXT) test-environ$(EXEEXT) test-errno$(EXEEXT) \
- test-fcntl-h$(EXEEXT) test-fdopen$(EXEEXT) \
+ test-fcntl-h$(EXEEXT) test-fcntl$(EXEEXT) test-fdopen$(EXEEXT) \
test-fflush$(EXEEXT) test-fflush2.sh test-fgetc$(EXEEXT) \
test-file-has-acl.sh test-file-has-acl-1.sh \
test-file-has-acl-2.sh test-fpending.sh test-fpurge$(EXEEXT) \
@@ -130,32 +132,43 @@ TESTS = test-set-mode-acl.sh test-set-mode-acl-1.sh \
test-fseeko3.sh test-fseeko4.sh test-fstat$(EXEEXT) \
test-ftell.sh test-ftell2.sh test-ftell3$(EXEEXT) \
test-ftello.sh test-ftello2.sh test-ftello3$(EXEEXT) \
- test-ftello4.sh test-fwrite$(EXEEXT) test-fwriting$(EXEEXT) \
- test-getcwd-lgpl$(EXEEXT) test-getdelim$(EXEEXT) \
- test-getdtablesize$(EXEEXT) test-getopt-gnu$(EXEEXT) \
- test-getopt-posix$(EXEEXT) test-getprogname$(EXEEXT) \
- test-gettimeofday$(EXEEXT) test-ignore-value$(EXEEXT) \
+ test-ftello4.sh test-ftruncate.sh test-fwrite$(EXEEXT) \
+ test-fwriting$(EXEEXT) test-getcwd-lgpl$(EXEEXT) \
+ test-getdelim$(EXEEXT) test-getdtablesize$(EXEEXT) \
+ test-getopt-gnu$(EXEEXT) test-getopt-posix$(EXEEXT) \
+ test-getprogname$(EXEEXT) test-gettimeofday$(EXEEXT) \
+ test-ignore-value$(EXEEXT) test-inet_pton$(EXEEXT) \
test-intprops$(EXEEXT) test-inttypes$(EXEEXT) \
- test-isblank$(EXEEXT) test-langinfo$(EXEEXT) \
- test-limits-h$(EXEEXT) test-link$(EXEEXT) test-locale$(EXEEXT) \
+ test-ioctl$(EXEEXT) test-isblank$(EXEEXT) \
+ test-langinfo$(EXEEXT) test-limits-h$(EXEEXT) \
+ test-link$(EXEEXT) test-listen$(EXEEXT) test-locale$(EXEEXT) \
test-localeconv$(EXEEXT) test-localename$(EXEEXT) \
test-lseek.sh 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-mbsinit.sh \
- test-memchr$(EXEEXT) test-memrchr$(EXEEXT) test-nl_langinfo.sh \
- test-open$(EXEEXT) test-pathmax$(EXEEXT) \
- test-quotearg-simple$(EXEEXT) test-read-file$(EXEEXT) \
- test-readlink$(EXEEXT) test-regex$(EXEEXT) \
- test-rename$(EXEEXT) test-rmdir$(EXEEXT) test-setenv$(EXEEXT) \
- test-setlocale1.sh test-setlocale2.sh test-stat$(EXEEXT) \
- test-stdalign$(EXEEXT) test-stdbool$(EXEEXT) \
- test-stddef$(EXEEXT) test-stdint$(EXEEXT) test-stdio$(EXEEXT) \
- test-stdlib$(EXEEXT) test-strerror$(EXEEXT) \
+ test-memchr$(EXEEXT) test-memrchr$(EXEEXT) \
+ test-nanosleep$(EXEEXT) test-netinet_in$(EXEEXT) \
+ test-nl_langinfo.sh test-open$(EXEEXT) test-pathmax$(EXEEXT) \
+ test-perror.sh test-perror2$(EXEEXT) test-pipe$(EXEEXT) \
+ test-quotearg-simple$(EXEEXT) test-raise$(EXEEXT) \
+ test-read-file$(EXEEXT) test-readlink$(EXEEXT) \
+ test-regex$(EXEEXT) test-rename$(EXEEXT) test-rmdir$(EXEEXT) \
+ test-select$(EXEEXT) test-select-in.sh test-select-out.sh \
+ test-setenv$(EXEEXT) test-setlocale1.sh test-setlocale2.sh \
+ test-setsockopt$(EXEEXT) test-sigaction$(EXEEXT) \
+ test-signal-h$(EXEEXT) test-sigprocmask$(EXEEXT) \
+ test-sleep$(EXEEXT) test-sockets$(EXEEXT) test-stat$(EXEEXT) \
+ test-stat-time$(EXEEXT) test-stdalign$(EXEEXT) \
+ test-stdbool$(EXEEXT) test-stddef$(EXEEXT) \
+ test-stdint$(EXEEXT) test-stdio$(EXEEXT) test-stdlib$(EXEEXT) \
+ test-strerror$(EXEEXT) test-strerror_r$(EXEEXT) \
test-string$(EXEEXT) test-strverscmp$(EXEEXT) \
- test-symlink$(EXEEXT) test-sys_stat$(EXEEXT) \
- test-sys_time$(EXEEXT) test-sys_types$(EXEEXT) test-init.sh \
+ test-symlink$(EXEEXT) test-sys_ioctl$(EXEEXT) \
+ test-sys_select$(EXEEXT) test-sys_socket$(EXEEXT) \
+ test-sys_stat$(EXEEXT) test-sys_time$(EXEEXT) \
+ test-sys_types$(EXEEXT) test-sys_uio$(EXEEXT) test-init.sh \
test-time$(EXEEXT) test-unistd$(EXEEXT) test-unsetenv$(EXEEXT) \
test-update-copyright.sh test-vc-list-files-git.sh \
test-vc-list-files-cvs.sh test-verify$(EXEEXT) test-verify.sh \
@@ -165,15 +178,18 @@ TESTS = test-set-mode-acl.sh test-set-mode-acl-1.sh \
test-wcrtomb-w32-5.sh test-wctype-h$(EXEEXT) \
test-xalloc-die.sh
noinst_PROGRAMS =
-check_PROGRAMS = test-set-mode-acl$(EXEEXT) test-copy-acl$(EXEEXT) \
- test-sameacls$(EXEEXT) test-alignof$(EXEEXT) \
- test-alloca-opt$(EXEEXT) test-binary-io$(EXEEXT) \
- test-btowc$(EXEEXT) test-c-ctype$(EXEEXT) \
+check_PROGRAMS = test-accept$(EXEEXT) test-set-mode-acl$(EXEEXT) \
+ test-copy-acl$(EXEEXT) test-sameacls$(EXEEXT) \
+ test-alignof$(EXEEXT) test-alloca-opt$(EXEEXT) \
+ test-arpa_inet$(EXEEXT) test-binary-io$(EXEEXT) \
+ test-bind$(EXEEXT) test-btowc$(EXEEXT) test-c-ctype$(EXEEXT) \
test-c-strcasecmp$(EXEEXT) test-c-strncasecmp$(EXEEXT) \
test-canonicalize-lgpl$(EXEEXT) test-chdir$(EXEEXT) \
- test-close$(EXEEXT) test-ctype$(EXEEXT) dfa-match-aux$(EXEEXT) \
- test-dirent$(EXEEXT) test-dup2$(EXEEXT) test-environ$(EXEEXT) \
- test-errno$(EXEEXT) test-fcntl-h$(EXEEXT) test-fdopen$(EXEEXT) \
+ test-cloexec$(EXEEXT) test-close$(EXEEXT) \
+ test-connect$(EXEEXT) test-ctype$(EXEEXT) \
+ dfa-match-aux$(EXEEXT) test-dirent$(EXEEXT) test-dup2$(EXEEXT) \
+ test-environ$(EXEEXT) test-errno$(EXEEXT) \
+ test-fcntl-h$(EXEEXT) test-fcntl$(EXEEXT) test-fdopen$(EXEEXT) \
test-fflush$(EXEEXT) test-fflush2$(EXEEXT) test-fgetc$(EXEEXT) \
test-file-has-acl$(EXEEXT) test-fpending$(EXEEXT) \
test-fpurge$(EXEEXT) test-fputc$(EXEEXT) test-fread$(EXEEXT) \
@@ -182,41 +198,54 @@ check_PROGRAMS = test-set-mode-acl$(EXEEXT) test-copy-acl$(EXEEXT) \
test-fseeko4$(EXEEXT) test-fstat$(EXEEXT) test-ftell$(EXEEXT) \
test-ftell3$(EXEEXT) test-ftello$(EXEEXT) \
test-ftello3$(EXEEXT) test-ftello4$(EXEEXT) \
- test-fwrite$(EXEEXT) test-fwriting$(EXEEXT) \
- test-getcwd-lgpl$(EXEEXT) test-getdelim$(EXEEXT) \
- test-getdtablesize$(EXEEXT) test-getopt-gnu$(EXEEXT) \
- test-getopt-posix$(EXEEXT) test-getprogname$(EXEEXT) \
- test-gettimeofday$(EXEEXT) test-ignore-value$(EXEEXT) \
+ test-ftruncate$(EXEEXT) test-fwrite$(EXEEXT) \
+ test-fwriting$(EXEEXT) test-getcwd-lgpl$(EXEEXT) \
+ test-getdelim$(EXEEXT) test-getdtablesize$(EXEEXT) \
+ test-getopt-gnu$(EXEEXT) test-getopt-posix$(EXEEXT) \
+ test-getprogname$(EXEEXT) test-gettimeofday$(EXEEXT) \
+ test-ignore-value$(EXEEXT) test-inet_pton$(EXEEXT) \
test-intprops$(EXEEXT) test-inttypes$(EXEEXT) \
- test-isblank$(EXEEXT) test-langinfo$(EXEEXT) \
- test-limits-h$(EXEEXT) test-link$(EXEEXT) test-locale$(EXEEXT) \
+ test-ioctl$(EXEEXT) test-isblank$(EXEEXT) \
+ test-langinfo$(EXEEXT) test-limits-h$(EXEEXT) \
+ test-link$(EXEEXT) test-listen$(EXEEXT) test-locale$(EXEEXT) \
test-localeconv$(EXEEXT) test-localename$(EXEEXT) \
test-lseek$(EXEEXT) test-lstat$(EXEEXT) test-malloca$(EXEEXT) \
test-mbrtowc$(EXEEXT) test-mbrtowc-w32$(EXEEXT) \
test-mbsinit$(EXEEXT) test-memchr$(EXEEXT) \
- test-memrchr$(EXEEXT) test-nl_langinfo$(EXEEXT) \
- test-open$(EXEEXT) test-pathmax$(EXEEXT) \
- test-quotearg-simple$(EXEEXT) test-read-file$(EXEEXT) \
- test-readlink$(EXEEXT) test-regex$(EXEEXT) \
- test-rename$(EXEEXT) test-rmdir$(EXEEXT) test-setenv$(EXEEXT) \
+ test-memrchr$(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-read-file$(EXEEXT) test-readlink$(EXEEXT) \
+ test-regex$(EXEEXT) test-rename$(EXEEXT) test-rmdir$(EXEEXT) \
+ test-select$(EXEEXT) test-select-fd$(EXEEXT) \
+ test-select-stdin$(EXEEXT) test-setenv$(EXEEXT) \
test-setlocale1$(EXEEXT) test-setlocale2$(EXEEXT) \
- test-stat$(EXEEXT) test-stdalign$(EXEEXT) \
+ test-setsockopt$(EXEEXT) test-sigaction$(EXEEXT) \
+ test-signal-h$(EXEEXT) test-sigprocmask$(EXEEXT) \
+ test-sleep$(EXEEXT) test-sockets$(EXEEXT) test-stat$(EXEEXT) \
+ test-stat-time$(EXEEXT) test-stdalign$(EXEEXT) \
test-stdbool$(EXEEXT) test-stddef$(EXEEXT) \
test-stdint$(EXEEXT) test-stdio$(EXEEXT) test-stdlib$(EXEEXT) \
- test-strerror$(EXEEXT) test-string$(EXEEXT) \
- test-strverscmp$(EXEEXT) test-symlink$(EXEEXT) \
+ test-strerror$(EXEEXT) test-strerror_r$(EXEEXT) \
+ test-string$(EXEEXT) test-strverscmp$(EXEEXT) \
+ test-symlink$(EXEEXT) test-sys_ioctl$(EXEEXT) \
+ test-sys_select$(EXEEXT) test-sys_socket$(EXEEXT) \
test-sys_stat$(EXEEXT) test-sys_time$(EXEEXT) \
- test-sys_types$(EXEEXT) test-time$(EXEEXT) \
- test-unistd$(EXEEXT) test-unsetenv$(EXEEXT) \
+ test-sys_types$(EXEEXT) test-sys_uio$(EXEEXT) \
+ test-time$(EXEEXT) test-unistd$(EXEEXT) test-unsetenv$(EXEEXT) \
test-verify$(EXEEXT) test-version-etc$(EXEEXT) \
test-wchar$(EXEEXT) test-wcrtomb$(EXEEXT) \
test-wcrtomb-w32$(EXEEXT) test-wctype-h$(EXEEXT) \
test-xalloc-die$(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/acl.m4 \
- $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/assert.m4 \
+ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \
+ $(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/assert.m4 \
$(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/builtin-expect.m4 \
$(top_srcdir)/m4/canonicalize.m4 \
$(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \
@@ -229,12 +258,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/errno_h.m4 $(top_srcdir)/m4/error.m4 \
$(top_srcdir)/m4/extensions.m4 \
$(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/fcntl-o.m4 \
- $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopen.m4 \
- $(top_srcdir)/m4/fflush.m4 $(top_srcdir)/m4/flexmember.m4 \
- $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fpurge.m4 \
- $(top_srcdir)/m4/freading.m4 $(top_srcdir)/m4/fseek.m4 \
- $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \
- $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \
+ $(top_srcdir)/m4/fcntl.m4 $(top_srcdir)/m4/fcntl_h.m4 \
+ $(top_srcdir)/m4/fdopen.m4 $(top_srcdir)/m4/fflush.m4 \
+ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/fpending.m4 \
+ $(top_srcdir)/m4/fpurge.m4 $(top_srcdir)/m4/freading.m4 \
+ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \
+ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/ftell.m4 \
+ $(top_srcdir)/m4/ftello.m4 $(top_srcdir)/m4/ftruncate.m4 \
$(top_srcdir)/m4/fwriting.m4 $(top_srcdir)/m4/getcwd.m4 \
$(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdtablesize.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \
@@ -242,19 +272,21 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \
$(top_srcdir)/m4/gnulib-common.m4 \
$(top_srcdir)/m4/gnulib-comp.m4 \
- $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/include_next.m4 \
+ $(top_srcdir)/m4/hard-locale.m4 \
+ $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_pton.m4 \
$(top_srcdir)/m4/intlmacosx.m4 \
$(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \
- $(top_srcdir)/m4/isblank.m4 $(top_srcdir)/m4/langinfo_h.m4 \
- $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lcmessage.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/limits-h.m4 \
- $(top_srcdir)/m4/link.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/localename.m4 $(top_srcdir)/m4/lock.m4 \
+ $(top_srcdir)/m4/ioctl.m4 $(top_srcdir)/m4/isblank.m4 \
+ $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \
+ $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/limits-h.m4 $(top_srcdir)/m4/link.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/localename.m4 \
+ $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \
$(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \
$(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \
$(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/manywarnings.m4 \
@@ -265,36 +297,45 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/mkostemp.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 \
+ $(top_srcdir)/m4/nanosleep.m4 $(top_srcdir)/m4/netinet_in_h.m4 \
$(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/nocrash.m4 \
$(top_srcdir)/m4/non-recursive-gnulib-prefix-hack.m4 \
$(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/off_t.m4 \
- $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/opendir.m4 \
- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
- $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/m4/open-cloexec.m4 $(top_srcdir)/m4/open.m4 \
+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \
+ $(top_srcdir)/m4/perror.m4 $(top_srcdir)/m4/pipe.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \
$(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \
- $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/read-file.m4 \
- $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readlink.m4 \
- $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \
- $(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/rmdir.m4 \
- $(top_srcdir)/m4/secure_getenv.m4 \
+ $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/raise.m4 \
+ $(top_srcdir)/m4/read-file.m4 $(top_srcdir)/m4/readdir.m4 \
+ $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/realloc.m4 \
+ $(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/rename.m4 \
+ $(top_srcdir)/m4/rmdir.m4 $(top_srcdir)/m4/select.m4 \
$(top_srcdir)/m4/selinux-context-h.m4 \
$(top_srcdir)/m4/selinux-selinux-h.m4 \
$(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/setlocale.m4 \
- $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat.m4 \
- $(top_srcdir)/m4/std-gnu11.m4 $(top_srcdir)/m4/stdalign.m4 \
- $(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \
- $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \
- $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
- $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+ $(top_srcdir)/m4/sigaction.m4 $(top_srcdir)/m4/signal_h.m4 \
+ $(top_srcdir)/m4/signalblocking.m4 $(top_srcdir)/m4/sleep.m4 \
+ $(top_srcdir)/m4/socketlib.m4 $(top_srcdir)/m4/sockets.m4 \
+ $(top_srcdir)/m4/socklen.m4 $(top_srcdir)/m4/sockpfaf.m4 \
+ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat-time.m4 \
+ $(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/std-gnu11.m4 \
+ $(top_srcdir)/m4/stdalign.m4 $(top_srcdir)/m4/stdarg.m4 \
+ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \
+ $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdio_h.m4 \
+ $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strdup.m4 \
+ $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/strerror_r.m4 \
$(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strverscmp.m4 \
- $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_socket_h.m4 \
+ $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_ioctl_h.m4 \
+ $(top_srcdir)/m4/sys_select_h.m4 \
+ $(top_srcdir)/m4/sys_socket_h.m4 \
$(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \
- $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/tempname.m4 \
- $(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/time_h.m4 \
- $(top_srcdir)/m4/ungetc.m4 $(top_srcdir)/m4/unistd_h.m4 \
- $(top_srcdir)/m4/unlocked-io.m4 \
+ $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/sys_uio_h.m4 \
+ $(top_srcdir)/m4/tempname.m4 $(top_srcdir)/m4/threadlib.m4 \
+ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/ungetc.m4 \
+ $(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/unlocked-io.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 \
@@ -310,6 +351,7 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
LIBRARIES = $(noinst_LIBRARIES)
AM_V_AR = $(am__v_AR_@AM_V@)
am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
@@ -317,16 +359,19 @@ am__v_AR_0 = @echo " AR " $@;
am__v_AR_1 =
libtests_a_AR = $(AR) $(ARFLAGS)
am__DEPENDENCIES_1 =
-am_libtests_a_OBJECTS = binary-io.$(OBJEXT) fd-hook.$(OBJEXT) \
- file-has-acl.$(OBJEXT) freading.$(OBJEXT) localename.$(OBJEXT) \
- read-file.$(OBJEXT)
+am_libtests_a_OBJECTS = binary-io.$(OBJEXT) cloexec.$(OBJEXT) \
+ fd-hook.$(OBJEXT) file-has-acl.$(OBJEXT) freading.$(OBJEXT) \
+ localename.$(OBJEXT) read-file.$(OBJEXT) sig-handler.$(OBJEXT) \
+ sockets.$(OBJEXT) sys_socket.$(OBJEXT)
libtests_a_OBJECTS = $(am_libtests_a_OBJECTS)
-PROGRAMS = $(noinst_PROGRAMS)
dfa_match_aux_SOURCES = dfa-match-aux.c
dfa_match_aux_OBJECTS = dfa-match-aux.$(OBJEXT)
am__DEPENDENCIES_2 = libtests.a ../lib/libsed.a libtests.a \
$(am__DEPENDENCIES_1)
dfa_match_aux_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_accept_SOURCES = test-accept.c
+test_accept_OBJECTS = test-accept.$(OBJEXT)
+test_accept_DEPENDENCIES = $(am__DEPENDENCIES_2)
test_alignof_SOURCES = test-alignof.c
test_alignof_OBJECTS = test-alignof.$(OBJEXT)
test_alignof_LDADD = $(LDADD)
@@ -337,11 +382,19 @@ test_alloca_opt_OBJECTS = test-alloca-opt.$(OBJEXT)
test_alloca_opt_LDADD = $(LDADD)
test_alloca_opt_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
$(am__DEPENDENCIES_1)
+test_arpa_inet_SOURCES = test-arpa_inet.c
+test_arpa_inet_OBJECTS = test-arpa_inet.$(OBJEXT)
+test_arpa_inet_LDADD = $(LDADD)
+test_arpa_inet_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_binary_io_SOURCES = test-binary-io.c
test_binary_io_OBJECTS = test-binary-io.$(OBJEXT)
test_binary_io_LDADD = $(LDADD)
test_binary_io_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
$(am__DEPENDENCIES_1)
+test_bind_SOURCES = test-bind.c
+test_bind_OBJECTS = test-bind.$(OBJEXT)
+test_bind_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
test_btowc_SOURCES = test-btowc.c
test_btowc_OBJECTS = test-btowc.$(OBJEXT)
test_btowc_LDADD = $(LDADD)
@@ -372,11 +425,20 @@ test_chdir_OBJECTS = test-chdir.$(OBJEXT)
test_chdir_LDADD = $(LDADD)
test_chdir_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
$(am__DEPENDENCIES_1)
+test_cloexec_SOURCES = test-cloexec.c
+test_cloexec_OBJECTS = test-cloexec.$(OBJEXT)
+test_cloexec_LDADD = $(LDADD)
+test_cloexec_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_close_SOURCES = test-close.c
test_close_OBJECTS = test-close.$(OBJEXT)
test_close_LDADD = $(LDADD)
test_close_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
$(am__DEPENDENCIES_1)
+test_connect_SOURCES = test-connect.c
+test_connect_OBJECTS = test-connect.$(OBJEXT)
+test_connect_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1)
test_copy_acl_SOURCES = test-copy-acl.c
test_copy_acl_OBJECTS = test-copy-acl.$(OBJEXT)
test_copy_acl_DEPENDENCIES = $(am__DEPENDENCIES_2) \
@@ -406,6 +468,11 @@ test_errno_OBJECTS = test-errno.$(OBJEXT)
test_errno_LDADD = $(LDADD)
test_errno_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
$(am__DEPENDENCIES_1)
+test_fcntl_SOURCES = test-fcntl.c
+test_fcntl_OBJECTS = test-fcntl.$(OBJEXT)
+test_fcntl_LDADD = $(LDADD)
+test_fcntl_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_fcntl_h_SOURCES = test-fcntl-h.c
test_fcntl_h_OBJECTS = test-fcntl-h.$(OBJEXT)
test_fcntl_h_LDADD = $(LDADD)
@@ -510,6 +577,11 @@ test_ftello4_OBJECTS = test-ftello4.$(OBJEXT)
test_ftello4_LDADD = $(LDADD)
test_ftello4_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
$(am__DEPENDENCIES_1)
+test_ftruncate_SOURCES = test-ftruncate.c
+test_ftruncate_OBJECTS = test-ftruncate.$(OBJEXT)
+test_ftruncate_LDADD = $(LDADD)
+test_ftruncate_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_fwrite_SOURCES = test-fwrite.c
test_fwrite_OBJECTS = test-fwrite.$(OBJEXT)
test_fwrite_LDADD = $(LDADD)
@@ -555,6 +627,9 @@ test_ignore_value_OBJECTS = test-ignore-value.$(OBJEXT)
test_ignore_value_LDADD = $(LDADD)
test_ignore_value_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
$(am__DEPENDENCIES_1)
+test_inet_pton_SOURCES = test-inet_pton.c
+test_inet_pton_OBJECTS = test-inet_pton.$(OBJEXT)
+test_inet_pton_DEPENDENCIES = $(am__DEPENDENCIES_2)
test_intprops_SOURCES = test-intprops.c
test_intprops_OBJECTS = test-intprops.$(OBJEXT)
test_intprops_LDADD = $(LDADD)
@@ -565,6 +640,11 @@ test_inttypes_OBJECTS = test-inttypes.$(OBJEXT)
test_inttypes_LDADD = $(LDADD)
test_inttypes_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
$(am__DEPENDENCIES_1)
+test_ioctl_SOURCES = test-ioctl.c
+test_ioctl_OBJECTS = test-ioctl.$(OBJEXT)
+test_ioctl_LDADD = $(LDADD)
+test_ioctl_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_isblank_SOURCES = test-isblank.c
test_isblank_OBJECTS = test-isblank.$(OBJEXT)
test_isblank_LDADD = $(LDADD)
@@ -585,6 +665,9 @@ test_link_OBJECTS = test-link.$(OBJEXT)
test_link_LDADD = $(LDADD)
test_link_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
$(am__DEPENDENCIES_1)
+test_listen_SOURCES = test-listen.c
+test_listen_OBJECTS = test-listen.$(OBJEXT)
+test_listen_DEPENDENCIES = $(am__DEPENDENCIES_2)
test_locale_SOURCES = test-locale.c
test_locale_OBJECTS = test-locale.$(OBJEXT)
test_locale_LDADD = $(LDADD)
@@ -639,6 +722,15 @@ test_memrchr_OBJECTS = test-memrchr.$(OBJEXT)
test_memrchr_LDADD = $(LDADD)
test_memrchr_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
$(am__DEPENDENCIES_1)
+test_nanosleep_SOURCES = test-nanosleep.c
+test_nanosleep_OBJECTS = test-nanosleep.$(OBJEXT)
+test_nanosleep_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1)
+test_netinet_in_SOURCES = test-netinet_in.c
+test_netinet_in_OBJECTS = test-netinet_in.$(OBJEXT)
+test_netinet_in_LDADD = $(LDADD)
+test_netinet_in_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_nl_langinfo_SOURCES = test-nl_langinfo.c
test_nl_langinfo_OBJECTS = test-nl_langinfo.$(OBJEXT)
test_nl_langinfo_LDADD = $(LDADD)
@@ -654,9 +746,29 @@ test_pathmax_OBJECTS = test-pathmax.$(OBJEXT)
test_pathmax_LDADD = $(LDADD)
test_pathmax_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
$(am__DEPENDENCIES_1)
+test_perror_SOURCES = test-perror.c
+test_perror_OBJECTS = test-perror.$(OBJEXT)
+test_perror_LDADD = $(LDADD)
+test_perror_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_perror2_SOURCES = test-perror2.c
+test_perror2_OBJECTS = test-perror2.$(OBJEXT)
+test_perror2_LDADD = $(LDADD)
+test_perror2_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_pipe_SOURCES = test-pipe.c
+test_pipe_OBJECTS = test-pipe.$(OBJEXT)
+test_pipe_LDADD = $(LDADD)
+test_pipe_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_quotearg_simple_SOURCES = test-quotearg-simple.c
test_quotearg_simple_OBJECTS = test-quotearg-simple.$(OBJEXT)
test_quotearg_simple_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_raise_SOURCES = test-raise.c
+test_raise_OBJECTS = test-raise.$(OBJEXT)
+test_raise_LDADD = $(LDADD)
+test_raise_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_read_file_SOURCES = test-read-file.c
test_read_file_OBJECTS = test-read-file.$(OBJEXT)
test_read_file_LDADD = $(LDADD)
@@ -684,6 +796,15 @@ test_sameacls_SOURCES = test-sameacls.c
test_sameacls_OBJECTS = test-sameacls.$(OBJEXT)
test_sameacls_DEPENDENCIES = $(am__DEPENDENCIES_2) \
$(am__DEPENDENCIES_1)
+test_select_SOURCES = test-select.c
+test_select_OBJECTS = test-select.$(OBJEXT)
+test_select_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
+test_select_fd_SOURCES = test-select-fd.c
+test_select_fd_OBJECTS = test-select-fd.$(OBJEXT)
+test_select_fd_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_select_stdin_SOURCES = test-select-stdin.c
+test_select_stdin_OBJECTS = test-select-stdin.$(OBJEXT)
+test_select_stdin_DEPENDENCIES = $(am__DEPENDENCIES_2)
test_set_mode_acl_SOURCES = test-set-mode-acl.c
test_set_mode_acl_OBJECTS = test-set-mode-acl.$(OBJEXT)
test_set_mode_acl_DEPENDENCIES = $(am__DEPENDENCIES_2) \
@@ -703,9 +824,39 @@ test_setlocale2_OBJECTS = test-setlocale2.$(OBJEXT)
test_setlocale2_LDADD = $(LDADD)
test_setlocale2_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
$(am__DEPENDENCIES_1)
+test_setsockopt_SOURCES = test-setsockopt.c
+test_setsockopt_OBJECTS = test-setsockopt.$(OBJEXT)
+test_setsockopt_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_sigaction_SOURCES = test-sigaction.c
+test_sigaction_OBJECTS = test-sigaction.$(OBJEXT)
+test_sigaction_LDADD = $(LDADD)
+test_sigaction_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_signal_h_SOURCES = test-signal-h.c
+test_signal_h_OBJECTS = test-signal-h.$(OBJEXT)
+test_signal_h_LDADD = $(LDADD)
+test_signal_h_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_sigprocmask_SOURCES = test-sigprocmask.c
+test_sigprocmask_OBJECTS = test-sigprocmask.$(OBJEXT)
+test_sigprocmask_LDADD = $(LDADD)
+test_sigprocmask_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_sleep_SOURCES = test-sleep.c
+test_sleep_OBJECTS = test-sleep.$(OBJEXT)
+test_sleep_LDADD = $(LDADD)
+test_sleep_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_sockets_SOURCES = test-sockets.c
+test_sockets_OBJECTS = test-sockets.$(OBJEXT)
+test_sockets_DEPENDENCIES = $(am__DEPENDENCIES_2)
test_stat_SOURCES = test-stat.c
test_stat_OBJECTS = test-stat.$(OBJEXT)
test_stat_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
+test_stat_time_SOURCES = test-stat-time.c
+test_stat_time_OBJECTS = test-stat-time.$(OBJEXT)
+test_stat_time_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1)
test_stdalign_SOURCES = test-stdalign.c
test_stdalign_OBJECTS = test-stdalign.$(OBJEXT)
test_stdalign_LDADD = $(LDADD)
@@ -741,6 +892,11 @@ test_strerror_OBJECTS = test-strerror.$(OBJEXT)
test_strerror_LDADD = $(LDADD)
test_strerror_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
$(am__DEPENDENCIES_1)
+test_strerror_r_SOURCES = test-strerror_r.c
+test_strerror_r_OBJECTS = test-strerror_r.$(OBJEXT)
+test_strerror_r_LDADD = $(LDADD)
+test_strerror_r_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_string_SOURCES = test-string.c
test_string_OBJECTS = test-string.$(OBJEXT)
test_string_LDADD = $(LDADD)
@@ -756,6 +912,21 @@ test_symlink_OBJECTS = test-symlink.$(OBJEXT)
test_symlink_LDADD = $(LDADD)
test_symlink_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
$(am__DEPENDENCIES_1)
+test_sys_ioctl_SOURCES = test-sys_ioctl.c
+test_sys_ioctl_OBJECTS = test-sys_ioctl.$(OBJEXT)
+test_sys_ioctl_LDADD = $(LDADD)
+test_sys_ioctl_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_sys_select_SOURCES = test-sys_select.c
+test_sys_select_OBJECTS = test-sys_select.$(OBJEXT)
+test_sys_select_LDADD = $(LDADD)
+test_sys_select_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_sys_socket_SOURCES = test-sys_socket.c
+test_sys_socket_OBJECTS = test-sys_socket.$(OBJEXT)
+test_sys_socket_LDADD = $(LDADD)
+test_sys_socket_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_sys_stat_SOURCES = test-sys_stat.c
test_sys_stat_OBJECTS = test-sys_stat.$(OBJEXT)
test_sys_stat_LDADD = $(LDADD)
@@ -771,6 +942,11 @@ test_sys_types_OBJECTS = test-sys_types.$(OBJEXT)
test_sys_types_LDADD = $(LDADD)
test_sys_types_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
$(am__DEPENDENCIES_1)
+test_sys_uio_SOURCES = test-sys_uio.c
+test_sys_uio_OBJECTS = test-sys_uio.$(OBJEXT)
+test_sys_uio_LDADD = $(LDADD)
+test_sys_uio_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_time_SOURCES = test-time.c
test_time_OBJECTS = test-time.$(OBJEXT)
test_time_LDADD = $(LDADD)
@@ -791,6 +967,11 @@ test_verify_OBJECTS = test-verify.$(OBJEXT)
test_verify_LDADD = $(LDADD)
test_verify_DEPENDENCIES = libtests.a ../lib/libsed.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/libsed.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)
@@ -832,80 +1013,104 @@ am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ./$(DEPDIR)/binary-io.Po ./$(DEPDIR)/close.Po \
- ./$(DEPDIR)/closedir.Po ./$(DEPDIR)/dfa-match-aux.Po \
- ./$(DEPDIR)/dirfd.Po ./$(DEPDIR)/dup2.Po \
+am__depfiles_remade = ./$(DEPDIR)/accept.Po ./$(DEPDIR)/binary-io.Po \
+ ./$(DEPDIR)/bind.Po ./$(DEPDIR)/cloexec.Po \
+ ./$(DEPDIR)/close.Po ./$(DEPDIR)/closedir.Po \
+ ./$(DEPDIR)/connect.Po ./$(DEPDIR)/dfa-match-aux.Po \
+ ./$(DEPDIR)/dirfd.Po ./$(DEPDIR)/dup2.Po ./$(DEPDIR)/fcntl.Po \
./$(DEPDIR)/fd-hook.Po ./$(DEPDIR)/fdopen.Po \
./$(DEPDIR)/fflush.Po ./$(DEPDIR)/file-has-acl.Po \
./$(DEPDIR)/fpurge.Po ./$(DEPDIR)/freading.Po \
./$(DEPDIR)/fseek.Po ./$(DEPDIR)/fseeko.Po \
./$(DEPDIR)/ftell.Po ./$(DEPDIR)/ftello.Po \
- ./$(DEPDIR)/getcwd-lgpl.Po ./$(DEPDIR)/getdtablesize.Po \
- ./$(DEPDIR)/getpagesize.Po ./$(DEPDIR)/link.Po \
+ ./$(DEPDIR)/ftruncate.Po ./$(DEPDIR)/getcwd-lgpl.Po \
+ ./$(DEPDIR)/getdtablesize.Po ./$(DEPDIR)/getpagesize.Po \
+ ./$(DEPDIR)/inet_pton.Po ./$(DEPDIR)/ioctl.Po \
+ ./$(DEPDIR)/link.Po ./$(DEPDIR)/listen.Po \
./$(DEPDIR)/localename.Po ./$(DEPDIR)/lseek.Po \
- ./$(DEPDIR)/open.Po ./$(DEPDIR)/opendir.Po \
- ./$(DEPDIR)/putenv.Po ./$(DEPDIR)/read-file.Po \
- ./$(DEPDIR)/readdir.Po ./$(DEPDIR)/realloc.Po \
+ ./$(DEPDIR)/nanosleep.Po ./$(DEPDIR)/open.Po \
+ ./$(DEPDIR)/opendir.Po ./$(DEPDIR)/perror.Po \
+ ./$(DEPDIR)/pipe.Po ./$(DEPDIR)/putenv.Po ./$(DEPDIR)/raise.Po \
+ ./$(DEPDIR)/read-file.Po ./$(DEPDIR)/readdir.Po \
+ ./$(DEPDIR)/realloc.Po ./$(DEPDIR)/select.Po \
./$(DEPDIR)/setenv.Po ./$(DEPDIR)/setlocale.Po \
- ./$(DEPDIR)/strdup.Po ./$(DEPDIR)/symlink.Po \
+ ./$(DEPDIR)/setsockopt.Po ./$(DEPDIR)/sig-handler.Po \
+ ./$(DEPDIR)/sigaction.Po ./$(DEPDIR)/sigprocmask.Po \
+ ./$(DEPDIR)/sleep.Po ./$(DEPDIR)/socket.Po \
+ ./$(DEPDIR)/sockets.Po ./$(DEPDIR)/strdup.Po \
+ ./$(DEPDIR)/strerror_r.Po ./$(DEPDIR)/symlink.Po \
+ ./$(DEPDIR)/sys_socket.Po ./$(DEPDIR)/test-accept.Po \
./$(DEPDIR)/test-alignof.Po ./$(DEPDIR)/test-alloca-opt.Po \
- ./$(DEPDIR)/test-binary-io.Po ./$(DEPDIR)/test-btowc.Po \
+ ./$(DEPDIR)/test-arpa_inet.Po ./$(DEPDIR)/test-binary-io.Po \
+ ./$(DEPDIR)/test-bind.Po ./$(DEPDIR)/test-btowc.Po \
./$(DEPDIR)/test-c-ctype.Po ./$(DEPDIR)/test-c-strcasecmp.Po \
./$(DEPDIR)/test-c-strncasecmp.Po \
./$(DEPDIR)/test-canonicalize-lgpl.Po \
- ./$(DEPDIR)/test-chdir.Po ./$(DEPDIR)/test-close.Po \
+ ./$(DEPDIR)/test-chdir.Po ./$(DEPDIR)/test-cloexec.Po \
+ ./$(DEPDIR)/test-close.Po ./$(DEPDIR)/test-connect.Po \
./$(DEPDIR)/test-copy-acl.Po ./$(DEPDIR)/test-ctype.Po \
./$(DEPDIR)/test-dirent.Po ./$(DEPDIR)/test-dup2.Po \
./$(DEPDIR)/test-environ.Po ./$(DEPDIR)/test-errno.Po \
- ./$(DEPDIR)/test-fcntl-h.Po ./$(DEPDIR)/test-fdopen.Po \
- ./$(DEPDIR)/test-fflush.Po ./$(DEPDIR)/test-fflush2.Po \
- ./$(DEPDIR)/test-fgetc.Po ./$(DEPDIR)/test-file-has-acl.Po \
- ./$(DEPDIR)/test-fpending.Po ./$(DEPDIR)/test-fpurge.Po \
- ./$(DEPDIR)/test-fputc.Po ./$(DEPDIR)/test-fread.Po \
- ./$(DEPDIR)/test-freading.Po ./$(DEPDIR)/test-fseek.Po \
- ./$(DEPDIR)/test-fseeko.Po ./$(DEPDIR)/test-fseeko3.Po \
- ./$(DEPDIR)/test-fseeko4.Po ./$(DEPDIR)/test-fstat.Po \
- ./$(DEPDIR)/test-ftell.Po ./$(DEPDIR)/test-ftell3.Po \
- ./$(DEPDIR)/test-ftello.Po ./$(DEPDIR)/test-ftello3.Po \
- ./$(DEPDIR)/test-ftello4.Po ./$(DEPDIR)/test-fwrite.Po \
+ ./$(DEPDIR)/test-fcntl-h.Po ./$(DEPDIR)/test-fcntl.Po \
+ ./$(DEPDIR)/test-fdopen.Po ./$(DEPDIR)/test-fflush.Po \
+ ./$(DEPDIR)/test-fflush2.Po ./$(DEPDIR)/test-fgetc.Po \
+ ./$(DEPDIR)/test-file-has-acl.Po ./$(DEPDIR)/test-fpending.Po \
+ ./$(DEPDIR)/test-fpurge.Po ./$(DEPDIR)/test-fputc.Po \
+ ./$(DEPDIR)/test-fread.Po ./$(DEPDIR)/test-freading.Po \
+ ./$(DEPDIR)/test-fseek.Po ./$(DEPDIR)/test-fseeko.Po \
+ ./$(DEPDIR)/test-fseeko3.Po ./$(DEPDIR)/test-fseeko4.Po \
+ ./$(DEPDIR)/test-fstat.Po ./$(DEPDIR)/test-ftell.Po \
+ ./$(DEPDIR)/test-ftell3.Po ./$(DEPDIR)/test-ftello.Po \
+ ./$(DEPDIR)/test-ftello3.Po ./$(DEPDIR)/test-ftello4.Po \
+ ./$(DEPDIR)/test-ftruncate.Po ./$(DEPDIR)/test-fwrite.Po \
./$(DEPDIR)/test-fwriting.Po ./$(DEPDIR)/test-getcwd-lgpl.Po \
./$(DEPDIR)/test-getdelim.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-ignore-value.Po ./$(DEPDIR)/test-intprops.Po \
- ./$(DEPDIR)/test-inttypes.Po ./$(DEPDIR)/test-isblank.Po \
+ ./$(DEPDIR)/test-ignore-value.Po ./$(DEPDIR)/test-inet_pton.Po \
+ ./$(DEPDIR)/test-intprops.Po ./$(DEPDIR)/test-inttypes.Po \
+ ./$(DEPDIR)/test-ioctl.Po ./$(DEPDIR)/test-isblank.Po \
./$(DEPDIR)/test-langinfo.Po ./$(DEPDIR)/test-limits-h.Po \
- ./$(DEPDIR)/test-link.Po ./$(DEPDIR)/test-locale.Po \
- ./$(DEPDIR)/test-localeconv.Po ./$(DEPDIR)/test-localename.Po \
- ./$(DEPDIR)/test-lseek.Po ./$(DEPDIR)/test-lstat.Po \
- ./$(DEPDIR)/test-malloca.Po ./$(DEPDIR)/test-mbrtowc-w32.Po \
- ./$(DEPDIR)/test-mbrtowc.Po ./$(DEPDIR)/test-mbsinit.Po \
- ./$(DEPDIR)/test-memchr.Po ./$(DEPDIR)/test-memrchr.Po \
- ./$(DEPDIR)/test-nl_langinfo.Po ./$(DEPDIR)/test-open.Po \
- ./$(DEPDIR)/test-pathmax.Po \
- ./$(DEPDIR)/test-quotearg-simple.Po \
- ./$(DEPDIR)/test-read-file.Po ./$(DEPDIR)/test-readlink.Po \
- ./$(DEPDIR)/test-regex.Po ./$(DEPDIR)/test-rename.Po \
- ./$(DEPDIR)/test-rmdir.Po ./$(DEPDIR)/test-sameacls.Po \
+ ./$(DEPDIR)/test-link.Po ./$(DEPDIR)/test-listen.Po \
+ ./$(DEPDIR)/test-locale.Po ./$(DEPDIR)/test-localeconv.Po \
+ ./$(DEPDIR)/test-localename.Po ./$(DEPDIR)/test-lseek.Po \
+ ./$(DEPDIR)/test-lstat.Po ./$(DEPDIR)/test-malloca.Po \
+ ./$(DEPDIR)/test-mbrtowc-w32.Po ./$(DEPDIR)/test-mbrtowc.Po \
+ ./$(DEPDIR)/test-mbsinit.Po ./$(DEPDIR)/test-memchr.Po \
+ ./$(DEPDIR)/test-memrchr.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-read-file.Po \
+ ./$(DEPDIR)/test-readlink.Po ./$(DEPDIR)/test-regex.Po \
+ ./$(DEPDIR)/test-rename.Po ./$(DEPDIR)/test-rmdir.Po \
+ ./$(DEPDIR)/test-sameacls.Po ./$(DEPDIR)/test-select-fd.Po \
+ ./$(DEPDIR)/test-select-stdin.Po ./$(DEPDIR)/test-select.Po \
./$(DEPDIR)/test-set-mode-acl.Po ./$(DEPDIR)/test-setenv.Po \
./$(DEPDIR)/test-setlocale1.Po ./$(DEPDIR)/test-setlocale2.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-setsockopt.Po ./$(DEPDIR)/test-sigaction.Po \
+ ./$(DEPDIR)/test-signal-h.Po ./$(DEPDIR)/test-sigprocmask.Po \
+ ./$(DEPDIR)/test-sleep.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-string.Po ./$(DEPDIR)/test-strverscmp.Po \
- ./$(DEPDIR)/test-symlink.Po ./$(DEPDIR)/test-sys_stat.Po \
- ./$(DEPDIR)/test-sys_time.Po ./$(DEPDIR)/test-sys_types.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-time.Po ./$(DEPDIR)/test-unistd.Po \
- ./$(DEPDIR)/test-unsetenv.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 ./$(DEPDIR)/test-xalloc-die.Po \
- ./$(DEPDIR)/unsetenv.Po
+ ./$(DEPDIR)/test-unsetenv.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 \
+ ./$(DEPDIR)/test-xalloc-die.Po ./$(DEPDIR)/unsetenv.Po
am__mv = mv -f
-am__set_depbase = depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.[^.]*$$||'`
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
@@ -919,63 +1124,83 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \
- dfa-match-aux.c test-alignof.c test-alloca-opt.c \
- test-binary-io.c test-btowc.c test-c-ctype.c \
- test-c-strcasecmp.c test-c-strncasecmp.c \
- test-canonicalize-lgpl.c test-chdir.c test-close.c \
- test-copy-acl.c test-ctype.c test-dirent.c test-dup2.c \
- test-environ.c test-errno.c test-fcntl-h.c test-fdopen.c \
- test-fflush.c test-fflush2.c test-fgetc.c test-file-has-acl.c \
+ dfa-match-aux.c test-accept.c test-alignof.c test-alloca-opt.c \
+ test-arpa_inet.c test-binary-io.c test-bind.c test-btowc.c \
+ test-c-ctype.c test-c-strcasecmp.c test-c-strncasecmp.c \
+ test-canonicalize-lgpl.c test-chdir.c test-cloexec.c \
+ test-close.c test-connect.c test-copy-acl.c test-ctype.c \
+ test-dirent.c test-dup2.c test-environ.c test-errno.c \
+ test-fcntl.c test-fcntl-h.c test-fdopen.c test-fflush.c \
+ test-fflush2.c test-fgetc.c test-file-has-acl.c \
test-fpending.c test-fpurge.c test-fputc.c test-fread.c \
test-freading.c test-fseek.c test-fseeko.c test-fseeko3.c \
test-fseeko4.c test-fstat.c test-ftell.c test-ftell3.c \
- test-ftello.c test-ftello3.c test-ftello4.c test-fwrite.c \
- test-fwriting.c test-getcwd-lgpl.c test-getdelim.c \
- test-getdtablesize.c test-getopt-gnu.c test-getopt-posix.c \
- test-getprogname.c test-gettimeofday.c test-ignore-value.c \
- test-intprops.c test-inttypes.c test-isblank.c test-langinfo.c \
- test-limits-h.c test-link.c test-locale.c test-localeconv.c \
- test-localename.c test-lseek.c test-lstat.c test-malloca.c \
- test-mbrtowc.c test-mbrtowc-w32.c test-mbsinit.c test-memchr.c \
- test-memrchr.c test-nl_langinfo.c test-open.c test-pathmax.c \
- test-quotearg-simple.c test-read-file.c test-readlink.c \
- test-regex.c test-rename.c test-rmdir.c test-sameacls.c \
- test-set-mode-acl.c test-setenv.c test-setlocale1.c \
- test-setlocale2.c test-stat.c test-stdalign.c test-stdbool.c \
- test-stddef.c test-stdint.c test-stdio.c test-stdlib.c \
- test-strerror.c test-string.c test-strverscmp.c test-symlink.c \
- test-sys_stat.c test-sys_time.c test-sys_types.c test-time.c \
- test-unistd.c test-unsetenv.c test-verify.c test-version-etc.c \
+ test-ftello.c test-ftello3.c test-ftello4.c test-ftruncate.c \
+ test-fwrite.c test-fwriting.c test-getcwd-lgpl.c \
+ test-getdelim.c test-getdtablesize.c test-getopt-gnu.c \
+ test-getopt-posix.c test-getprogname.c test-gettimeofday.c \
+ test-ignore-value.c test-inet_pton.c test-intprops.c \
+ test-inttypes.c test-ioctl.c test-isblank.c test-langinfo.c \
+ test-limits-h.c test-link.c test-listen.c test-locale.c \
+ test-localeconv.c test-localename.c test-lseek.c test-lstat.c \
+ test-malloca.c test-mbrtowc.c test-mbrtowc-w32.c \
+ test-mbsinit.c test-memchr.c test-memrchr.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-read-file.c \
+ test-readlink.c test-regex.c test-rename.c test-rmdir.c \
+ test-sameacls.c test-select.c test-select-fd.c \
+ test-select-stdin.c test-set-mode-acl.c test-setenv.c \
+ test-setlocale1.c test-setlocale2.c test-setsockopt.c \
+ test-sigaction.c test-signal-h.c test-sigprocmask.c \
+ test-sleep.c test-sockets.c test-stat.c test-stat-time.c \
+ test-stdalign.c test-stdbool.c test-stddef.c test-stdint.c \
+ test-stdio.c test-stdlib.c test-strerror.c test-strerror_r.c \
+ test-string.c test-strverscmp.c test-symlink.c \
+ test-sys_ioctl.c test-sys_select.c test-sys_socket.c \
+ test-sys_stat.c test-sys_time.c test-sys_types.c \
+ test-sys_uio.c test-time.c test-unistd.c test-unsetenv.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-xalloc-die.c
DIST_SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \
- dfa-match-aux.c test-alignof.c test-alloca-opt.c \
- test-binary-io.c test-btowc.c test-c-ctype.c \
- test-c-strcasecmp.c test-c-strncasecmp.c \
- test-canonicalize-lgpl.c test-chdir.c test-close.c \
- test-copy-acl.c test-ctype.c test-dirent.c test-dup2.c \
- test-environ.c test-errno.c test-fcntl-h.c test-fdopen.c \
- test-fflush.c test-fflush2.c test-fgetc.c test-file-has-acl.c \
+ dfa-match-aux.c test-accept.c test-alignof.c test-alloca-opt.c \
+ test-arpa_inet.c test-binary-io.c test-bind.c test-btowc.c \
+ test-c-ctype.c test-c-strcasecmp.c test-c-strncasecmp.c \
+ test-canonicalize-lgpl.c test-chdir.c test-cloexec.c \
+ test-close.c test-connect.c test-copy-acl.c test-ctype.c \
+ test-dirent.c test-dup2.c test-environ.c test-errno.c \
+ test-fcntl.c test-fcntl-h.c test-fdopen.c test-fflush.c \
+ test-fflush2.c test-fgetc.c test-file-has-acl.c \
test-fpending.c test-fpurge.c test-fputc.c test-fread.c \
test-freading.c test-fseek.c test-fseeko.c test-fseeko3.c \
test-fseeko4.c test-fstat.c test-ftell.c test-ftell3.c \
- test-ftello.c test-ftello3.c test-ftello4.c test-fwrite.c \
- test-fwriting.c test-getcwd-lgpl.c test-getdelim.c \
- test-getdtablesize.c test-getopt-gnu.c test-getopt-posix.c \
- test-getprogname.c test-gettimeofday.c test-ignore-value.c \
- test-intprops.c test-inttypes.c test-isblank.c test-langinfo.c \
- test-limits-h.c test-link.c test-locale.c test-localeconv.c \
- test-localename.c test-lseek.c test-lstat.c test-malloca.c \
- test-mbrtowc.c test-mbrtowc-w32.c test-mbsinit.c test-memchr.c \
- test-memrchr.c test-nl_langinfo.c test-open.c test-pathmax.c \
- test-quotearg-simple.c test-read-file.c test-readlink.c \
- test-regex.c test-rename.c test-rmdir.c test-sameacls.c \
- test-set-mode-acl.c test-setenv.c test-setlocale1.c \
- test-setlocale2.c test-stat.c test-stdalign.c test-stdbool.c \
- test-stddef.c test-stdint.c test-stdio.c test-stdlib.c \
- test-strerror.c test-string.c test-strverscmp.c test-symlink.c \
- test-sys_stat.c test-sys_time.c test-sys_types.c test-time.c \
- test-unistd.c test-unsetenv.c test-verify.c test-version-etc.c \
+ test-ftello.c test-ftello3.c test-ftello4.c test-ftruncate.c \
+ test-fwrite.c test-fwriting.c test-getcwd-lgpl.c \
+ test-getdelim.c test-getdtablesize.c test-getopt-gnu.c \
+ test-getopt-posix.c test-getprogname.c test-gettimeofday.c \
+ test-ignore-value.c test-inet_pton.c test-intprops.c \
+ test-inttypes.c test-ioctl.c test-isblank.c test-langinfo.c \
+ test-limits-h.c test-link.c test-listen.c test-locale.c \
+ test-localeconv.c test-localename.c test-lseek.c test-lstat.c \
+ test-malloca.c test-mbrtowc.c test-mbrtowc-w32.c \
+ test-mbsinit.c test-memchr.c test-memrchr.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-read-file.c \
+ test-readlink.c test-regex.c test-rename.c test-rmdir.c \
+ test-sameacls.c test-select.c test-select-fd.c \
+ test-select-stdin.c test-set-mode-acl.c test-setenv.c \
+ test-setlocale1.c test-setlocale2.c test-setsockopt.c \
+ test-sigaction.c test-signal-h.c test-sigprocmask.c \
+ test-sleep.c test-sockets.c test-stat.c test-stat-time.c \
+ test-stdalign.c test-stdbool.c test-stddef.c test-stdint.c \
+ test-stdio.c test-stdlib.c test-strerror.c test-strerror_r.c \
+ test-string.c test-strverscmp.c test-symlink.c \
+ test-sys_ioctl.c test-sys_select.c test-sys_socket.c \
+ test-sys_stat.c test-sys_time.c test-sys_types.c \
+ test-sys_uio.c test-time.c test-unistd.c test-unsetenv.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-xalloc-die.c
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
@@ -999,7 +1224,7 @@ am__recursive_targets = \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
- check recheck distdir
+ check recheck distdir distdir-am
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
@@ -1291,13 +1516,17 @@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
ERRNO_H = @ERRNO_H@
EXEEXT = @EXEEXT@
+GETOPT_CDEFS_H = @GETOPT_CDEFS_H@
GETOPT_H = @GETOPT_H@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GLIBC21 = @GLIBC21@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ACCEPT = @GNULIB_ACCEPT@
+GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@
GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BIND = @GNULIB_BIND@
GNULIB_BTOWC = @GNULIB_BTOWC@
GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
@@ -1305,6 +1534,8 @@ GNULIB_CHDIR = @GNULIB_CHDIR@
GNULIB_CHOWN = @GNULIB_CHOWN@
GNULIB_CLOSE = @GNULIB_CLOSE@
GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@
+GNULIB_CONNECT = @GNULIB_CONNECT@
+GNULIB_CTIME = @GNULIB_CTIME@
GNULIB_DIRFD = @GNULIB_DIRFD@
GNULIB_DPRINTF = @GNULIB_DPRINTF@
GNULIB_DUP = @GNULIB_DUP@
@@ -1313,6 +1544,7 @@ GNULIB_DUP3 = @GNULIB_DUP3@
GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
GNULIB_ENVIRON = @GNULIB_ENVIRON@
GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@
GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
GNULIB_FCHDIR = @GNULIB_FCHDIR@
GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
@@ -1359,6 +1591,9 @@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
+GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@
+GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@
+GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@
GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
@@ -1367,6 +1602,9 @@ GNULIB_GRANTPT = @GNULIB_GRANTPT@
GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
GNULIB_IMAXABS = @GNULIB_IMAXABS@
GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+GNULIB_INET_NTOP = @GNULIB_INET_NTOP@
+GNULIB_INET_PTON = @GNULIB_INET_PTON@
+GNULIB_IOCTL = @GNULIB_IOCTL@
GNULIB_ISATTY = @GNULIB_ISATTY@
GNULIB_ISBLANK = @GNULIB_ISBLANK@
GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
@@ -1375,7 +1613,9 @@ GNULIB_LCHMOD = @GNULIB_LCHMOD@
GNULIB_LCHOWN = @GNULIB_LCHOWN@
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@
@@ -1422,6 +1662,7 @@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
GNULIB_OPEN = @GNULIB_OPEN@
GNULIB_OPENAT = @GNULIB_OPENAT@
GNULIB_OPENDIR = @GNULIB_OPENDIR@
+GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@
GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@
GNULIB_PCLOSE = @GNULIB_PCLOSE@
GNULIB_PERROR = @GNULIB_PERROR@
@@ -1432,6 +1673,8 @@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
GNULIB_PREAD = @GNULIB_PREAD@
GNULIB_PRINTF = @GNULIB_PRINTF@
GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PSELECT = @GNULIB_PSELECT@
+GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@
GNULIB_PTSNAME = @GNULIB_PTSNAME@
GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
GNULIB_PUTC = @GNULIB_PUTC@
@@ -1440,6 +1683,7 @@ GNULIB_PUTENV = @GNULIB_PUTENV@
GNULIB_PUTS = @GNULIB_PUTS@
GNULIB_PWRITE = @GNULIB_PWRITE@
GNULIB_QSORT_R = @GNULIB_QSORT_R@
+GNULIB_RAISE = @GNULIB_RAISE@
GNULIB_RANDOM = @GNULIB_RANDOM@
GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
@@ -1447,8 +1691,11 @@ GNULIB_READ = @GNULIB_READ@
GNULIB_READDIR = @GNULIB_READDIR@
GNULIB_READLINK = @GNULIB_READLINK@
GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOCARRAY = @GNULIB_REALLOCARRAY@
GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_RECV = @GNULIB_RECV@
+GNULIB_RECVFROM = @GNULIB_RECVFROM@
GNULIB_REMOVE = @GNULIB_REMOVE@
GNULIB_RENAME = @GNULIB_RENAME@
GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
@@ -1458,11 +1705,20 @@ GNULIB_RPMATCH = @GNULIB_RPMATCH@
GNULIB_SCANDIR = @GNULIB_SCANDIR@
GNULIB_SCANF = @GNULIB_SCANF@
GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
+GNULIB_SELECT = @GNULIB_SELECT@
+GNULIB_SEND = @GNULIB_SEND@
+GNULIB_SENDTO = @GNULIB_SENDTO@
GNULIB_SETENV = @GNULIB_SETENV@
GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
+GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@
+GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@
+GNULIB_SIGACTION = @GNULIB_SIGACTION@
+GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
+GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
GNULIB_SLEEP = @GNULIB_SLEEP@
GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SOCKET = @GNULIB_SOCKET@
GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
GNULIB_STAT = @GNULIB_STAT@
GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@
@@ -1474,6 +1730,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@
@@ -1498,7 +1755,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@
@@ -1528,6 +1787,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@
@@ -1556,13 +1816,16 @@ GNULIB_WMEMSET = @GNULIB_WMEMSET@
GNULIB_WRITE = @GNULIB_WRITE@
GNULIB__EXIT = @GNULIB__EXIT@
GREP = @GREP@
+HAVE_ACCEPT4 = @HAVE_ACCEPT4@
HAVE_ALPHASORT = @HAVE_ALPHASORT@
+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_CLOSEDIR = @HAVE_CLOSEDIR@
+HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@
HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
@@ -1581,12 +1844,16 @@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
+HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@
+HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@
+HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@
HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
+HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@
HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
@@ -1607,6 +1874,7 @@ HAVE_DUP2 = @HAVE_DUP2@
HAVE_DUP3 = @HAVE_DUP3@
HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
HAVE_FACCESSAT = @HAVE_FACCESSAT@
HAVE_FCHDIR = @HAVE_FCHDIR@
HAVE_FCHMODAT = @HAVE_FCHMODAT@
@@ -1637,6 +1905,7 @@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
HAVE_ISBLANK = @HAVE_ISBLANK@
HAVE_ISWBLANK = @HAVE_ISWBLANK@
HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
+HAVE_LANGINFO_ALTMON = @HAVE_LANGINFO_ALTMON@
HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@
HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@
HAVE_LANGINFO_H = @HAVE_LANGINFO_H@
@@ -1669,6 +1938,7 @@ HAVE_MKSTEMP = @HAVE_MKSTEMP@
HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
+HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@
HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
HAVE_OPENAT = @HAVE_OPENAT@
HAVE_OPENDIR = @HAVE_OPENDIR@
@@ -1678,11 +1948,15 @@ HAVE_PIPE = @HAVE_PIPE@
HAVE_PIPE2 = @HAVE_PIPE2@
HAVE_POPEN = @HAVE_POPEN@
HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
+HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
HAVE_PREAD = @HAVE_PREAD@
+HAVE_PSELECT = @HAVE_PSELECT@
+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@
HAVE_RANDOM_R = @HAVE_RANDOM_R@
@@ -1690,17 +1964,23 @@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
HAVE_READDIR = @HAVE_READDIR@
HAVE_READLINK = @HAVE_READLINK@
HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALLOCARRAY = @HAVE_REALLOCARRAY@
HAVE_REALPATH = @HAVE_REALPATH@
HAVE_RENAMEAT = @HAVE_RENAMEAT@
HAVE_REWINDDIR = @HAVE_REWINDDIR@
HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@
HAVE_SCANDIR = @HAVE_SCANDIR@
HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
HAVE_SETENV = @HAVE_SETENV@
HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
+HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
+HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+HAVE_SIGSET_T = @HAVE_SIGSET_T@
HAVE_SLEEP = @HAVE_SLEEP@
HAVE_STDINT_H = @HAVE_STDINT_H@
HAVE_STPCPY = @HAVE_STPCPY@
@@ -1714,18 +1994,29 @@ HAVE_STRTOD = @HAVE_STRTOD@
HAVE_STRTOLL = @HAVE_STRTOLL@
HAVE_STRTOULL = @HAVE_STRTOULL@
HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
+HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@
+HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@
+HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@
HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
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@
HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@
+HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
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@
@@ -1747,6 +2038,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@
@@ -1772,11 +2064,15 @@ HAVE_WMEMCMP = @HAVE_WMEMCMP@
HAVE_WMEMCPY = @HAVE_WMEMCPY@
HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
HAVE_WMEMSET = @HAVE_WMEMSET@
+HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
HAVE__BOOL = @HAVE__BOOL@
HAVE__EXIT = @HAVE__EXIT@
+HOST_CPU = @HOST_CPU@
+HOST_CPU_C_ABI = @HOST_CPU_C_ABI@
INCLUDE_NEXT = @INCLUDE_NEXT@
INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INET_PTON_LIB = @INET_PTON_LIB@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -1796,10 +2092,13 @@ LIBPTH_PREFIX = @LIBPTH_PREFIX@
LIBS = @LIBS@
LIBSED_LIBDEPS = @LIBSED_LIBDEPS@
LIBSED_LTLIBDEPS = @LIBSED_LTLIBDEPS@
+LIBSOCKET = @LIBSOCKET@
LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
LIBTHREAD = @LIBTHREAD@
LIB_ACL = @LIB_ACL@
LIB_HAS_ACL = @LIB_HAS_ACL@
+LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LIB_SELECT = @LIB_SELECT@
LIB_SELINUX = @LIB_SELINUX@
LIMITS_H = @LIMITS_H@
LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
@@ -1819,6 +2118,9 @@ MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
+NETINET_IN_H = @NETINET_IN_H@
+NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@
+NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@
NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@
NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
@@ -1828,16 +2130,22 @@ 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_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@
+NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@
NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@
NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@
NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@
NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@
NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@
NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@
NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
@@ -1851,16 +2159,22 @@ 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_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@
+NEXT_SIGNAL_H = @NEXT_SIGNAL_H@
NEXT_STDARG_H = @NEXT_STDARG_H@
NEXT_STDDEF_H = @NEXT_STDDEF_H@
NEXT_STDINT_H = @NEXT_STDINT_H@
NEXT_STDIO_H = @NEXT_STDIO_H@
NEXT_STDLIB_H = @NEXT_STDLIB_H@
NEXT_STRING_H = @NEXT_STRING_H@
+NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@
+NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@
+NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@
+NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@
NEXT_TIME_H = @NEXT_TIME_H@
NEXT_UNISTD_H = @NEXT_UNISTD_H@
NEXT_WCHAR_H = @NEXT_WCHAR_H@
@@ -1889,11 +2203,13 @@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
+REPLACE_CTIME = @REPLACE_CTIME@
REPLACE_DIRFD = @REPLACE_DIRFD@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_FACCESSAT = @REPLACE_FACCESSAT@
REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
REPLACE_FCLOSE = @REPLACE_FCLOSE@
REPLACE_FCNTL = @REPLACE_FCNTL@
@@ -1922,6 +2238,9 @@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
REPLACE_GMTIME = @REPLACE_GMTIME@
+REPLACE_INET_NTOP = @REPLACE_INET_NTOP@
+REPLACE_INET_PTON = @REPLACE_INET_PTON@
+REPLACE_IOCTL = @REPLACE_IOCTL@
REPLACE_ISATTY = @REPLACE_ISATTY@
REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
@@ -1959,11 +2278,14 @@ REPLACE_PERROR = @REPLACE_PERROR@
REPLACE_POPEN = @REPLACE_POPEN@
REPLACE_PREAD = @REPLACE_PREAD@
REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_PSELECT = @REPLACE_PSELECT@
+REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@
REPLACE_PTSNAME = @REPLACE_PTSNAME@
REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
REPLACE_PUTENV = @REPLACE_PUTENV@
REPLACE_PWRITE = @REPLACE_PWRITE@
REPLACE_QSORT_R = @REPLACE_QSORT_R@
+REPLACE_RAISE = @REPLACE_RAISE@
REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
REPLACE_READ = @REPLACE_READ@
REPLACE_READLINK = @REPLACE_READLINK@
@@ -1974,6 +2296,7 @@ REPLACE_REMOVE = @REPLACE_REMOVE@
REPLACE_RENAME = @REPLACE_RENAME@
REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_SELECT = @REPLACE_SELECT@
REPLACE_SETENV = @REPLACE_SETENV@
REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
REPLACE_SLEEP = @REPLACE_SLEEP@
@@ -1988,6 +2311,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@
@@ -2004,7 +2328,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@
@@ -2017,6 +2343,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@
@@ -2036,6 +2363,8 @@ STDBOOL_H = @STDBOOL_H@
STDDEF_H = @STDDEF_H@
STDINT_H = @STDINT_H@
STRIP = @STRIP@
+SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@
+SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
@@ -2052,6 +2381,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@
@@ -2061,9 +2392,9 @@ 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__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
@@ -2132,120 +2463,128 @@ TESTS_ENVIRONMENT = EXEEXT='@EXEEXT@' srcdir='$(srcdir)' \
noinst_HEADERS =
noinst_LIBRARIES =
check_LIBRARIES = libtests.a
-EXTRA_DIST = test-set-mode-acl.sh test-set-mode-acl-1.sh \
+EXTRA_DIST = accept.c w32sock.h test-accept.c signature.h macros.h \
+ test-set-mode-acl.sh test-set-mode-acl-1.sh \
test-set-mode-acl-2.sh test-copy-acl.sh test-copy-acl-1.sh \
test-copy-acl-2.sh test-set-mode-acl.c test-copy-acl.c \
test-sameacls.c macros.h test-alignof.c test-alloca-opt.c \
- test-binary-io.sh test-binary-io.c macros.h test-btowc1.sh \
- test-btowc2.sh test-btowc.c signature.h macros.h \
- test-c-ctype.c macros.h test-c-strcase.sh test-c-strcasecmp.c \
- test-c-strncasecmp.c macros.h test-canonicalize-lgpl.c \
- signature.h macros.h test-chdir.c signature.h macros.h close.c \
- test-close.c signature.h macros.h closedir.c dirent-private.h \
- test-ctype.c dfa-match.sh dfa-match-aux.c \
- dfa-invalid-char-class.sh dirent.in.h test-dirent.c dirfd.c \
- dup2.c test-dup2.c signature.h macros.h test-environ.c \
- test-errno.c test-fcntl-h.c fd-hook.h fdopen.c test-fdopen.c \
- signature.h macros.h fflush.c stdio-impl.h test-fflush.c \
- test-fflush2.sh test-fflush2.c signature.h macros.h \
- test-fgetc.c signature.h macros.h test-file-has-acl.sh \
- test-file-has-acl-1.sh test-file-has-acl-2.sh \
- test-file-has-acl.c macros.h filename.h flexmember.h \
- test-fpending.c test-fpending.sh macros.h fpurge.c \
- stdio-impl.h test-fpurge.c macros.h test-fputc.c signature.h \
- macros.h test-fread.c signature.h macros.h freading.h \
- stdio-impl.h test-freading.c macros.h fseek.c test-fseek.c \
- test-fseek.sh test-fseek2.sh signature.h macros.h fseeko.c \
- stdio-impl.h test-fseeko.c test-fseeko.sh test-fseeko2.sh \
- test-fseeko3.c test-fseeko3.sh test-fseeko4.c test-fseeko4.sh \
- signature.h macros.h test-fstat.c signature.h macros.h ftell.c \
- test-ftell.c test-ftell.sh test-ftell2.sh test-ftell3.c \
- signature.h macros.h ftello.c stdio-impl.h test-ftello.c \
- test-ftello.sh test-ftello2.sh test-ftello3.c test-ftello4.c \
- test-ftello4.sh signature.h macros.h test-fwrite.c signature.h \
- macros.h test-fwriting.c macros.h getcwd-lgpl.c \
- test-getcwd-lgpl.c signature.h macros.h test-getdelim.c \
- signature.h macros.h getdtablesize.c test-getdtablesize.c \
- 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-ignore-value.c test-intprops.c \
- macros.h inttypes.in.h test-inttypes.c test-isblank.c \
- signature.h macros.h test-langinfo.c test-limits-h.c link.c \
- test-link.h test-link.c signature.h macros.h test-locale.c \
- test-localeconv.c signature.h macros.h localename.h \
- test-localename.c macros.h lseek.c test-lseek.c test-lseek.sh \
- 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-mbsinit.sh test-mbsinit.c signature.h macros.h \
- test-memchr.c zerosize-ptr.h signature.h macros.h \
- test-memrchr.c zerosize-ptr.h signature.h macros.h \
- test-nl_langinfo.sh test-nl_langinfo.c signature.h macros.h \
- open.c test-open.h test-open.c signature.h macros.h \
- dirent-private.h opendir.c test-pathmax.c putenv.c \
- test-quotearg-simple.c test-quotearg.h macros.h zerosize-ptr.h \
- read-file.h test-read-file.c dirent-private.h readdir.c \
- test-readlink.h test-readlink.c signature.h macros.h realloc.c \
- test-regex.c macros.h test-rename.h test-rename.c signature.h \
- macros.h test-rmdir.h test-rmdir.c signature.h macros.h \
- setenv.c test-setenv.c signature.h macros.h setlocale.c \
- test-setlocale1.sh test-setlocale1.c test-setlocale2.sh \
- test-setlocale2.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 test-stat.h \
- test-stat.c signature.h macros.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 strdup.c test-strerror.c \
- signature.h macros.h test-string.c test-strverscmp.c \
- signature.h macros.h symlink.c test-symlink.h test-symlink.c \
- signature.h macros.h test-sys_stat.c test-sys_time.c \
- test-sys_types.c init.sh test-init.sh test-time.c \
- test-unistd.c unsetenv.c test-unsetenv.c signature.h macros.h \
- test-update-copyright.sh test-vc-list-files-git.sh \
- test-vc-list-files-cvs.sh test-verify.c test-verify.sh \
+ arpa_inet.in.h test-arpa_inet.c test-binary-io.sh \
+ test-binary-io.c macros.h bind.c w32sock.h test-bind.c \
+ signature.h macros.h test-btowc1.sh test-btowc2.sh \
+ test-btowc.c signature.h macros.h test-c-ctype.c macros.h \
+ test-c-strcase.sh test-c-strcasecmp.c test-c-strncasecmp.c \
+ macros.h test-canonicalize-lgpl.c signature.h null-ptr.h \
+ macros.h test-chdir.c signature.h macros.h cloexec.h \
+ test-cloexec.c macros.h close.c test-close.c signature.h \
+ macros.h closedir.c dirent-private.h connect.c w32sock.h \
+ test-connect.c signature.h macros.h test-ctype.c dfa-match.sh \
+ dfa-match-aux.c dfa-invalid-char-class.sh dirent.in.h \
+ test-dirent.c dirfd.c dup2.c test-dup2.c signature.h macros.h \
+ test-environ.c test-errno.c fcntl.c test-fcntl-h.c \
+ test-fcntl.c signature.h macros.h fd-hook.h fdopen.c \
+ test-fdopen.c signature.h macros.h fflush.c stdio-impl.h \
+ test-fflush.c test-fflush2.sh test-fflush2.c signature.h \
+ macros.h test-fgetc.c signature.h macros.h \
+ test-file-has-acl.sh test-file-has-acl-1.sh \
+ test-file-has-acl-2.sh test-file-has-acl.c macros.h \
+ flexmember.h test-fpending.c test-fpending.sh macros.h \
+ fpurge.c stdio-impl.h test-fpurge.c macros.h test-fputc.c \
+ signature.h macros.h test-fread.c signature.h macros.h \
+ freading.h stdio-impl.h test-freading.c macros.h fseek.c \
+ test-fseek.c test-fseek.sh test-fseek2.sh signature.h macros.h \
+ fseeko.c stdio-impl.h test-fseeko.c test-fseeko.sh \
+ test-fseeko2.sh test-fseeko3.c test-fseeko3.sh test-fseeko4.c \
+ test-fseeko4.sh signature.h macros.h test-fstat.c signature.h \
+ macros.h ftell.c test-ftell.c test-ftell.sh test-ftell2.sh \
+ test-ftell3.c signature.h macros.h ftello.c stdio-impl.h \
+ test-ftello.c test-ftello.sh test-ftello2.sh test-ftello3.c \
+ test-ftello4.c test-ftello4.sh signature.h macros.h \
+ ftruncate.c test-ftruncate.c test-ftruncate.sh signature.h \
+ macros.h test-fwrite.c signature.h macros.h test-fwriting.c \
+ macros.h getcwd-lgpl.c test-getcwd-lgpl.c signature.h macros.h \
+ test-getdelim.c signature.h macros.h getdtablesize.c \
+ test-getdtablesize.c 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-ignore-value.c inet_pton.c test-inet_pton.c signature.h \
+ macros.h test-intprops.c macros.h inttypes.in.h \
+ test-inttypes.c ioctl.c w32sock.h test-ioctl.c signature.h \
+ macros.h test-isblank.c signature.h macros.h test-langinfo.c \
+ test-limits-h.c link.c test-link.h test-link.c signature.h \
+ macros.h listen.c w32sock.h test-listen.c signature.h macros.h \
+ test-locale.c test-localeconv.c signature.h macros.h \
+ localename.h test-localename.c macros.h lseek.c test-lseek.c \
+ test-lseek.sh 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-mbsinit.sh test-mbsinit.c \
+ signature.h macros.h test-memchr.c zerosize-ptr.h signature.h \
+ macros.h test-memrchr.c zerosize-ptr.h signature.h macros.h \
+ nanosleep.c test-nanosleep.c signature.h macros.h \
+ netinet_in.in.h test-netinet_in.c test-nl_langinfo.sh \
+ test-nl_langinfo.c signature.h macros.h open.c test-open.h \
+ test-open.c signature.h macros.h dirent-private.h opendir.c \
+ test-pathmax.c perror.c macros.h signature.h test-perror.c \
+ test-perror2.c test-perror.sh pipe.c test-pipe.c signature.h \
+ macros.h putenv.c test-quotearg-simple.c test-quotearg.h \
+ macros.h zerosize-ptr.h raise.c test-raise.c signature.h \
+ macros.h read-file.h test-read-file.c dirent-private.h \
+ readdir.c test-readlink.h test-readlink.c signature.h macros.h \
+ realloc.c test-regex.c macros.h test-rename.h test-rename.c \
+ signature.h macros.h test-rmdir.h test-rmdir.c signature.h \
+ macros.h select.c macros.h signature.h test-select.c \
+ test-select.h test-select-fd.c test-select-in.sh \
+ test-select-out.sh test-select-stdin.c setenv.c test-setenv.c \
+ signature.h macros.h setlocale.c test-setlocale1.sh \
+ test-setlocale1.c test-setlocale2.sh test-setlocale2.c \
+ signature.h macros.h setsockopt.c w32sock.h test-setsockopt.c \
+ signature.h macros.h sig-handler.h sigaction.c \
+ test-sigaction.c signature.h macros.h signal.in.h \
+ test-signal-h.c sigprocmask.c test-sigprocmask.c signature.h \
+ macros.h sleep.c test-sleep.c signature.h macros.h _Noreturn.h \
+ arg-nonnull.h c++defs.h unused-parameter.h warn-on-use.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 test-stdalign.c macros.h test-stdbool.c test-stddef.c \
+ test-stdint.c test-stdio.c test-stdlib.c test-sys_wait.h \
+ strdup.c test-strerror.c signature.h macros.h strerror_r.c \
+ test-strerror_r.c signature.h macros.h test-string.c \
+ test-strverscmp.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 init.sh \
+ test-init.sh test-time.c test-unistd.c unsetenv.c \
+ test-unsetenv.c signature.h macros.h test-update-copyright.sh \
+ test-vc-list-files-git.sh test-vc-list-files-cvs.sh \
+ 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 test-wctype-h.c macros.h \
test-xalloc-die.c test-xalloc-die.sh
-
-# 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 = dirent.h inttypes.h arg-nonnull.h c++defs.h \
- unused-parameter.h warn-on-use.h
+BUILT_SOURCES = arpa/inet.h dirent.h inttypes.h $(NETINET_IN_H) \
+ signal.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 dirent.h dirent.h-t \
- test-fflush.txt test-fpending.t t-fpurge.tmp t-freading.tmp \
- t-ftell3.tmp t-ftello3.tmp t-fwriting.tmp test-getdelim.txt \
- inttypes.h inttypes.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 .deps/test-verify.Tpo
-MOSTLYCLEANDIRS =
+MOSTLYCLEANFILES = core *.stackdump arpa/inet.h arpa/inet.h-t dirent.h \
+ dirent.h-t test-fflush.txt test-fpending.t t-fpurge.tmp \
+ t-freading.tmp t-ftell3.tmp t-ftello3.tmp t-fwriting.tmp \
+ test-getdelim.txt inttypes.h inttypes.h-t netinet/in.h \
+ netinet/in.h-t signal.h signal.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 =
MAINTAINERCLEANFILES =
@@ -2256,38 +2595,70 @@ AM_CPPFLAGS = \
-I../lib -I$(srcdir)/../lib
LDADD = libtests.a ../lib/libsed.a libtests.a $(LIBTESTS_LIBDEPS)
-libtests_a_SOURCES = binary-io.h binary-io.c fd-hook.c file-has-acl.c \
- freading.c localename.c read-file.c
+libtests_a_SOURCES = binary-io.h binary-io.c cloexec.c fd-hook.c \
+ file-has-acl.c freading.c localename.c read-file.c \
+ sig-handler.c sockets.h sockets.c sys_socket.c
libtests_a_LIBADD = $(gltests_LIBOBJS)
libtests_a_DEPENDENCIES = $(gltests_LIBOBJS)
-EXTRA_libtests_a_SOURCES = close.c closedir.c dirfd.c dup2.c fdopen.c \
- fflush.c fpurge.c fseek.c fseeko.c ftell.c ftello.c \
- getcwd-lgpl.c getdtablesize.c getpagesize.c link.c lseek.c \
- open.c opendir.c putenv.c readdir.c realloc.c setenv.c \
- setlocale.c strdup.c symlink.c unsetenv.c
+EXTRA_libtests_a_SOURCES = accept.c bind.c close.c closedir.c \
+ connect.c dirfd.c dup2.c fcntl.c fdopen.c fflush.c fpurge.c \
+ fseek.c fseeko.c ftell.c ftello.c ftruncate.c getcwd-lgpl.c \
+ getdtablesize.c getpagesize.c inet_pton.c ioctl.c link.c \
+ listen.c lseek.c nanosleep.c open.c opendir.c perror.c pipe.c \
+ putenv.c raise.c readdir.c realloc.c select.c setenv.c \
+ setlocale.c setsockopt.c sigaction.c sigprocmask.c sleep.c \
+ socket.c strdup.c strerror_r.c symlink.c unsetenv.c
AM_LIBTOOLFLAGS = --preserve-dup-deps
+test_accept_LDADD = $(LDADD) @LIBSOCKET@
test_set_mode_acl_LDADD = $(LDADD) $(LIB_ACL) @LIBINTL@
test_copy_acl_LDADD = $(LDADD) $(LIB_ACL) @LIBINTL@
test_sameacls_LDADD = $(LDADD) $(LIB_ACL) @LIBINTL@
+test_bind_LDADD = $(LDADD) @LIBSOCKET@ $(INET_PTON_LIB)
+test_connect_LDADD = $(LDADD) @LIBSOCKET@ $(INET_PTON_LIB)
dfa_match_aux_LDADD = $(LDADD) @LIBINTL@
test_file_has_acl_LDADD = $(LDADD) $(LIB_HAS_ACL)
test_getcwd_lgpl_LDADD = $(LDADD) $(LIBINTL)
test_getopt_gnu_LDADD = $(LDADD) $(LIBINTL)
test_getopt_posix_LDADD = $(LDADD) $(LIBINTL)
test_getprogname_LDADD = $(LDADD)
+test_inet_pton_LDADD = $(LDADD) @INET_PTON_LIB@
+test_listen_LDADD = $(LDADD) @LIBSOCKET@
test_localename_LDADD = $(LDADD) @INTL_MACOSX_LIBS@ $(LIBTHREAD)
+test_nanosleep_LDADD = $(LDADD) $(LIB_NANOSLEEP)
test_quotearg_simple_LDADD = $(LDADD) @LIBINTL@
test_regex_LDADD = $(LDADD) @LIBINTL@ $(LIBTHREAD) $(LIB_PTHREAD)
+test_select_LDADD = $(LDADD) @LIB_SELECT@ @LIBSOCKET@ $(INET_PTON_LIB)
+test_select_fd_LDADD = $(LDADD) @LIB_SELECT@
+test_select_stdin_LDADD = $(LDADD) @LIB_SELECT@
+test_setsockopt_LDADD = $(LDADD) @LIBSOCKET@
# 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
-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
+_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.
+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)
test_version_etc_LDADD = $(LDADD) @LIBINTL@
test_xalloc_die_LDADD = $(LDADD) @LIBINTL@
all: $(BUILT_SOURCES)
@@ -2326,6 +2697,12 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
+clean-checkPROGRAMS:
+ -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+
+clean-noinstPROGRAMS:
+ -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+
clean-checkLIBRARIES:
-test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES)
@@ -2337,16 +2714,14 @@ libtests.a: $(libtests_a_OBJECTS) $(libtests_a_DEPENDENCIES) $(EXTRA_libtests_a_
$(AM_V_AR)$(libtests_a_AR) libtests.a $(libtests_a_OBJECTS) $(libtests_a_LIBADD)
$(AM_V_at)$(RANLIB) libtests.a
-clean-checkPROGRAMS:
- -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
-
-clean-noinstPROGRAMS:
- -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-
dfa-match-aux$(EXEEXT): $(dfa_match_aux_OBJECTS) $(dfa_match_aux_DEPENDENCIES) $(EXTRA_dfa_match_aux_DEPENDENCIES)
@rm -f dfa-match-aux$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(dfa_match_aux_OBJECTS) $(dfa_match_aux_LDADD) $(LIBS)
+test-accept$(EXEEXT): $(test_accept_OBJECTS) $(test_accept_DEPENDENCIES) $(EXTRA_test_accept_DEPENDENCIES)
+ @rm -f test-accept$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_accept_OBJECTS) $(test_accept_LDADD) $(LIBS)
+
test-alignof$(EXEEXT): $(test_alignof_OBJECTS) $(test_alignof_DEPENDENCIES) $(EXTRA_test_alignof_DEPENDENCIES)
@rm -f test-alignof$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_alignof_OBJECTS) $(test_alignof_LDADD) $(LIBS)
@@ -2355,10 +2730,18 @@ test-alloca-opt$(EXEEXT): $(test_alloca_opt_OBJECTS) $(test_alloca_opt_DEPENDENC
@rm -f test-alloca-opt$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_alloca_opt_OBJECTS) $(test_alloca_opt_LDADD) $(LIBS)
+test-arpa_inet$(EXEEXT): $(test_arpa_inet_OBJECTS) $(test_arpa_inet_DEPENDENCIES) $(EXTRA_test_arpa_inet_DEPENDENCIES)
+ @rm -f test-arpa_inet$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_arpa_inet_OBJECTS) $(test_arpa_inet_LDADD) $(LIBS)
+
test-binary-io$(EXEEXT): $(test_binary_io_OBJECTS) $(test_binary_io_DEPENDENCIES) $(EXTRA_test_binary_io_DEPENDENCIES)
@rm -f test-binary-io$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_binary_io_OBJECTS) $(test_binary_io_LDADD) $(LIBS)
+test-bind$(EXEEXT): $(test_bind_OBJECTS) $(test_bind_DEPENDENCIES) $(EXTRA_test_bind_DEPENDENCIES)
+ @rm -f test-bind$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_bind_OBJECTS) $(test_bind_LDADD) $(LIBS)
+
test-btowc$(EXEEXT): $(test_btowc_OBJECTS) $(test_btowc_DEPENDENCIES) $(EXTRA_test_btowc_DEPENDENCIES)
@rm -f test-btowc$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_btowc_OBJECTS) $(test_btowc_LDADD) $(LIBS)
@@ -2383,10 +2766,18 @@ test-chdir$(EXEEXT): $(test_chdir_OBJECTS) $(test_chdir_DEPENDENCIES) $(EXTRA_te
@rm -f test-chdir$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_chdir_OBJECTS) $(test_chdir_LDADD) $(LIBS)
+test-cloexec$(EXEEXT): $(test_cloexec_OBJECTS) $(test_cloexec_DEPENDENCIES) $(EXTRA_test_cloexec_DEPENDENCIES)
+ @rm -f test-cloexec$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_cloexec_OBJECTS) $(test_cloexec_LDADD) $(LIBS)
+
test-close$(EXEEXT): $(test_close_OBJECTS) $(test_close_DEPENDENCIES) $(EXTRA_test_close_DEPENDENCIES)
@rm -f test-close$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_close_OBJECTS) $(test_close_LDADD) $(LIBS)
+test-connect$(EXEEXT): $(test_connect_OBJECTS) $(test_connect_DEPENDENCIES) $(EXTRA_test_connect_DEPENDENCIES)
+ @rm -f test-connect$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_connect_OBJECTS) $(test_connect_LDADD) $(LIBS)
+
test-copy-acl$(EXEEXT): $(test_copy_acl_OBJECTS) $(test_copy_acl_DEPENDENCIES) $(EXTRA_test_copy_acl_DEPENDENCIES)
@rm -f test-copy-acl$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_copy_acl_OBJECTS) $(test_copy_acl_LDADD) $(LIBS)
@@ -2411,6 +2802,10 @@ test-errno$(EXEEXT): $(test_errno_OBJECTS) $(test_errno_DEPENDENCIES) $(EXTRA_te
@rm -f test-errno$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_errno_OBJECTS) $(test_errno_LDADD) $(LIBS)
+test-fcntl$(EXEEXT): $(test_fcntl_OBJECTS) $(test_fcntl_DEPENDENCIES) $(EXTRA_test_fcntl_DEPENDENCIES)
+ @rm -f test-fcntl$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fcntl_OBJECTS) $(test_fcntl_LDADD) $(LIBS)
+
test-fcntl-h$(EXEEXT): $(test_fcntl_h_OBJECTS) $(test_fcntl_h_DEPENDENCIES) $(EXTRA_test_fcntl_h_DEPENDENCIES)
@rm -f test-fcntl-h$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_fcntl_h_OBJECTS) $(test_fcntl_h_LDADD) $(LIBS)
@@ -2495,6 +2890,10 @@ test-ftello4$(EXEEXT): $(test_ftello4_OBJECTS) $(test_ftello4_DEPENDENCIES) $(EX
@rm -f test-ftello4$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_ftello4_OBJECTS) $(test_ftello4_LDADD) $(LIBS)
+test-ftruncate$(EXEEXT): $(test_ftruncate_OBJECTS) $(test_ftruncate_DEPENDENCIES) $(EXTRA_test_ftruncate_DEPENDENCIES)
+ @rm -f test-ftruncate$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_ftruncate_OBJECTS) $(test_ftruncate_LDADD) $(LIBS)
+
test-fwrite$(EXEEXT): $(test_fwrite_OBJECTS) $(test_fwrite_DEPENDENCIES) $(EXTRA_test_fwrite_DEPENDENCIES)
@rm -f test-fwrite$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_fwrite_OBJECTS) $(test_fwrite_LDADD) $(LIBS)
@@ -2535,6 +2934,10 @@ test-ignore-value$(EXEEXT): $(test_ignore_value_OBJECTS) $(test_ignore_value_DEP
@rm -f test-ignore-value$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_ignore_value_OBJECTS) $(test_ignore_value_LDADD) $(LIBS)
+test-inet_pton$(EXEEXT): $(test_inet_pton_OBJECTS) $(test_inet_pton_DEPENDENCIES) $(EXTRA_test_inet_pton_DEPENDENCIES)
+ @rm -f test-inet_pton$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_inet_pton_OBJECTS) $(test_inet_pton_LDADD) $(LIBS)
+
test-intprops$(EXEEXT): $(test_intprops_OBJECTS) $(test_intprops_DEPENDENCIES) $(EXTRA_test_intprops_DEPENDENCIES)
@rm -f test-intprops$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_intprops_OBJECTS) $(test_intprops_LDADD) $(LIBS)
@@ -2543,6 +2946,10 @@ test-inttypes$(EXEEXT): $(test_inttypes_OBJECTS) $(test_inttypes_DEPENDENCIES) $
@rm -f test-inttypes$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_inttypes_OBJECTS) $(test_inttypes_LDADD) $(LIBS)
+test-ioctl$(EXEEXT): $(test_ioctl_OBJECTS) $(test_ioctl_DEPENDENCIES) $(EXTRA_test_ioctl_DEPENDENCIES)
+ @rm -f test-ioctl$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_ioctl_OBJECTS) $(test_ioctl_LDADD) $(LIBS)
+
test-isblank$(EXEEXT): $(test_isblank_OBJECTS) $(test_isblank_DEPENDENCIES) $(EXTRA_test_isblank_DEPENDENCIES)
@rm -f test-isblank$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_isblank_OBJECTS) $(test_isblank_LDADD) $(LIBS)
@@ -2559,6 +2966,10 @@ test-link$(EXEEXT): $(test_link_OBJECTS) $(test_link_DEPENDENCIES) $(EXTRA_test_
@rm -f test-link$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_link_OBJECTS) $(test_link_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)
+
test-locale$(EXEEXT): $(test_locale_OBJECTS) $(test_locale_DEPENDENCIES) $(EXTRA_test_locale_DEPENDENCIES)
@rm -f test-locale$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_locale_OBJECTS) $(test_locale_LDADD) $(LIBS)
@@ -2603,6 +3014,14 @@ test-memrchr$(EXEEXT): $(test_memrchr_OBJECTS) $(test_memrchr_DEPENDENCIES) $(EX
@rm -f test-memrchr$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_memrchr_OBJECTS) $(test_memrchr_LDADD) $(LIBS)
+test-nanosleep$(EXEEXT): $(test_nanosleep_OBJECTS) $(test_nanosleep_DEPENDENCIES) $(EXTRA_test_nanosleep_DEPENDENCIES)
+ @rm -f test-nanosleep$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_nanosleep_OBJECTS) $(test_nanosleep_LDADD) $(LIBS)
+
+test-netinet_in$(EXEEXT): $(test_netinet_in_OBJECTS) $(test_netinet_in_DEPENDENCIES) $(EXTRA_test_netinet_in_DEPENDENCIES)
+ @rm -f test-netinet_in$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_netinet_in_OBJECTS) $(test_netinet_in_LDADD) $(LIBS)
+
test-nl_langinfo$(EXEEXT): $(test_nl_langinfo_OBJECTS) $(test_nl_langinfo_DEPENDENCIES) $(EXTRA_test_nl_langinfo_DEPENDENCIES)
@rm -f test-nl_langinfo$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_nl_langinfo_OBJECTS) $(test_nl_langinfo_LDADD) $(LIBS)
@@ -2615,10 +3034,26 @@ test-pathmax$(EXEEXT): $(test_pathmax_OBJECTS) $(test_pathmax_DEPENDENCIES) $(EX
@rm -f test-pathmax$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_pathmax_OBJECTS) $(test_pathmax_LDADD) $(LIBS)
+test-perror$(EXEEXT): $(test_perror_OBJECTS) $(test_perror_DEPENDENCIES) $(EXTRA_test_perror_DEPENDENCIES)
+ @rm -f test-perror$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_perror_OBJECTS) $(test_perror_LDADD) $(LIBS)
+
+test-perror2$(EXEEXT): $(test_perror2_OBJECTS) $(test_perror2_DEPENDENCIES) $(EXTRA_test_perror2_DEPENDENCIES)
+ @rm -f test-perror2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_perror2_OBJECTS) $(test_perror2_LDADD) $(LIBS)
+
+test-pipe$(EXEEXT): $(test_pipe_OBJECTS) $(test_pipe_DEPENDENCIES) $(EXTRA_test_pipe_DEPENDENCIES)
+ @rm -f test-pipe$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_pipe_OBJECTS) $(test_pipe_LDADD) $(LIBS)
+
test-quotearg-simple$(EXEEXT): $(test_quotearg_simple_OBJECTS) $(test_quotearg_simple_DEPENDENCIES) $(EXTRA_test_quotearg_simple_DEPENDENCIES)
@rm -f test-quotearg-simple$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_quotearg_simple_OBJECTS) $(test_quotearg_simple_LDADD) $(LIBS)
+test-raise$(EXEEXT): $(test_raise_OBJECTS) $(test_raise_DEPENDENCIES) $(EXTRA_test_raise_DEPENDENCIES)
+ @rm -f test-raise$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_raise_OBJECTS) $(test_raise_LDADD) $(LIBS)
+
test-read-file$(EXEEXT): $(test_read_file_OBJECTS) $(test_read_file_DEPENDENCIES) $(EXTRA_test_read_file_DEPENDENCIES)
@rm -f test-read-file$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_read_file_OBJECTS) $(test_read_file_LDADD) $(LIBS)
@@ -2643,6 +3078,18 @@ test-sameacls$(EXEEXT): $(test_sameacls_OBJECTS) $(test_sameacls_DEPENDENCIES) $
@rm -f test-sameacls$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_sameacls_OBJECTS) $(test_sameacls_LDADD) $(LIBS)
+test-select$(EXEEXT): $(test_select_OBJECTS) $(test_select_DEPENDENCIES) $(EXTRA_test_select_DEPENDENCIES)
+ @rm -f test-select$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_select_OBJECTS) $(test_select_LDADD) $(LIBS)
+
+test-select-fd$(EXEEXT): $(test_select_fd_OBJECTS) $(test_select_fd_DEPENDENCIES) $(EXTRA_test_select_fd_DEPENDENCIES)
+ @rm -f test-select-fd$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_select_fd_OBJECTS) $(test_select_fd_LDADD) $(LIBS)
+
+test-select-stdin$(EXEEXT): $(test_select_stdin_OBJECTS) $(test_select_stdin_DEPENDENCIES) $(EXTRA_test_select_stdin_DEPENDENCIES)
+ @rm -f test-select-stdin$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_select_stdin_OBJECTS) $(test_select_stdin_LDADD) $(LIBS)
+
test-set-mode-acl$(EXEEXT): $(test_set_mode_acl_OBJECTS) $(test_set_mode_acl_DEPENDENCIES) $(EXTRA_test_set_mode_acl_DEPENDENCIES)
@rm -f test-set-mode-acl$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_set_mode_acl_OBJECTS) $(test_set_mode_acl_LDADD) $(LIBS)
@@ -2659,10 +3106,38 @@ test-setlocale2$(EXEEXT): $(test_setlocale2_OBJECTS) $(test_setlocale2_DEPENDENC
@rm -f test-setlocale2$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_setlocale2_OBJECTS) $(test_setlocale2_LDADD) $(LIBS)
+test-setsockopt$(EXEEXT): $(test_setsockopt_OBJECTS) $(test_setsockopt_DEPENDENCIES) $(EXTRA_test_setsockopt_DEPENDENCIES)
+ @rm -f test-setsockopt$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_setsockopt_OBJECTS) $(test_setsockopt_LDADD) $(LIBS)
+
+test-sigaction$(EXEEXT): $(test_sigaction_OBJECTS) $(test_sigaction_DEPENDENCIES) $(EXTRA_test_sigaction_DEPENDENCIES)
+ @rm -f test-sigaction$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_sigaction_OBJECTS) $(test_sigaction_LDADD) $(LIBS)
+
+test-signal-h$(EXEEXT): $(test_signal_h_OBJECTS) $(test_signal_h_DEPENDENCIES) $(EXTRA_test_signal_h_DEPENDENCIES)
+ @rm -f test-signal-h$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_signal_h_OBJECTS) $(test_signal_h_LDADD) $(LIBS)
+
+test-sigprocmask$(EXEEXT): $(test_sigprocmask_OBJECTS) $(test_sigprocmask_DEPENDENCIES) $(EXTRA_test_sigprocmask_DEPENDENCIES)
+ @rm -f test-sigprocmask$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_sigprocmask_OBJECTS) $(test_sigprocmask_LDADD) $(LIBS)
+
+test-sleep$(EXEEXT): $(test_sleep_OBJECTS) $(test_sleep_DEPENDENCIES) $(EXTRA_test_sleep_DEPENDENCIES)
+ @rm -f test-sleep$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_sleep_OBJECTS) $(test_sleep_LDADD) $(LIBS)
+
+test-sockets$(EXEEXT): $(test_sockets_OBJECTS) $(test_sockets_DEPENDENCIES) $(EXTRA_test_sockets_DEPENDENCIES)
+ @rm -f test-sockets$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_sockets_OBJECTS) $(test_sockets_LDADD) $(LIBS)
+
test-stat$(EXEEXT): $(test_stat_OBJECTS) $(test_stat_DEPENDENCIES) $(EXTRA_test_stat_DEPENDENCIES)
@rm -f test-stat$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_stat_OBJECTS) $(test_stat_LDADD) $(LIBS)
+test-stat-time$(EXEEXT): $(test_stat_time_OBJECTS) $(test_stat_time_DEPENDENCIES) $(EXTRA_test_stat_time_DEPENDENCIES)
+ @rm -f test-stat-time$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_stat_time_OBJECTS) $(test_stat_time_LDADD) $(LIBS)
+
test-stdalign$(EXEEXT): $(test_stdalign_OBJECTS) $(test_stdalign_DEPENDENCIES) $(EXTRA_test_stdalign_DEPENDENCIES)
@rm -f test-stdalign$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_stdalign_OBJECTS) $(test_stdalign_LDADD) $(LIBS)
@@ -2691,6 +3166,10 @@ test-strerror$(EXEEXT): $(test_strerror_OBJECTS) $(test_strerror_DEPENDENCIES) $
@rm -f test-strerror$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_strerror_OBJECTS) $(test_strerror_LDADD) $(LIBS)
+test-strerror_r$(EXEEXT): $(test_strerror_r_OBJECTS) $(test_strerror_r_DEPENDENCIES) $(EXTRA_test_strerror_r_DEPENDENCIES)
+ @rm -f test-strerror_r$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_strerror_r_OBJECTS) $(test_strerror_r_LDADD) $(LIBS)
+
test-string$(EXEEXT): $(test_string_OBJECTS) $(test_string_DEPENDENCIES) $(EXTRA_test_string_DEPENDENCIES)
@rm -f test-string$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_string_OBJECTS) $(test_string_LDADD) $(LIBS)
@@ -2703,6 +3182,18 @@ test-symlink$(EXEEXT): $(test_symlink_OBJECTS) $(test_symlink_DEPENDENCIES) $(EX
@rm -f test-symlink$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_symlink_OBJECTS) $(test_symlink_LDADD) $(LIBS)
+test-sys_ioctl$(EXEEXT): $(test_sys_ioctl_OBJECTS) $(test_sys_ioctl_DEPENDENCIES) $(EXTRA_test_sys_ioctl_DEPENDENCIES)
+ @rm -f test-sys_ioctl$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_sys_ioctl_OBJECTS) $(test_sys_ioctl_LDADD) $(LIBS)
+
+test-sys_select$(EXEEXT): $(test_sys_select_OBJECTS) $(test_sys_select_DEPENDENCIES) $(EXTRA_test_sys_select_DEPENDENCIES)
+ @rm -f test-sys_select$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_sys_select_OBJECTS) $(test_sys_select_LDADD) $(LIBS)
+
+test-sys_socket$(EXEEXT): $(test_sys_socket_OBJECTS) $(test_sys_socket_DEPENDENCIES) $(EXTRA_test_sys_socket_DEPENDENCIES)
+ @rm -f test-sys_socket$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_sys_socket_OBJECTS) $(test_sys_socket_LDADD) $(LIBS)
+
test-sys_stat$(EXEEXT): $(test_sys_stat_OBJECTS) $(test_sys_stat_DEPENDENCIES) $(EXTRA_test_sys_stat_DEPENDENCIES)
@rm -f test-sys_stat$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_sys_stat_OBJECTS) $(test_sys_stat_LDADD) $(LIBS)
@@ -2715,6 +3206,10 @@ test-sys_types$(EXEEXT): $(test_sys_types_OBJECTS) $(test_sys_types_DEPENDENCIES
@rm -f test-sys_types$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_sys_types_OBJECTS) $(test_sys_types_LDADD) $(LIBS)
+test-sys_uio$(EXEEXT): $(test_sys_uio_OBJECTS) $(test_sys_uio_DEPENDENCIES) $(EXTRA_test_sys_uio_DEPENDENCIES)
+ @rm -f test-sys_uio$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_sys_uio_OBJECTS) $(test_sys_uio_LDADD) $(LIBS)
+
test-time$(EXEEXT): $(test_time_OBJECTS) $(test_time_DEPENDENCIES) $(EXTRA_test_time_DEPENDENCIES)
@rm -f test-time$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_time_OBJECTS) $(test_time_LDADD) $(LIBS)
@@ -2731,6 +3226,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)
@@ -2761,12 +3260,17 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/accept.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binary-io.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bind.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cloexec.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/closedir.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connect.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfa-match-aux.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirfd.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-hook.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdopen.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fflush.Po@am__quote@ # am--include-marker
@@ -2777,32 +3281,55 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fseeko.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftell.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftello.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftruncate.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcwd-lgpl.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdtablesize.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpagesize.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_pton.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/link.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listen.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localename.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lseek.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nanosleep.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendir.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perror.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/putenv.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raise.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read-file.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readdir.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realloc.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setenv.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setlocale.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setsockopt.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sig-handler.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigaction.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigprocmask.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sleep.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockets.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror_r.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlink.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sys_socket.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-accept.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-alignof.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-alloca-opt.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-arpa_inet.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-binary-io.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-bind.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-btowc.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-ctype.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strcasecmp.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strncasecmp.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-canonicalize-lgpl.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-chdir.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-cloexec.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-close.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-connect.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-copy-acl.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ctype.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dirent.Po@am__quote@ # am--include-marker
@@ -2810,6 +3337,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-environ.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-errno.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fcntl-h.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fcntl.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fdopen.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fflush.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fflush2.Po@am__quote@ # am--include-marker
@@ -2830,6 +3358,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftello.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftello3.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftello4.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftruncate.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fwrite.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fwriting.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getcwd-lgpl.Po@am__quote@ # am--include-marker
@@ -2840,12 +3369,15 @@ distclean-compile:
@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-ignore-value.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-inet_pton.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-intprops.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-inttypes.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ioctl.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isblank.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-link.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
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-localename.Po@am__quote@ # am--include-marker
@@ -2857,20 +3389,36 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbsinit.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-memchr.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-memrchr.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-nanosleep.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-netinet_in.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-nl_langinfo.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-open.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-pathmax.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-perror.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-perror2.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-pipe.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-quotearg-simple.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-raise.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-read-file.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-readlink.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-regex.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-rename.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-rmdir.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sameacls.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-select-fd.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-select-stdin.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-select.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-set-mode-acl.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setenv.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setlocale1.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setlocale2.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setsockopt.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sigaction.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-signal-h.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sigprocmask.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sleep.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sockets.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stat-time.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stat.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdalign.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdbool.Po@am__quote@ # am--include-marker
@@ -2879,15 +3427,21 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdio.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdlib.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strerror.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strerror_r.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-string.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strverscmp.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-symlink.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_ioctl.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_select.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_socket.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_stat.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_time.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_types.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_uio.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-time.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unistd.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unsetenv.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
@@ -2904,22 +3458,20 @@ $(am__depfiles_remade):
am--depfiles: $(am__depfiles_remade)
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(am__set_depbase) && \
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $<; \
-@am__fastdepCC_TRUE@ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \
-@am__fastdepCC_TRUE@ else rm -f $$depbase.Tpo; false; fi
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(am__set_depbase) && \
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $$($(CYGPATH_W) $<); \
-@am__fastdepCC_TRUE@ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \
-@am__fastdepCC_TRUE@ else rm -f $$depbase.Tpo; false; fi
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $$($(CYGPATH_W) $<)
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
# This directory's subdirectories are mostly independent; you can cd
# into them and run 'make' without going through this Makefile.
@@ -3140,7 +3692,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
fi; \
$$success || exit 1
-check-TESTS:
+check-TESTS: $(check_PROGRAMS) $(check_LIBRARIES)
@list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
@@ -3150,7 +3702,7 @@ check-TESTS:
log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
exit $$?;
-recheck: all $(check_LIBRARIES) $(check_PROGRAMS)
+recheck: all $(check_PROGRAMS) $(check_LIBRARIES)
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
@set +e; $(am__set_TESTS_bases); \
bases=`for i in $$bases; do echo $$i; done \
@@ -3161,6 +3713,13 @@ recheck: all $(check_LIBRARIES) $(check_PROGRAMS)
am__force_recheck=am--force-recheck \
TEST_LOGS="$$log_list"; \
exit $$?
+test-accept.log: test-accept$(EXEEXT)
+ @p='test-accept$(EXEEXT)'; \
+ b='test-accept'; \
+ $(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-set-mode-acl.sh.log: test-set-mode-acl.sh
@p='test-set-mode-acl.sh'; \
b='test-set-mode-acl.sh'; \
@@ -3217,6 +3776,13 @@ test-alloca-opt.log: test-alloca-opt$(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-arpa_inet.log: test-arpa_inet$(EXEEXT)
+ @p='test-arpa_inet$(EXEEXT)'; \
+ b='test-arpa_inet'; \
+ $(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-binary-io.sh.log: test-binary-io.sh
@p='test-binary-io.sh'; \
b='test-binary-io.sh'; \
@@ -3224,6 +3790,13 @@ test-binary-io.sh.log: test-binary-io.sh
--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-bind.log: test-bind$(EXEEXT)
+ @p='test-bind$(EXEEXT)'; \
+ b='test-bind'; \
+ $(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-btowc1.sh.log: test-btowc1.sh
@p='test-btowc1.sh'; \
b='test-btowc1.sh'; \
@@ -3266,6 +3839,13 @@ test-chdir.log: test-chdir$(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-cloexec.log: test-cloexec$(EXEEXT)
+ @p='test-cloexec$(EXEEXT)'; \
+ b='test-cloexec'; \
+ $(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-close.log: test-close$(EXEEXT)
@p='test-close$(EXEEXT)'; \
b='test-close'; \
@@ -3273,6 +3853,13 @@ test-close.log: test-close$(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-connect.log: test-connect$(EXEEXT)
+ @p='test-connect$(EXEEXT)'; \
+ b='test-connect'; \
+ $(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-ctype.log: test-ctype$(EXEEXT)
@p='test-ctype$(EXEEXT)'; \
b='test-ctype'; \
@@ -3329,6 +3916,13 @@ test-fcntl-h.log: test-fcntl-h$(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-fcntl.log: test-fcntl$(EXEEXT)
+ @p='test-fcntl$(EXEEXT)'; \
+ b='test-fcntl'; \
+ $(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-fdopen.log: test-fdopen$(EXEEXT)
@p='test-fdopen$(EXEEXT)'; \
b='test-fdopen'; \
@@ -3511,6 +4105,13 @@ test-ftello4.sh.log: test-ftello4.sh
--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-ftruncate.sh.log: test-ftruncate.sh
+ @p='test-ftruncate.sh'; \
+ b='test-ftruncate.sh'; \
+ $(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-fwrite.log: test-fwrite$(EXEEXT)
@p='test-fwrite$(EXEEXT)'; \
b='test-fwrite'; \
@@ -3581,6 +4182,13 @@ test-ignore-value.log: test-ignore-value$(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-inet_pton.log: test-inet_pton$(EXEEXT)
+ @p='test-inet_pton$(EXEEXT)'; \
+ b='test-inet_pton'; \
+ $(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-intprops.log: test-intprops$(EXEEXT)
@p='test-intprops$(EXEEXT)'; \
b='test-intprops'; \
@@ -3595,6 +4203,13 @@ test-inttypes.log: test-inttypes$(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-ioctl.log: test-ioctl$(EXEEXT)
+ @p='test-ioctl$(EXEEXT)'; \
+ b='test-ioctl'; \
+ $(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-isblank.log: test-isblank$(EXEEXT)
@p='test-isblank$(EXEEXT)'; \
b='test-isblank'; \
@@ -3623,6 +4238,13 @@ test-link.log: test-link$(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-listen.log: test-listen$(EXEEXT)
+ @p='test-listen$(EXEEXT)'; \
+ b='test-listen'; \
+ $(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-locale.log: test-locale$(EXEEXT)
@p='test-locale$(EXEEXT)'; \
b='test-locale'; \
@@ -3756,6 +4378,20 @@ test-memrchr.log: test-memrchr$(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-nanosleep.log: test-nanosleep$(EXEEXT)
+ @p='test-nanosleep$(EXEEXT)'; \
+ b='test-nanosleep'; \
+ $(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-netinet_in.log: test-netinet_in$(EXEEXT)
+ @p='test-netinet_in$(EXEEXT)'; \
+ b='test-netinet_in'; \
+ $(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-nl_langinfo.sh.log: test-nl_langinfo.sh
@p='test-nl_langinfo.sh'; \
b='test-nl_langinfo.sh'; \
@@ -3777,6 +4413,27 @@ test-pathmax.log: test-pathmax$(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-perror.sh.log: test-perror.sh
+ @p='test-perror.sh'; \
+ b='test-perror.sh'; \
+ $(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-perror2.log: test-perror2$(EXEEXT)
+ @p='test-perror2$(EXEEXT)'; \
+ b='test-perror2'; \
+ $(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-pipe.log: test-pipe$(EXEEXT)
+ @p='test-pipe$(EXEEXT)'; \
+ b='test-pipe'; \
+ $(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-quotearg-simple.log: test-quotearg-simple$(EXEEXT)
@p='test-quotearg-simple$(EXEEXT)'; \
b='test-quotearg-simple'; \
@@ -3784,6 +4441,13 @@ test-quotearg-simple.log: test-quotearg-simple$(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-raise.log: test-raise$(EXEEXT)
+ @p='test-raise$(EXEEXT)'; \
+ b='test-raise'; \
+ $(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-read-file.log: test-read-file$(EXEEXT)
@p='test-read-file$(EXEEXT)'; \
b='test-read-file'; \
@@ -3819,6 +4483,27 @@ test-rmdir.log: test-rmdir$(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-select.log: test-select$(EXEEXT)
+ @p='test-select$(EXEEXT)'; \
+ b='test-select'; \
+ $(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-select-in.sh.log: test-select-in.sh
+ @p='test-select-in.sh'; \
+ b='test-select-in.sh'; \
+ $(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-select-out.sh.log: test-select-out.sh
+ @p='test-select-out.sh'; \
+ b='test-select-out.sh'; \
+ $(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-setenv.log: test-setenv$(EXEEXT)
@p='test-setenv$(EXEEXT)'; \
b='test-setenv'; \
@@ -3840,6 +4525,48 @@ test-setlocale2.sh.log: test-setlocale2.sh
--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-setsockopt.log: test-setsockopt$(EXEEXT)
+ @p='test-setsockopt$(EXEEXT)'; \
+ b='test-setsockopt'; \
+ $(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-sigaction.log: test-sigaction$(EXEEXT)
+ @p='test-sigaction$(EXEEXT)'; \
+ b='test-sigaction'; \
+ $(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-signal-h.log: test-signal-h$(EXEEXT)
+ @p='test-signal-h$(EXEEXT)'; \
+ b='test-signal-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-sigprocmask.log: test-sigprocmask$(EXEEXT)
+ @p='test-sigprocmask$(EXEEXT)'; \
+ b='test-sigprocmask'; \
+ $(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-sleep.log: test-sleep$(EXEEXT)
+ @p='test-sleep$(EXEEXT)'; \
+ b='test-sleep'; \
+ $(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-sockets.log: test-sockets$(EXEEXT)
+ @p='test-sockets$(EXEEXT)'; \
+ b='test-sockets'; \
+ $(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-stat.log: test-stat$(EXEEXT)
@p='test-stat$(EXEEXT)'; \
b='test-stat'; \
@@ -3847,6 +4574,13 @@ test-stat.log: test-stat$(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-stat-time.log: test-stat-time$(EXEEXT)
+ @p='test-stat-time$(EXEEXT)'; \
+ b='test-stat-time'; \
+ $(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-stdalign.log: test-stdalign$(EXEEXT)
@p='test-stdalign$(EXEEXT)'; \
b='test-stdalign'; \
@@ -3896,6 +4630,13 @@ test-strerror.log: test-strerror$(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-strerror_r.log: test-strerror_r$(EXEEXT)
+ @p='test-strerror_r$(EXEEXT)'; \
+ b='test-strerror_r'; \
+ $(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-string.log: test-string$(EXEEXT)
@p='test-string$(EXEEXT)'; \
b='test-string'; \
@@ -3917,6 +4658,27 @@ test-symlink.log: test-symlink$(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-sys_ioctl.log: test-sys_ioctl$(EXEEXT)
+ @p='test-sys_ioctl$(EXEEXT)'; \
+ b='test-sys_ioctl'; \
+ $(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-sys_select.log: test-sys_select$(EXEEXT)
+ @p='test-sys_select$(EXEEXT)'; \
+ b='test-sys_select'; \
+ $(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-sys_socket.log: test-sys_socket$(EXEEXT)
+ @p='test-sys_socket$(EXEEXT)'; \
+ b='test-sys_socket'; \
+ $(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-sys_stat.log: test-sys_stat$(EXEEXT)
@p='test-sys_stat$(EXEEXT)'; \
b='test-sys_stat'; \
@@ -3938,6 +4700,13 @@ test-sys_types.log: test-sys_types$(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-sys_uio.log: test-sys_uio$(EXEEXT)
+ @p='test-sys_uio$(EXEEXT)'; \
+ b='test-sys_uio'; \
+ $(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-init.sh.log: test-init.sh
@p='test-init.sh'; \
b='test-init.sh'; \
@@ -4086,7 +4855,10 @@ test-xalloc-die.sh.log: test-xalloc-die.sh
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -4142,11 +4914,11 @@ distdir: $(DISTFILES)
fi; \
done
check-am: all-am
- $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES) $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_LIBRARIES)
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-recursive
-all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS)
+all-am: Makefile $(PROGRAMS) $(LIBRARIES) $(HEADERS)
installdirs: installdirs-recursive
installdirs-am:
install: $(BUILT_SOURCES)
@@ -4195,12 +4967,17 @@ clean-am: clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \
mostlyclean-am
distclean: distclean-recursive
- -rm -f ./$(DEPDIR)/binary-io.Po
+ -rm -f ./$(DEPDIR)/accept.Po
+ -rm -f ./$(DEPDIR)/binary-io.Po
+ -rm -f ./$(DEPDIR)/bind.Po
+ -rm -f ./$(DEPDIR)/cloexec.Po
-rm -f ./$(DEPDIR)/close.Po
-rm -f ./$(DEPDIR)/closedir.Po
+ -rm -f ./$(DEPDIR)/connect.Po
-rm -f ./$(DEPDIR)/dfa-match-aux.Po
-rm -f ./$(DEPDIR)/dirfd.Po
-rm -f ./$(DEPDIR)/dup2.Po
+ -rm -f ./$(DEPDIR)/fcntl.Po
-rm -f ./$(DEPDIR)/fd-hook.Po
-rm -f ./$(DEPDIR)/fdopen.Po
-rm -f ./$(DEPDIR)/fflush.Po
@@ -4211,32 +4988,55 @@ distclean: distclean-recursive
-rm -f ./$(DEPDIR)/fseeko.Po
-rm -f ./$(DEPDIR)/ftell.Po
-rm -f ./$(DEPDIR)/ftello.Po
+ -rm -f ./$(DEPDIR)/ftruncate.Po
-rm -f ./$(DEPDIR)/getcwd-lgpl.Po
-rm -f ./$(DEPDIR)/getdtablesize.Po
-rm -f ./$(DEPDIR)/getpagesize.Po
+ -rm -f ./$(DEPDIR)/inet_pton.Po
+ -rm -f ./$(DEPDIR)/ioctl.Po
-rm -f ./$(DEPDIR)/link.Po
+ -rm -f ./$(DEPDIR)/listen.Po
-rm -f ./$(DEPDIR)/localename.Po
-rm -f ./$(DEPDIR)/lseek.Po
+ -rm -f ./$(DEPDIR)/nanosleep.Po
-rm -f ./$(DEPDIR)/open.Po
-rm -f ./$(DEPDIR)/opendir.Po
+ -rm -f ./$(DEPDIR)/perror.Po
+ -rm -f ./$(DEPDIR)/pipe.Po
-rm -f ./$(DEPDIR)/putenv.Po
+ -rm -f ./$(DEPDIR)/raise.Po
-rm -f ./$(DEPDIR)/read-file.Po
-rm -f ./$(DEPDIR)/readdir.Po
-rm -f ./$(DEPDIR)/realloc.Po
+ -rm -f ./$(DEPDIR)/select.Po
-rm -f ./$(DEPDIR)/setenv.Po
-rm -f ./$(DEPDIR)/setlocale.Po
+ -rm -f ./$(DEPDIR)/setsockopt.Po
+ -rm -f ./$(DEPDIR)/sig-handler.Po
+ -rm -f ./$(DEPDIR)/sigaction.Po
+ -rm -f ./$(DEPDIR)/sigprocmask.Po
+ -rm -f ./$(DEPDIR)/sleep.Po
+ -rm -f ./$(DEPDIR)/socket.Po
+ -rm -f ./$(DEPDIR)/sockets.Po
-rm -f ./$(DEPDIR)/strdup.Po
+ -rm -f ./$(DEPDIR)/strerror_r.Po
-rm -f ./$(DEPDIR)/symlink.Po
+ -rm -f ./$(DEPDIR)/sys_socket.Po
+ -rm -f ./$(DEPDIR)/test-accept.Po
-rm -f ./$(DEPDIR)/test-alignof.Po
-rm -f ./$(DEPDIR)/test-alloca-opt.Po
+ -rm -f ./$(DEPDIR)/test-arpa_inet.Po
-rm -f ./$(DEPDIR)/test-binary-io.Po
+ -rm -f ./$(DEPDIR)/test-bind.Po
-rm -f ./$(DEPDIR)/test-btowc.Po
-rm -f ./$(DEPDIR)/test-c-ctype.Po
-rm -f ./$(DEPDIR)/test-c-strcasecmp.Po
-rm -f ./$(DEPDIR)/test-c-strncasecmp.Po
-rm -f ./$(DEPDIR)/test-canonicalize-lgpl.Po
-rm -f ./$(DEPDIR)/test-chdir.Po
+ -rm -f ./$(DEPDIR)/test-cloexec.Po
-rm -f ./$(DEPDIR)/test-close.Po
+ -rm -f ./$(DEPDIR)/test-connect.Po
-rm -f ./$(DEPDIR)/test-copy-acl.Po
-rm -f ./$(DEPDIR)/test-ctype.Po
-rm -f ./$(DEPDIR)/test-dirent.Po
@@ -4244,6 +5044,7 @@ distclean: distclean-recursive
-rm -f ./$(DEPDIR)/test-environ.Po
-rm -f ./$(DEPDIR)/test-errno.Po
-rm -f ./$(DEPDIR)/test-fcntl-h.Po
+ -rm -f ./$(DEPDIR)/test-fcntl.Po
-rm -f ./$(DEPDIR)/test-fdopen.Po
-rm -f ./$(DEPDIR)/test-fflush.Po
-rm -f ./$(DEPDIR)/test-fflush2.Po
@@ -4264,6 +5065,7 @@ distclean: distclean-recursive
-rm -f ./$(DEPDIR)/test-ftello.Po
-rm -f ./$(DEPDIR)/test-ftello3.Po
-rm -f ./$(DEPDIR)/test-ftello4.Po
+ -rm -f ./$(DEPDIR)/test-ftruncate.Po
-rm -f ./$(DEPDIR)/test-fwrite.Po
-rm -f ./$(DEPDIR)/test-fwriting.Po
-rm -f ./$(DEPDIR)/test-getcwd-lgpl.Po
@@ -4274,12 +5076,15 @@ distclean: distclean-recursive
-rm -f ./$(DEPDIR)/test-getprogname.Po
-rm -f ./$(DEPDIR)/test-gettimeofday.Po
-rm -f ./$(DEPDIR)/test-ignore-value.Po
+ -rm -f ./$(DEPDIR)/test-inet_pton.Po
-rm -f ./$(DEPDIR)/test-intprops.Po
-rm -f ./$(DEPDIR)/test-inttypes.Po
+ -rm -f ./$(DEPDIR)/test-ioctl.Po
-rm -f ./$(DEPDIR)/test-isblank.Po
-rm -f ./$(DEPDIR)/test-langinfo.Po
-rm -f ./$(DEPDIR)/test-limits-h.Po
-rm -f ./$(DEPDIR)/test-link.Po
+ -rm -f ./$(DEPDIR)/test-listen.Po
-rm -f ./$(DEPDIR)/test-locale.Po
-rm -f ./$(DEPDIR)/test-localeconv.Po
-rm -f ./$(DEPDIR)/test-localename.Po
@@ -4291,20 +5096,36 @@ distclean: distclean-recursive
-rm -f ./$(DEPDIR)/test-mbsinit.Po
-rm -f ./$(DEPDIR)/test-memchr.Po
-rm -f ./$(DEPDIR)/test-memrchr.Po
+ -rm -f ./$(DEPDIR)/test-nanosleep.Po
+ -rm -f ./$(DEPDIR)/test-netinet_in.Po
-rm -f ./$(DEPDIR)/test-nl_langinfo.Po
-rm -f ./$(DEPDIR)/test-open.Po
-rm -f ./$(DEPDIR)/test-pathmax.Po
+ -rm -f ./$(DEPDIR)/test-perror.Po
+ -rm -f ./$(DEPDIR)/test-perror2.Po
+ -rm -f ./$(DEPDIR)/test-pipe.Po
-rm -f ./$(DEPDIR)/test-quotearg-simple.Po
+ -rm -f ./$(DEPDIR)/test-raise.Po
-rm -f ./$(DEPDIR)/test-read-file.Po
-rm -f ./$(DEPDIR)/test-readlink.Po
-rm -f ./$(DEPDIR)/test-regex.Po
-rm -f ./$(DEPDIR)/test-rename.Po
-rm -f ./$(DEPDIR)/test-rmdir.Po
-rm -f ./$(DEPDIR)/test-sameacls.Po
+ -rm -f ./$(DEPDIR)/test-select-fd.Po
+ -rm -f ./$(DEPDIR)/test-select-stdin.Po
+ -rm -f ./$(DEPDIR)/test-select.Po
-rm -f ./$(DEPDIR)/test-set-mode-acl.Po
-rm -f ./$(DEPDIR)/test-setenv.Po
-rm -f ./$(DEPDIR)/test-setlocale1.Po
-rm -f ./$(DEPDIR)/test-setlocale2.Po
+ -rm -f ./$(DEPDIR)/test-setsockopt.Po
+ -rm -f ./$(DEPDIR)/test-sigaction.Po
+ -rm -f ./$(DEPDIR)/test-signal-h.Po
+ -rm -f ./$(DEPDIR)/test-sigprocmask.Po
+ -rm -f ./$(DEPDIR)/test-sleep.Po
+ -rm -f ./$(DEPDIR)/test-sockets.Po
+ -rm -f ./$(DEPDIR)/test-stat-time.Po
-rm -f ./$(DEPDIR)/test-stat.Po
-rm -f ./$(DEPDIR)/test-stdalign.Po
-rm -f ./$(DEPDIR)/test-stdbool.Po
@@ -4313,15 +5134,21 @@ distclean: distclean-recursive
-rm -f ./$(DEPDIR)/test-stdio.Po
-rm -f ./$(DEPDIR)/test-stdlib.Po
-rm -f ./$(DEPDIR)/test-strerror.Po
+ -rm -f ./$(DEPDIR)/test-strerror_r.Po
-rm -f ./$(DEPDIR)/test-string.Po
-rm -f ./$(DEPDIR)/test-strverscmp.Po
-rm -f ./$(DEPDIR)/test-symlink.Po
+ -rm -f ./$(DEPDIR)/test-sys_ioctl.Po
+ -rm -f ./$(DEPDIR)/test-sys_select.Po
+ -rm -f ./$(DEPDIR)/test-sys_socket.Po
-rm -f ./$(DEPDIR)/test-sys_stat.Po
-rm -f ./$(DEPDIR)/test-sys_time.Po
-rm -f ./$(DEPDIR)/test-sys_types.Po
+ -rm -f ./$(DEPDIR)/test-sys_uio.Po
-rm -f ./$(DEPDIR)/test-time.Po
-rm -f ./$(DEPDIR)/test-unistd.Po
-rm -f ./$(DEPDIR)/test-unsetenv.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
@@ -4375,12 +5202,17 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
- -rm -f ./$(DEPDIR)/binary-io.Po
+ -rm -f ./$(DEPDIR)/accept.Po
+ -rm -f ./$(DEPDIR)/binary-io.Po
+ -rm -f ./$(DEPDIR)/bind.Po
+ -rm -f ./$(DEPDIR)/cloexec.Po
-rm -f ./$(DEPDIR)/close.Po
-rm -f ./$(DEPDIR)/closedir.Po
+ -rm -f ./$(DEPDIR)/connect.Po
-rm -f ./$(DEPDIR)/dfa-match-aux.Po
-rm -f ./$(DEPDIR)/dirfd.Po
-rm -f ./$(DEPDIR)/dup2.Po
+ -rm -f ./$(DEPDIR)/fcntl.Po
-rm -f ./$(DEPDIR)/fd-hook.Po
-rm -f ./$(DEPDIR)/fdopen.Po
-rm -f ./$(DEPDIR)/fflush.Po
@@ -4391,32 +5223,55 @@ maintainer-clean: maintainer-clean-recursive
-rm -f ./$(DEPDIR)/fseeko.Po
-rm -f ./$(DEPDIR)/ftell.Po
-rm -f ./$(DEPDIR)/ftello.Po
+ -rm -f ./$(DEPDIR)/ftruncate.Po
-rm -f ./$(DEPDIR)/getcwd-lgpl.Po
-rm -f ./$(DEPDIR)/getdtablesize.Po
-rm -f ./$(DEPDIR)/getpagesize.Po
+ -rm -f ./$(DEPDIR)/inet_pton.Po
+ -rm -f ./$(DEPDIR)/ioctl.Po
-rm -f ./$(DEPDIR)/link.Po
+ -rm -f ./$(DEPDIR)/listen.Po
-rm -f ./$(DEPDIR)/localename.Po
-rm -f ./$(DEPDIR)/lseek.Po
+ -rm -f ./$(DEPDIR)/nanosleep.Po
-rm -f ./$(DEPDIR)/open.Po
-rm -f ./$(DEPDIR)/opendir.Po
+ -rm -f ./$(DEPDIR)/perror.Po
+ -rm -f ./$(DEPDIR)/pipe.Po
-rm -f ./$(DEPDIR)/putenv.Po
+ -rm -f ./$(DEPDIR)/raise.Po
-rm -f ./$(DEPDIR)/read-file.Po
-rm -f ./$(DEPDIR)/readdir.Po
-rm -f ./$(DEPDIR)/realloc.Po
+ -rm -f ./$(DEPDIR)/select.Po
-rm -f ./$(DEPDIR)/setenv.Po
-rm -f ./$(DEPDIR)/setlocale.Po
+ -rm -f ./$(DEPDIR)/setsockopt.Po
+ -rm -f ./$(DEPDIR)/sig-handler.Po
+ -rm -f ./$(DEPDIR)/sigaction.Po
+ -rm -f ./$(DEPDIR)/sigprocmask.Po
+ -rm -f ./$(DEPDIR)/sleep.Po
+ -rm -f ./$(DEPDIR)/socket.Po
+ -rm -f ./$(DEPDIR)/sockets.Po
-rm -f ./$(DEPDIR)/strdup.Po
+ -rm -f ./$(DEPDIR)/strerror_r.Po
-rm -f ./$(DEPDIR)/symlink.Po
+ -rm -f ./$(DEPDIR)/sys_socket.Po
+ -rm -f ./$(DEPDIR)/test-accept.Po
-rm -f ./$(DEPDIR)/test-alignof.Po
-rm -f ./$(DEPDIR)/test-alloca-opt.Po
+ -rm -f ./$(DEPDIR)/test-arpa_inet.Po
-rm -f ./$(DEPDIR)/test-binary-io.Po
+ -rm -f ./$(DEPDIR)/test-bind.Po
-rm -f ./$(DEPDIR)/test-btowc.Po
-rm -f ./$(DEPDIR)/test-c-ctype.Po
-rm -f ./$(DEPDIR)/test-c-strcasecmp.Po
-rm -f ./$(DEPDIR)/test-c-strncasecmp.Po
-rm -f ./$(DEPDIR)/test-canonicalize-lgpl.Po
-rm -f ./$(DEPDIR)/test-chdir.Po
+ -rm -f ./$(DEPDIR)/test-cloexec.Po
-rm -f ./$(DEPDIR)/test-close.Po
+ -rm -f ./$(DEPDIR)/test-connect.Po
-rm -f ./$(DEPDIR)/test-copy-acl.Po
-rm -f ./$(DEPDIR)/test-ctype.Po
-rm -f ./$(DEPDIR)/test-dirent.Po
@@ -4424,6 +5279,7 @@ maintainer-clean: maintainer-clean-recursive
-rm -f ./$(DEPDIR)/test-environ.Po
-rm -f ./$(DEPDIR)/test-errno.Po
-rm -f ./$(DEPDIR)/test-fcntl-h.Po
+ -rm -f ./$(DEPDIR)/test-fcntl.Po
-rm -f ./$(DEPDIR)/test-fdopen.Po
-rm -f ./$(DEPDIR)/test-fflush.Po
-rm -f ./$(DEPDIR)/test-fflush2.Po
@@ -4444,6 +5300,7 @@ maintainer-clean: maintainer-clean-recursive
-rm -f ./$(DEPDIR)/test-ftello.Po
-rm -f ./$(DEPDIR)/test-ftello3.Po
-rm -f ./$(DEPDIR)/test-ftello4.Po
+ -rm -f ./$(DEPDIR)/test-ftruncate.Po
-rm -f ./$(DEPDIR)/test-fwrite.Po
-rm -f ./$(DEPDIR)/test-fwriting.Po
-rm -f ./$(DEPDIR)/test-getcwd-lgpl.Po
@@ -4454,12 +5311,15 @@ maintainer-clean: maintainer-clean-recursive
-rm -f ./$(DEPDIR)/test-getprogname.Po
-rm -f ./$(DEPDIR)/test-gettimeofday.Po
-rm -f ./$(DEPDIR)/test-ignore-value.Po
+ -rm -f ./$(DEPDIR)/test-inet_pton.Po
-rm -f ./$(DEPDIR)/test-intprops.Po
-rm -f ./$(DEPDIR)/test-inttypes.Po
+ -rm -f ./$(DEPDIR)/test-ioctl.Po
-rm -f ./$(DEPDIR)/test-isblank.Po
-rm -f ./$(DEPDIR)/test-langinfo.Po
-rm -f ./$(DEPDIR)/test-limits-h.Po
-rm -f ./$(DEPDIR)/test-link.Po
+ -rm -f ./$(DEPDIR)/test-listen.Po
-rm -f ./$(DEPDIR)/test-locale.Po
-rm -f ./$(DEPDIR)/test-localeconv.Po
-rm -f ./$(DEPDIR)/test-localename.Po
@@ -4471,20 +5331,36 @@ maintainer-clean: maintainer-clean-recursive
-rm -f ./$(DEPDIR)/test-mbsinit.Po
-rm -f ./$(DEPDIR)/test-memchr.Po
-rm -f ./$(DEPDIR)/test-memrchr.Po
+ -rm -f ./$(DEPDIR)/test-nanosleep.Po
+ -rm -f ./$(DEPDIR)/test-netinet_in.Po
-rm -f ./$(DEPDIR)/test-nl_langinfo.Po
-rm -f ./$(DEPDIR)/test-open.Po
-rm -f ./$(DEPDIR)/test-pathmax.Po
+ -rm -f ./$(DEPDIR)/test-perror.Po
+ -rm -f ./$(DEPDIR)/test-perror2.Po
+ -rm -f ./$(DEPDIR)/test-pipe.Po
-rm -f ./$(DEPDIR)/test-quotearg-simple.Po
+ -rm -f ./$(DEPDIR)/test-raise.Po
-rm -f ./$(DEPDIR)/test-read-file.Po
-rm -f ./$(DEPDIR)/test-readlink.Po
-rm -f ./$(DEPDIR)/test-regex.Po
-rm -f ./$(DEPDIR)/test-rename.Po
-rm -f ./$(DEPDIR)/test-rmdir.Po
-rm -f ./$(DEPDIR)/test-sameacls.Po
+ -rm -f ./$(DEPDIR)/test-select-fd.Po
+ -rm -f ./$(DEPDIR)/test-select-stdin.Po
+ -rm -f ./$(DEPDIR)/test-select.Po
-rm -f ./$(DEPDIR)/test-set-mode-acl.Po
-rm -f ./$(DEPDIR)/test-setenv.Po
-rm -f ./$(DEPDIR)/test-setlocale1.Po
-rm -f ./$(DEPDIR)/test-setlocale2.Po
+ -rm -f ./$(DEPDIR)/test-setsockopt.Po
+ -rm -f ./$(DEPDIR)/test-sigaction.Po
+ -rm -f ./$(DEPDIR)/test-signal-h.Po
+ -rm -f ./$(DEPDIR)/test-sigprocmask.Po
+ -rm -f ./$(DEPDIR)/test-sleep.Po
+ -rm -f ./$(DEPDIR)/test-sockets.Po
+ -rm -f ./$(DEPDIR)/test-stat-time.Po
-rm -f ./$(DEPDIR)/test-stat.Po
-rm -f ./$(DEPDIR)/test-stdalign.Po
-rm -f ./$(DEPDIR)/test-stdbool.Po
@@ -4493,15 +5369,21 @@ maintainer-clean: maintainer-clean-recursive
-rm -f ./$(DEPDIR)/test-stdio.Po
-rm -f ./$(DEPDIR)/test-stdlib.Po
-rm -f ./$(DEPDIR)/test-strerror.Po
+ -rm -f ./$(DEPDIR)/test-strerror_r.Po
-rm -f ./$(DEPDIR)/test-string.Po
-rm -f ./$(DEPDIR)/test-strverscmp.Po
-rm -f ./$(DEPDIR)/test-symlink.Po
+ -rm -f ./$(DEPDIR)/test-sys_ioctl.Po
+ -rm -f ./$(DEPDIR)/test-sys_select.Po
+ -rm -f ./$(DEPDIR)/test-sys_socket.Po
-rm -f ./$(DEPDIR)/test-sys_stat.Po
-rm -f ./$(DEPDIR)/test-sys_time.Po
-rm -f ./$(DEPDIR)/test-sys_types.Po
+ -rm -f ./$(DEPDIR)/test-sys_uio.Po
-rm -f ./$(DEPDIR)/test-time.Po
-rm -f ./$(DEPDIR)/test-unistd.Po
-rm -f ./$(DEPDIR)/test-unsetenv.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
@@ -4550,6 +5432,32 @@ uninstall-am:
.PRECIOUS: Makefile
+# We need the following in order to create <arpa/inet.h> when the system
+# doesn't have one.
+arpa/inet.h: arpa_inet.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_at)$(MKDIR_P) arpa
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \
+ -e 's|@''NEXT_ARPA_INET_H''@|$(NEXT_ARPA_INET_H)|g' \
+ -e 's|@''HAVE_ARPA_INET_H''@|$(HAVE_ARPA_INET_H)|g' \
+ -e 's/@''GNULIB_INET_NTOP''@/$(GNULIB_INET_NTOP)/g' \
+ -e 's/@''GNULIB_INET_PTON''@/$(GNULIB_INET_PTON)/g' \
+ -e 's|@''HAVE_DECL_INET_NTOP''@|$(HAVE_DECL_INET_NTOP)|g' \
+ -e 's|@''HAVE_DECL_INET_PTON''@|$(HAVE_DECL_INET_PTON)|g' \
+ -e 's|@''REPLACE_INET_NTOP''@|$(REPLACE_INET_NTOP)|g' \
+ -e 's|@''REPLACE_INET_PTON''@|$(REPLACE_INET_PTON)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/arpa_inet.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
# We need the following in order to create <dirent.h> when the system
# doesn't have one that works with the given compiler.
dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
@@ -4624,41 +5532,160 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
< $(srcdir)/inttypes.in.h; \
} > $@-t && \
mv $@-t $@
-# 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
+
+# We need the following in order to create <netinet/in.h> when the system
+# doesn't have one.
+@GL_GENERATE_NETINET_IN_H_TRUE@netinet/in.h: netinet_in.in.h $(top_builddir)/config.status
+@GL_GENERATE_NETINET_IN_H_TRUE@ $(AM_V_at)$(MKDIR_P) netinet
+@GL_GENERATE_NETINET_IN_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
+@GL_GENERATE_NETINET_IN_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+@GL_GENERATE_NETINET_IN_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+@GL_GENERATE_NETINET_IN_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+@GL_GENERATE_NETINET_IN_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+@GL_GENERATE_NETINET_IN_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+@GL_GENERATE_NETINET_IN_H_TRUE@ -e 's|@''NEXT_NETINET_IN_H''@|$(NEXT_NETINET_IN_H)|g' \
+@GL_GENERATE_NETINET_IN_H_TRUE@ -e 's|@''HAVE_NETINET_IN_H''@|$(HAVE_NETINET_IN_H)|g' \
+@GL_GENERATE_NETINET_IN_H_TRUE@ < $(srcdir)/netinet_in.in.h; \
+@GL_GENERATE_NETINET_IN_H_TRUE@ } > $@-t && \
+@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 $@
+
+# We need the following in order to create <signal.h> when the system
+# doesn't have a complete one.
+signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/GL_ARG_NONNULL/,$$p' \
- < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \
- > $@-t && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \
+ -e 's/@''GNULIB_PTHREAD_SIGMASK''@/$(GNULIB_PTHREAD_SIGMASK)/g' \
+ -e 's/@''GNULIB_RAISE''@/$(GNULIB_RAISE)/g' \
+ -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \
+ -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \
+ -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \
+ -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \
+ -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \
+ -e 's|@''HAVE_RAISE''@|$(HAVE_RAISE)|g' \
+ -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \
+ -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \
+ -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \
+ -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \
+ -e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \
+ -e 's|@''HAVE_SIGHANDLER_T''@|$(HAVE_SIGHANDLER_T)|g' \
+ -e 's|@''REPLACE_PTHREAD_SIGMASK''@|$(REPLACE_PTHREAD_SIGMASK)|g' \
+ -e 's|@''REPLACE_RAISE''@|$(REPLACE_RAISE)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/signal.in.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
+
+# We need the following in order to create <sys/ioctl.h> when the system
+# does not have a complete one.
+sys/ioctl.h: sys_ioctl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
+ $(AM_V_at)$(MKDIR_P) sys
$(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/_GL_CXXDEFS/,$$p' \
- < $(top_srcdir)/build-aux/snippet/c++defs.h \
- > $@-t && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''HAVE_SYS_IOCTL_H''@|$(HAVE_SYS_IOCTL_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_SYS_IOCTL_H''@|$(NEXT_SYS_IOCTL_H)|g' \
+ -e 's/@''GNULIB_IOCTL''@/$(GNULIB_IOCTL)/g' \
+ -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H)|g' \
+ -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \
+ -e 's|@''REPLACE_IOCTL''@|$(REPLACE_IOCTL)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/sys_ioctl.in.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
+
+# We need the following in order to create <sys/select.h> when the system
+# doesn't have one that works with the given compiler.
+sys/select.h: sys_select.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
+ $(AM_V_at)$(MKDIR_P) sys
$(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \
- < $(top_srcdir)/build-aux/snippet/unused-parameter.h \
- > $@-t && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_SYS_SELECT_H''@|$(NEXT_SYS_SELECT_H)|g' \
+ -e 's|@''HAVE_SYS_SELECT_H''@|$(HAVE_SYS_SELECT_H)|g' \
+ -e 's/@''GNULIB_PSELECT''@/$(GNULIB_PSELECT)/g' \
+ -e 's/@''GNULIB_SELECT''@/$(GNULIB_SELECT)/g' \
+ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
+ -e 's|@''HAVE_PSELECT''@|$(HAVE_PSELECT)|g' \
+ -e 's|@''REPLACE_PSELECT''@|$(REPLACE_PSELECT)|g' \
+ -e 's|@''REPLACE_SELECT''@|$(REPLACE_SELECT)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/sys_select.in.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
+
+# We need the following in order to create <sys/socket.h> when the system
+# doesn't have one that works with the given compiler.
+sys/socket.h: sys_socket.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_at)$(MKDIR_P) sys
$(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/^.ifndef/,$$p' \
- < $(top_srcdir)/build-aux/snippet/warn-on-use.h \
- > $@-t && \
- mv $@-t $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \
+ -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \
+ -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
+ -e 's/@''GNULIB_SOCKET''@/$(GNULIB_SOCKET)/g' \
+ -e 's/@''GNULIB_CONNECT''@/$(GNULIB_CONNECT)/g' \
+ -e 's/@''GNULIB_ACCEPT''@/$(GNULIB_ACCEPT)/g' \
+ -e 's/@''GNULIB_BIND''@/$(GNULIB_BIND)/g' \
+ -e 's/@''GNULIB_GETPEERNAME''@/$(GNULIB_GETPEERNAME)/g' \
+ -e 's/@''GNULIB_GETSOCKNAME''@/$(GNULIB_GETSOCKNAME)/g' \
+ -e 's/@''GNULIB_GETSOCKOPT''@/$(GNULIB_GETSOCKOPT)/g' \
+ -e 's/@''GNULIB_LISTEN''@/$(GNULIB_LISTEN)/g' \
+ -e 's/@''GNULIB_RECV''@/$(GNULIB_RECV)/g' \
+ -e 's/@''GNULIB_SEND''@/$(GNULIB_SEND)/g' \
+ -e 's/@''GNULIB_RECVFROM''@/$(GNULIB_RECVFROM)/g' \
+ -e 's/@''GNULIB_SENDTO''@/$(GNULIB_SENDTO)/g' \
+ -e 's/@''GNULIB_SETSOCKOPT''@/$(GNULIB_SETSOCKOPT)/g' \
+ -e 's/@''GNULIB_SHUTDOWN''@/$(GNULIB_SHUTDOWN)/g' \
+ -e 's/@''GNULIB_ACCEPT4''@/$(GNULIB_ACCEPT4)/g' \
+ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
+ -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \
+ -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \
+ -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY''@|$(HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY)|g' \
+ -e 's|@''HAVE_SA_FAMILY_T''@|$(HAVE_SA_FAMILY_T)|g' \
+ -e 's|@''HAVE_ACCEPT4''@|$(HAVE_ACCEPT4)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/sys_socket.in.h; \
+ } > $@-t && \
+ mv -f $@-t $@
+
+# We need the following in order to create <sys/uio.h> when the system
+# doesn't have one that works with the given compiler.
+sys/uio.h: sys_uio.in.h $(top_builddir)/config.status
+ $(AM_V_at)$(MKDIR_P) sys
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_SYS_UIO_H''@|$(NEXT_SYS_UIO_H)|g' \
+ -e 's|@''HAVE_SYS_UIO_H''@|$(HAVE_SYS_UIO_H)|g' \
+ < $(srcdir)/sys_uio.in.h; \
+ } > $@-t && \
+ mv -f $@-t $@
# Clean up after Solaris cc.
clean-local:
diff --git a/build-aux/snippet/_Noreturn.h b/gnulib-tests/_Noreturn.h
index c44ad89..c44ad89 100644
--- a/build-aux/snippet/_Noreturn.h
+++ b/gnulib-tests/_Noreturn.h
diff --git a/gnulib-tests/accept.c b/gnulib-tests/accept.c
new file mode 100644
index 0000000..9659c71
--- /dev/null
+++ b/gnulib-tests/accept.c
@@ -0,0 +1,52 @@
+/* accept.c --- wrappers for Windows accept function
+
+ Copyright (C) 2008-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Paolo Bonzini */
+
+#include <config.h>
+
+#define WIN32_LEAN_AND_MEAN
+/* Get winsock2.h. */
+#include <sys/socket.h>
+
+/* Get set_winsock_errno, FD_TO_SOCKET etc. */
+#include "w32sock.h"
+
+#undef accept
+
+int
+rpl_accept (int fd, struct sockaddr *addr, socklen_t *addrlen)
+{
+ SOCKET sock = FD_TO_SOCKET (fd);
+
+ if (sock == INVALID_SOCKET)
+ {
+ errno = EBADF;
+ return -1;
+ }
+ else
+ {
+ SOCKET fh = accept (sock, addr, addrlen);
+ if (fh == INVALID_SOCKET)
+ {
+ set_winsock_errno ();
+ return -1;
+ }
+ else
+ return SOCKET_TO_FD (fh);
+ }
+}
diff --git a/build-aux/snippet/arg-nonnull.h b/gnulib-tests/arg-nonnull.h
index 1e62cc8..5f03408 100644
--- a/build-aux/snippet/arg-nonnull.h
+++ b/gnulib-tests/arg-nonnull.h
@@ -1,5 +1,5 @@
/* A C macro for declaring that specific arguments must not be NULL.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://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.
diff --git a/gnulib-tests/arpa_inet.in.h b/gnulib-tests/arpa_inet.in.h
new file mode 100644
index 0000000..3253d79
--- /dev/null
+++ b/gnulib-tests/arpa_inet.in.h
@@ -0,0 +1,140 @@
+/* A GNU-like <arpa/inet.h>.
+
+ Copyright (C) 2005-2006, 2008-2018 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, 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 <https://www.gnu.org/licenses/>. */
+
+#ifndef _@GUARD_PREFIX@_ARPA_INET_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+#if @HAVE_FEATURES_H@
+# include <features.h> /* for __GLIBC__ */
+#endif
+
+/* Gnulib's sys/socket.h is responsible for defining socklen_t (used below) and
+ for pulling in winsock2.h etc. under MinGW.
+ But avoid namespace pollution on glibc systems. */
+#ifndef __GLIBC__
+# include <sys/socket.h>
+#endif
+
+/* On NonStop Kernel, inet_ntop and inet_pton are declared in <netdb.h>.
+ But avoid namespace pollution on glibc systems. */
+#if defined __TANDEM && !defined __GLIBC__
+# include <netdb.h>
+#endif
+
+#if @HAVE_ARPA_INET_H@
+
+/* The include_next requires a split double-inclusion guard. */
+# @INCLUDE_NEXT@ @NEXT_ARPA_INET_H@
+
+#endif
+
+#ifndef _@GUARD_PREFIX@_ARPA_INET_H
+#define _@GUARD_PREFIX@_ARPA_INET_H
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+
+#if @GNULIB_INET_NTOP@
+/* Converts an internet address from internal format to a printable,
+ presentable format.
+ AF is an internet address family, such as AF_INET or AF_INET6.
+ SRC points to a 'struct in_addr' (for AF_INET) or 'struct in6_addr'
+ (for AF_INET6).
+ DST points to a buffer having room for CNT bytes.
+ The printable representation of the address (in numeric form, not
+ surrounded by [...], no reverse DNS is done) is placed in DST, and
+ DST is returned. If an error occurs, the return value is NULL and
+ errno is set. If CNT bytes are not sufficient to hold the result,
+ the return value is NULL and errno is set to ENOSPC. A good value
+ for CNT is 46.
+
+ For more details, see the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/inet_ntop.html>. */
+# if @REPLACE_INET_NTOP@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef inet_ntop
+# define inet_ntop rpl_inet_ntop
+# endif
+_GL_FUNCDECL_RPL (inet_ntop, const char *,
+ (int af, const void *restrict src,
+ char *restrict dst, socklen_t cnt)
+ _GL_ARG_NONNULL ((2, 3)));
+_GL_CXXALIAS_RPL (inet_ntop, const char *,
+ (int af, const void *restrict src,
+ char *restrict dst, socklen_t cnt));
+# else
+# if !@HAVE_DECL_INET_NTOP@
+_GL_FUNCDECL_SYS (inet_ntop, const char *,
+ (int af, const void *restrict src,
+ char *restrict dst, socklen_t cnt)
+ _GL_ARG_NONNULL ((2, 3)));
+# endif
+/* Need to cast, because on NonStop Kernel, the fourth parameter is
+ size_t cnt. */
+_GL_CXXALIAS_SYS_CAST (inet_ntop, const char *,
+ (int af, const void *restrict src,
+ char *restrict dst, socklen_t cnt));
+# endif
+_GL_CXXALIASWARN (inet_ntop);
+#elif defined GNULIB_POSIXCHECK
+# undef inet_ntop
+# if HAVE_RAW_DECL_INET_NTOP
+_GL_WARN_ON_USE (inet_ntop, "inet_ntop is unportable - "
+ "use gnulib module inet_ntop for portability");
+# endif
+#endif
+
+#if @GNULIB_INET_PTON@
+# if @REPLACE_INET_PTON@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef inet_pton
+# define inet_pton rpl_inet_pton
+# endif
+_GL_FUNCDECL_RPL (inet_pton, int,
+ (int af, const char *restrict src, void *restrict dst)
+ _GL_ARG_NONNULL ((2, 3)));
+_GL_CXXALIAS_RPL (inet_pton, int,
+ (int af, const char *restrict src, void *restrict dst));
+# else
+# if !@HAVE_DECL_INET_PTON@
+_GL_FUNCDECL_SYS (inet_pton, int,
+ (int af, const char *restrict src, void *restrict dst)
+ _GL_ARG_NONNULL ((2, 3)));
+# endif
+_GL_CXXALIAS_SYS (inet_pton, int,
+ (int af, const char *restrict src, void *restrict dst));
+# endif
+_GL_CXXALIASWARN (inet_pton);
+#elif defined GNULIB_POSIXCHECK
+# undef inet_pton
+# if HAVE_RAW_DECL_INET_PTON
+_GL_WARN_ON_USE (inet_pton, "inet_pton is unportable - "
+ "use gnulib module inet_pton for portability");
+# endif
+#endif
+
+
+#endif /* _@GUARD_PREFIX@_ARPA_INET_H */
+#endif /* _@GUARD_PREFIX@_ARPA_INET_H */
diff --git a/gnulib-tests/binary-io.c b/gnulib-tests/binary-io.c
index d828bcd..f9cc4dd 100644
--- a/gnulib-tests/binary-io.c
+++ b/gnulib-tests/binary-io.c
@@ -1,4 +1,37 @@
+/* Binary mode I/O.
+ Copyright 2017-2018 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 <https://www.gnu.org/licenses/>. */
+
#include <config.h>
+
#define BINARY_IO_INLINE _GL_EXTERN_INLINE
#include "binary-io.h"
-typedef int dummy;
+
+#if defined __DJGPP__ || defined __EMX__
+# include <errno.h>
+# include <unistd.h>
+
+int
+__gl_setmode_check (int fd)
+{
+ if (isatty (fd))
+ {
+ errno = EINVAL;
+ return -1;
+ }
+ else
+ return 0;
+}
+#endif
diff --git a/gnulib-tests/binary-io.h b/gnulib-tests/binary-io.h
index f766439..1f21fc0 100644
--- a/gnulib-tests/binary-io.h
+++ b/gnulib-tests/binary-io.h
@@ -1,5 +1,5 @@
/* Binary mode I/O.
- Copyright (C) 2001, 2003, 2005, 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2005, 2008-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef _BINARY_H
#define _BINARY_H
@@ -33,15 +33,12 @@ _GL_INLINE_HEADER_BEGIN
# define BINARY_IO_INLINE _GL_INLINE
#endif
-/* set_binary_mode (fd, mode)
- sets the binary/text I/O mode of file descriptor fd to the given mode
- (must be O_BINARY or O_TEXT) and returns the previous mode. */
#if O_BINARY
# if defined __EMX__ || defined __DJGPP__ || defined __CYGWIN__
# include <io.h> /* declares setmode() */
-# define set_binary_mode setmode
+# define __gl_setmode setmode
# else
-# define set_binary_mode _setmode
+# define __gl_setmode _setmode
# undef fileno
# define fileno _fileno
# endif
@@ -50,26 +47,35 @@ _GL_INLINE_HEADER_BEGIN
/* Use a function rather than a macro, to avoid gcc warnings
"warning: statement with no effect". */
BINARY_IO_INLINE int
-set_binary_mode (int fd, int mode)
+__gl_setmode (int fd _GL_UNUSED, int mode _GL_UNUSED)
{
- (void) fd;
- (void) mode;
return O_BINARY;
}
#endif
-/* SET_BINARY (fd);
- changes the file descriptor fd to perform binary I/O. */
#if defined __DJGPP__ || defined __EMX__
-# include <unistd.h> /* declares isatty() */
- /* Avoid putting stdin/stdout in binary mode if it is connected to
- the console, because that would make it impossible for the user
- to interrupt the program through Ctrl-C or Ctrl-Break. */
-# define SET_BINARY(fd) ((void) (!isatty (fd) ? (set_binary_mode (fd, O_BINARY), 0) : 0))
+extern int __gl_setmode_check (int);
#else
-# define SET_BINARY(fd) ((void) set_binary_mode (fd, O_BINARY))
+BINARY_IO_INLINE int
+__gl_setmode_check (int fd _GL_UNUSED) { return 0; }
#endif
+/* Set FD's mode to MODE, which should be either O_TEXT or O_BINARY.
+ Return the old mode if successful, -1 (setting errno) on failure.
+ Ordinarily this function would be called 'setmode', since that is
+ its name on MS-Windows, but it is called 'set_binary_mode' here
+ to avoid colliding with a BSD function of another name. */
+
+BINARY_IO_INLINE int
+set_binary_mode (int fd, int mode)
+{
+ int r = __gl_setmode_check (fd);
+ return r != 0 ? r : __gl_setmode (fd, mode);
+}
+
+/* This macro is obsolescent. */
+#define SET_BINARY(fd) ((void) set_binary_mode (fd, O_BINARY))
+
_GL_INLINE_HEADER_END
#endif /* _BINARY_H */
diff --git a/gnulib-tests/bind.c b/gnulib-tests/bind.c
new file mode 100644
index 0000000..5c3556d
--- /dev/null
+++ b/gnulib-tests/bind.c
@@ -0,0 +1,49 @@
+/* bind.c --- wrappers for Windows bind function
+
+ Copyright (C) 2008-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Paolo Bonzini */
+
+#include <config.h>
+
+#define WIN32_LEAN_AND_MEAN
+/* Get winsock2.h. */
+#include <sys/socket.h>
+
+/* Get set_winsock_errno, FD_TO_SOCKET etc. */
+#include "w32sock.h"
+
+#undef bind
+
+int
+rpl_bind (int fd, const struct sockaddr *sockaddr, socklen_t len)
+{
+ SOCKET sock = FD_TO_SOCKET (fd);
+
+ if (sock == INVALID_SOCKET)
+ {
+ errno = EBADF;
+ return -1;
+ }
+ else
+ {
+ int r = bind (sock, sockaddr, len);
+ if (r < 0)
+ set_winsock_errno ();
+
+ return r;
+ }
+}
diff --git a/build-aux/snippet/c++defs.h b/gnulib-tests/c++defs.h
index f03f359..72ff1ff 100644
--- a/build-aux/snippet/c++defs.h
+++ b/gnulib-tests/c++defs.h
@@ -1,5 +1,5 @@
/* C++ compatible function declaration macros.
- Copyright (C) 2010-2017 Free Software Foundation, Inc.
+ Copyright (C) 2010-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef _GL_CXXDEFS_H
#define _GL_CXXDEFS_H
@@ -266,7 +266,7 @@
_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>,
+/* To work around GCC bug <https://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) \
@@ -294,7 +294,7 @@
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>,
+/* To work around GCC bug <https://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) \
diff --git a/gnulib-tests/cloexec.c b/gnulib-tests/cloexec.c
new file mode 100644
index 0000000..238ab18
--- /dev/null
+++ b/gnulib-tests/cloexec.c
@@ -0,0 +1,83 @@
+/* cloexec.c - set or clear the close-on-exec descriptor flag
+
+ Copyright (C) 1991, 2004-2006, 2009-2018 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 <https://www.gnu.org/licenses/>.
+
+ The code is taken from glibc/manual/llio.texi */
+
+#include <config.h>
+
+#include "cloexec.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+/* Set the 'FD_CLOEXEC' flag of DESC if VALUE is true,
+ or clear the flag if VALUE is false.
+ Return 0 on success, or -1 on error with 'errno' set.
+
+ Note that on MingW, this function does NOT protect DESC from being
+ inherited into spawned children. Instead, either use dup_cloexec
+ followed by closing the original DESC, or use interfaces such as
+ open or pipe2 that accept flags like O_CLOEXEC to create DESC
+ non-inheritable in the first place. */
+
+int
+set_cloexec_flag (int desc, bool value)
+{
+#ifdef F_SETFD
+
+ int flags = fcntl (desc, F_GETFD, 0);
+
+ if (0 <= flags)
+ {
+ int newflags = (value ? flags | FD_CLOEXEC : flags & ~FD_CLOEXEC);
+
+ if (flags == newflags
+ || fcntl (desc, F_SETFD, newflags) != -1)
+ return 0;
+ }
+
+ return -1;
+
+#else /* !F_SETFD */
+
+ /* Use dup2 to reject invalid file descriptors; the cloexec flag
+ will be unaffected. */
+ if (desc < 0)
+ {
+ errno = EBADF;
+ return -1;
+ }
+ if (dup2 (desc, desc) < 0)
+ /* errno is EBADF here. */
+ return -1;
+
+ /* There is nothing we can do on this kind of platform. Punt. */
+ return 0;
+#endif /* !F_SETFD */
+}
+
+
+/* Duplicates a file handle FD, while marking the copy to be closed
+ prior to exec or spawn. Returns -1 and sets errno if FD could not
+ be duplicated. */
+
+int
+dup_cloexec (int fd)
+{
+ return fcntl (fd, F_DUPFD_CLOEXEC, 0);
+}
diff --git a/gnulib-tests/cloexec.h b/gnulib-tests/cloexec.h
new file mode 100644
index 0000000..5902805
--- /dev/null
+++ b/gnulib-tests/cloexec.h
@@ -0,0 +1,38 @@
+/* cloexec.c - set or clear the close-on-exec descriptor flag
+
+ Copyright (C) 2004, 2009-2018 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 <https://www.gnu.org/licenses/>.
+
+*/
+
+#include <stdbool.h>
+
+/* Set the 'FD_CLOEXEC' flag of DESC if VALUE is true,
+ or clear the flag if VALUE is false.
+ Return 0 on success, or -1 on error with 'errno' set.
+
+ Note that on MingW, this function does NOT protect DESC from being
+ inherited into spawned children. Instead, either use dup_cloexec
+ followed by closing the original DESC, or use interfaces such as
+ open or pipe2 that accept flags like O_CLOEXEC to create DESC
+ non-inheritable in the first place. */
+
+int set_cloexec_flag (int desc, bool value);
+
+/* Duplicates a file handle FD, while marking the copy to be closed
+ prior to exec or spawn. Returns -1 and sets errno if FD could not
+ be duplicated. */
+
+int dup_cloexec (int fd);
diff --git a/gnulib-tests/close.c b/gnulib-tests/close.c
index 3e45187..01c326a 100644
--- a/gnulib-tests/close.c
+++ b/gnulib-tests/close.c
@@ -1,5 +1,5 @@
/* close replacement.
- Copyright (C) 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@@ -22,7 +22,9 @@
#include <errno.h>
#include "fd-hook.h"
-#include "msvc-inval.h"
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+# include "msvc-inval.h"
+#endif
#undef close
diff --git a/gnulib-tests/closedir.c b/gnulib-tests/closedir.c
index 71fa0b0..562a3ec 100644
--- a/gnulib-tests/closedir.c
+++ b/gnulib-tests/closedir.c
@@ -1,5 +1,5 @@
/* Stop reading the entries of a directory.
- Copyright (C) 2006-2017 Free Software Foundation, Inc.
+ Copyright (C) 2006-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/connect.c b/gnulib-tests/connect.c
new file mode 100644
index 0000000..300a594
--- /dev/null
+++ b/gnulib-tests/connect.c
@@ -0,0 +1,56 @@
+/* connect.c --- wrappers for Windows connect function
+
+ Copyright (C) 2008-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Paolo Bonzini */
+
+#include <config.h>
+
+#define WIN32_LEAN_AND_MEAN
+/* Get winsock2.h. */
+#include <sys/socket.h>
+
+/* Get set_winsock_errno, FD_TO_SOCKET etc. */
+#include "w32sock.h"
+
+#undef connect
+
+int
+rpl_connect (int fd, const struct sockaddr *sockaddr, socklen_t len)
+{
+ SOCKET sock = FD_TO_SOCKET (fd);
+
+ if (sock == INVALID_SOCKET)
+ {
+ errno = EBADF;
+ return -1;
+ }
+ else
+ {
+ int r = connect (sock, sockaddr, len);
+ if (r < 0)
+ {
+ /* EINPROGRESS is not returned by WinSock 2.0; for backwards
+ compatibility, connect(2) uses EWOULDBLOCK. */
+ if (WSAGetLastError () == WSAEWOULDBLOCK)
+ WSASetLastError (WSAEINPROGRESS);
+
+ set_winsock_errno ();
+ }
+
+ return r;
+ }
+}
diff --git a/gnulib-tests/dfa-invalid-char-class.sh b/gnulib-tests/dfa-invalid-char-class.sh
index da69c7e..5ddd1b6 100755
--- a/gnulib-tests/dfa-invalid-char-class.sh
+++ b/gnulib-tests/dfa-invalid-char-class.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# This use of our DFA-testing helper would fail for grep-2.21.
-# Copyright 2014-2017 Free Software Foundation, Inc.
+# Copyright 2014-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/init.sh"; path_prepend_ ../src
diff --git a/gnulib-tests/dfa-match-aux.c b/gnulib-tests/dfa-match-aux.c
index b529b18..85b0b5b 100644
--- a/gnulib-tests/dfa-match-aux.c
+++ b/gnulib-tests/dfa-match-aux.c
@@ -1,6 +1,6 @@
/* Auxiliary program to test a DFA code path that cannot be triggered
by grep or gawk.
- Copyright 2014-2017 Free Software Foundation, Inc.
+ Copyright 2014-2018 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/dfa-match.sh b/gnulib-tests/dfa-match.sh
index 22afab2..c06bb44 100755
--- a/gnulib-tests/dfa-match.sh
+++ b/gnulib-tests/dfa-match.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# This would fail with grep-2.21's dfa.c.
-# Copyright 2014-2017 Free Software Foundation, Inc.
+# Copyright 2014-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/init.sh"; path_prepend_ ../src
diff --git a/gnulib-tests/dirent-private.h b/gnulib-tests/dirent-private.h
index 4a0b1c5..69edcc5 100644
--- a/gnulib-tests/dirent-private.h
+++ b/gnulib-tests/dirent-private.h
@@ -1,5 +1,5 @@
/* Private details of the DIR type.
- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef _DIRENT_PRIVATE_H
#define _DIRENT_PRIVATE_H 1
diff --git a/gnulib-tests/dirent.in.h b/gnulib-tests/dirent.in.h
index f591787..2ab25af 100644
--- a/gnulib-tests/dirent.in.h
+++ b/gnulib-tests/dirent.in.h
@@ -1,5 +1,5 @@
/* A GNU-like <dirent.h>.
- Copyright (C) 2006-2017 Free Software Foundation, Inc.
+ Copyright (C) 2006-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef _@GUARD_PREFIX@_DIRENT_H
diff --git a/gnulib-tests/dirfd.c b/gnulib-tests/dirfd.c
index 6b1a7b2..19c8046 100644
--- a/gnulib-tests/dirfd.c
+++ b/gnulib-tests/dirfd.c
@@ -1,6 +1,6 @@
/* dirfd.c -- return the file descriptor associated with an open DIR*
- Copyright (C) 2001, 2006, 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2006, 2008-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Jim Meyering. */
diff --git a/gnulib-tests/dup2.c b/gnulib-tests/dup2.c
index c0c7cad..c8b49b2 100644
--- a/gnulib-tests/dup2.c
+++ b/gnulib-tests/dup2.c
@@ -1,6 +1,6 @@
/* Duplicate an open file descriptor to a specified file descriptor.
- Copyright (C) 1999, 2004-2007, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2004-2007, 2009-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* written by Paul Eggert */
@@ -35,10 +35,39 @@
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
-# include "msvc-inval.h"
+# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+# include "msvc-inval.h"
+# endif
/* Get _get_osfhandle. */
-# include "msvc-nothrow.h"
+# if GNULIB_MSVC_NOTHROW
+# include "msvc-nothrow.h"
+# else
+# include <io.h>
+# endif
+
+# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+static int
+dup2_nothrow (int fd, int desired_fd)
+{
+ int result;
+
+ TRY_MSVC_INVAL
+ {
+ result = dup2 (fd, desired_fd);
+ }
+ CATCH_MSVC_INVAL
+ {
+ errno = EBADF;
+ result = -1;
+ }
+ DONE_MSVC_INVAL;
+
+ return result;
+}
+# else
+# define dup2_nothrow dup2
+# endif
static int
ms_windows_dup2 (int fd, int desired_fd)
@@ -59,23 +88,14 @@ ms_windows_dup2 (int fd, int desired_fd)
}
/* Wine 1.0.1 return 0 when desired_fd is negative but not -1:
- http://bugs.winehq.org/show_bug.cgi?id=21289 */
+ https://bugs.winehq.org/show_bug.cgi?id=21289 */
if (desired_fd < 0)
{
errno = EBADF;
return -1;
}
- TRY_MSVC_INVAL
- {
- result = dup2 (fd, desired_fd);
- }
- CATCH_MSVC_INVAL
- {
- errno = EBADF;
- result = -1;
- }
- DONE_MSVC_INVAL;
+ result = dup2_nothrow (fd, desired_fd);
if (result == 0)
result = desired_fd;
diff --git a/gnulib-tests/fcntl.c b/gnulib-tests/fcntl.c
new file mode 100644
index 0000000..b8cb271
--- /dev/null
+++ b/gnulib-tests/fcntl.c
@@ -0,0 +1,418 @@
+/* Provide file descriptor control.
+
+ Copyright (C) 2009-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <fcntl.h>
+
+#include <errno.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <unistd.h>
+
+#if !HAVE_FCNTL
+# define rpl_fcntl fcntl
+#endif
+#undef fcntl
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Get declarations of the native Windows API functions. */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+
+/* Get _get_osfhandle. */
+# if GNULIB_MSVC_NOTHROW
+# include "msvc-nothrow.h"
+# else
+# include <io.h>
+# endif
+
+/* Upper bound on getdtablesize(). See lib/getdtablesize.c. */
+# define OPEN_MAX_MAX 0x10000
+
+/* Duplicate OLDFD into the first available slot of at least NEWFD,
+ which must be positive, with FLAGS determining whether the duplicate
+ will be inheritable. */
+static int
+dupfd (int oldfd, int newfd, int flags)
+{
+ /* Mingw has no way to create an arbitrary fd. Iterate until all
+ file descriptors less than newfd are filled up. */
+ HANDLE curr_process = GetCurrentProcess ();
+ HANDLE old_handle = (HANDLE) _get_osfhandle (oldfd);
+ unsigned char fds_to_close[OPEN_MAX_MAX / CHAR_BIT];
+ unsigned int fds_to_close_bound = 0;
+ int result;
+ BOOL inherit = flags & O_CLOEXEC ? FALSE : TRUE;
+ int mode;
+
+ if (newfd < 0 || getdtablesize () <= newfd)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+ if (old_handle == INVALID_HANDLE_VALUE
+ || (mode = setmode (oldfd, O_BINARY)) == -1)
+ {
+ /* oldfd is not open, or is an unassigned standard file
+ descriptor. */
+ errno = EBADF;
+ return -1;
+ }
+ setmode (oldfd, mode);
+ flags |= mode;
+
+ for (;;)
+ {
+ HANDLE new_handle;
+ int duplicated_fd;
+ unsigned int index;
+
+ if (!DuplicateHandle (curr_process, /* SourceProcessHandle */
+ old_handle, /* SourceHandle */
+ curr_process, /* TargetProcessHandle */
+ (PHANDLE) &new_handle, /* TargetHandle */
+ (DWORD) 0, /* DesiredAccess */
+ inherit, /* InheritHandle */
+ DUPLICATE_SAME_ACCESS)) /* Options */
+ {
+ switch (GetLastError ())
+ {
+ case ERROR_TOO_MANY_OPEN_FILES:
+ errno = EMFILE;
+ break;
+ case ERROR_INVALID_HANDLE:
+ case ERROR_INVALID_TARGET_HANDLE:
+ case ERROR_DIRECT_ACCESS_HANDLE:
+ errno = EBADF;
+ break;
+ case ERROR_INVALID_PARAMETER:
+ case ERROR_INVALID_FUNCTION:
+ case ERROR_INVALID_ACCESS:
+ errno = EINVAL;
+ break;
+ default:
+ errno = EACCES;
+ break;
+ }
+ result = -1;
+ break;
+ }
+ duplicated_fd = _open_osfhandle ((intptr_t) new_handle, flags);
+ if (duplicated_fd < 0)
+ {
+ CloseHandle (new_handle);
+ result = -1;
+ break;
+ }
+ if (newfd <= duplicated_fd)
+ {
+ result = duplicated_fd;
+ break;
+ }
+
+ /* Set the bit duplicated_fd in fds_to_close[]. */
+ index = (unsigned int) duplicated_fd / CHAR_BIT;
+ if (fds_to_close_bound <= index)
+ {
+ if (sizeof fds_to_close <= index)
+ /* Need to increase OPEN_MAX_MAX. */
+ abort ();
+ memset (fds_to_close + fds_to_close_bound, '\0',
+ index + 1 - fds_to_close_bound);
+ fds_to_close_bound = index + 1;
+ }
+ fds_to_close[index] |= 1 << ((unsigned int) duplicated_fd % CHAR_BIT);
+ }
+
+ /* Close the previous fds that turned out to be too small. */
+ {
+ int saved_errno = errno;
+ unsigned int duplicated_fd;
+
+ for (duplicated_fd = 0;
+ duplicated_fd < fds_to_close_bound * CHAR_BIT;
+ duplicated_fd++)
+ if ((fds_to_close[duplicated_fd / CHAR_BIT]
+ >> (duplicated_fd % CHAR_BIT))
+ & 1)
+ close (duplicated_fd);
+
+ errno = saved_errno;
+ }
+
+# if REPLACE_FCHDIR
+ if (0 <= result)
+ result = _gl_register_dup (oldfd, result);
+# endif
+ return result;
+}
+#endif /* W32 */
+
+#ifdef __KLIBC__
+
+# define INCL_DOS
+# include <os2.h>
+
+static int
+klibc_fcntl (int fd, int action, /* arg */...)
+{
+ va_list arg_ptr;
+ int arg;
+ struct stat sbuf;
+ int result = -1;
+
+ va_start (arg_ptr, action);
+ arg = va_arg (arg_ptr, int);
+ result = fcntl (fd, action, arg);
+ /* EPERM for F_DUPFD, ENOTSUP for others */
+ if (result == -1 && (errno == EPERM || errno == ENOTSUP)
+ && !fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode))
+ {
+ ULONG ulMode;
+
+ switch (action)
+ {
+ case F_DUPFD:
+ /* Find available fd */
+ while (fcntl (arg, F_GETFL) != -1 || errno != EBADF)
+ arg++;
+
+ result = dup2 (fd, arg);
+ break;
+
+ /* Using underlying APIs is right ? */
+ case F_GETFD:
+ if (DosQueryFHState (fd, &ulMode))
+ break;
+
+ result = (ulMode & OPEN_FLAGS_NOINHERIT) ? FD_CLOEXEC : 0;
+ break;
+
+ case F_SETFD:
+ if (arg & ~FD_CLOEXEC)
+ break;
+
+ if (DosQueryFHState (fd, &ulMode))
+ break;
+
+ if (arg & FD_CLOEXEC)
+ ulMode |= OPEN_FLAGS_NOINHERIT;
+ else
+ ulMode &= ~OPEN_FLAGS_NOINHERIT;
+
+ /* Filter supported flags. */
+ ulMode &= (OPEN_FLAGS_WRITE_THROUGH | OPEN_FLAGS_FAIL_ON_ERROR
+ | OPEN_FLAGS_NO_CACHE | OPEN_FLAGS_NOINHERIT);
+
+ if (DosSetFHState (fd, ulMode))
+ break;
+
+ result = 0;
+ break;
+
+ case F_GETFL:
+ result = 0;
+ break;
+
+ case F_SETFL:
+ if (arg != 0)
+ break;
+
+ result = 0;
+ break;
+
+ default :
+ errno = EINVAL;
+ break;
+ }
+ }
+
+ va_end (arg_ptr);
+
+ return result;
+}
+
+# define fcntl klibc_fcntl
+#endif
+
+/* Perform the specified ACTION on the file descriptor FD, possibly
+ using the argument ARG further described below. This replacement
+ handles the following actions, and forwards all others on to the
+ native fcntl. An unrecognized ACTION returns -1 with errno set to
+ EINVAL.
+
+ F_DUPFD - duplicate FD, with int ARG being the minimum target fd.
+ If successful, return the duplicate, which will be inheritable;
+ otherwise return -1 and set errno.
+
+ F_DUPFD_CLOEXEC - duplicate FD, with int ARG being the minimum
+ target fd. If successful, return the duplicate, which will not be
+ inheritable; otherwise return -1 and set errno.
+
+ F_GETFD - ARG need not be present. If successful, return a
+ non-negative value containing the descriptor flags of FD (only
+ FD_CLOEXEC is portable, but other flags may be present); otherwise
+ return -1 and set errno. */
+
+int
+rpl_fcntl (int fd, int action, /* arg */...)
+{
+ va_list arg;
+ int result = -1;
+ va_start (arg, action);
+ switch (action)
+ {
+
+#if !HAVE_FCNTL
+ case F_DUPFD:
+ {
+ int target = va_arg (arg, int);
+ result = dupfd (fd, target, 0);
+ break;
+ }
+#elif FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR
+ case F_DUPFD:
+ {
+ int target = va_arg (arg, int);
+ /* Detect invalid target; needed for cygwin 1.5.x. */
+ if (target < 0 || getdtablesize () <= target)
+ errno = EINVAL;
+ else
+ {
+ /* Haiku alpha 2 loses fd flags on original. */
+ int flags = fcntl (fd, F_GETFD);
+ if (flags < 0)
+ {
+ result = -1;
+ break;
+ }
+ result = fcntl (fd, action, target);
+ if (0 <= result && fcntl (fd, F_SETFD, flags) == -1)
+ {
+ int saved_errno = errno;
+ close (result);
+ result = -1;
+ errno = saved_errno;
+ }
+# if REPLACE_FCHDIR
+ if (0 <= result)
+ result = _gl_register_dup (fd, result);
+# endif
+ }
+ break;
+ } /* F_DUPFD */
+#endif /* FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR */
+
+ case F_DUPFD_CLOEXEC:
+ {
+ int target = va_arg (arg, int);
+
+#if !HAVE_FCNTL
+ result = dupfd (fd, target, O_CLOEXEC);
+ break;
+#else /* HAVE_FCNTL */
+ /* Try the system call first, if the headers claim it exists
+ (that is, if GNULIB_defined_F_DUPFD_CLOEXEC is 0), since we
+ may be running with a glibc that has the macro but with an
+ older kernel that does not support it. Cache the
+ information on whether the system call really works, but
+ avoid caching failure if the corresponding F_DUPFD fails
+ for any reason. 0 = unknown, 1 = yes, -1 = no. */
+ static int have_dupfd_cloexec = GNULIB_defined_F_DUPFD_CLOEXEC ? -1 : 0;
+ if (0 <= have_dupfd_cloexec)
+ {
+ result = fcntl (fd, action, target);
+ if (0 <= result || errno != EINVAL)
+ {
+ have_dupfd_cloexec = 1;
+# if REPLACE_FCHDIR
+ if (0 <= result)
+ result = _gl_register_dup (fd, result);
+# endif
+ }
+ else
+ {
+ result = rpl_fcntl (fd, F_DUPFD, target);
+ if (result < 0)
+ break;
+ have_dupfd_cloexec = -1;
+ }
+ }
+ else
+ result = rpl_fcntl (fd, F_DUPFD, target);
+ if (0 <= result && have_dupfd_cloexec == -1)
+ {
+ int flags = fcntl (result, F_GETFD);
+ if (flags < 0 || fcntl (result, F_SETFD, flags | FD_CLOEXEC) == -1)
+ {
+ int saved_errno = errno;
+ close (result);
+ errno = saved_errno;
+ result = -1;
+ }
+ }
+ break;
+#endif /* HAVE_FCNTL */
+ } /* F_DUPFD_CLOEXEC */
+
+#if !HAVE_FCNTL
+ case F_GETFD:
+ {
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ HANDLE handle = (HANDLE) _get_osfhandle (fd);
+ DWORD flags;
+ if (handle == INVALID_HANDLE_VALUE
+ || GetHandleInformation (handle, &flags) == 0)
+ errno = EBADF;
+ else
+ result = (flags & HANDLE_FLAG_INHERIT) ? 0 : FD_CLOEXEC;
+# else /* !W32 */
+ /* Use dup2 to reject invalid file descriptors. No way to
+ access this information, so punt. */
+ if (0 <= dup2 (fd, fd))
+ result = 0;
+# endif /* !W32 */
+ break;
+ } /* F_GETFD */
+#endif /* !HAVE_FCNTL */
+
+ /* Implementing F_SETFD on mingw is not trivial - there is no
+ API for changing the O_NOINHERIT bit on an fd, and merely
+ changing the HANDLE_FLAG_INHERIT bit on the underlying handle
+ can lead to odd state. It may be possible by duplicating the
+ handle, using _open_osfhandle with the right flags, then
+ using dup2 to move the duplicate onto the original, but that
+ is not supported for now. */
+
+ default:
+ {
+#if HAVE_FCNTL
+ void *p = va_arg (arg, void *);
+ result = fcntl (fd, action, p);
+#else
+ errno = EINVAL;
+#endif
+ break;
+ }
+ }
+ va_end (arg);
+ return result;
+}
diff --git a/gnulib-tests/fd-hook.c b/gnulib-tests/fd-hook.c
index ab5847a..95a0662 100644
--- a/gnulib-tests/fd-hook.c
+++ b/gnulib-tests/fd-hook.c
@@ -1,5 +1,5 @@
-/* Hook for making making file descriptor functions close(), ioctl() extensible.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+/* Hook for making file descriptor functions close(), ioctl() extensible.
+ Copyright (C) 2009-2018 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This program is free software: you can redistribute it and/or modify it
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/fd-hook.h b/gnulib-tests/fd-hook.h
index fe0d1b0..dbc5b67 100644
--- a/gnulib-tests/fd-hook.h
+++ b/gnulib-tests/fd-hook.h
@@ -1,5 +1,5 @@
-/* Hook for making making file descriptor functions close(), ioctl() extensible.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+/* Hook for making file descriptor functions close(), ioctl() extensible.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef FD_HOOK_H
diff --git a/gnulib-tests/fdopen.c b/gnulib-tests/fdopen.c
index 2ee87eb..669d85d 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/fflush.c b/gnulib-tests/fflush.c
index 775acdf..a140b7a 100644
--- a/gnulib-tests/fflush.c
+++ b/gnulib-tests/fflush.c
@@ -1,5 +1,5 @@
/* fflush.c -- allow flushing input streams
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake. */
@@ -33,7 +33,8 @@
#undef fflush
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
+/* GNU libc, BeOS, Haiku, Linux libc5 */
/* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */
static void
@@ -63,7 +64,7 @@ clear_ungetc_buffer (FILE *fp)
fp->_ungetc_count = 0;
fp->_rcount = - fp->_rcount;
}
-# elif defined _IOERR /* Minix, AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */
+# elif defined _IOERR /* Minix, AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */
/* Nothing to do. */
# else /* other implementations */
fseeko (fp, 0, SEEK_CUR);
@@ -72,7 +73,8 @@ clear_ungetc_buffer (FILE *fp)
#endif
-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
+#if ! (defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1)
+/* GNU libc, BeOS, Haiku, Linux libc5 */
# if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
@@ -148,7 +150,8 @@ rpl_fflush (FILE *stream)
if (stream == NULL || ! freading (stream))
return fflush (stream);
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
+ /* GNU libc, BeOS, Haiku, Linux libc5 */
clear_ungetc_buffer_preserving_position (stream);
diff --git a/gnulib-tests/file-has-acl.c b/gnulib-tests/file-has-acl.c
index be476b0..2434986 100644
--- a/gnulib-tests/file-has-acl.c
+++ b/gnulib-tests/file-has-acl.c
@@ -1,6 +1,6 @@
/* Test whether a file has a nontrivial ACL. -*- coding: utf-8 -*-
- Copyright (C) 2002-2003, 2005-2017 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2018 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
@@ -13,7 +13,7 @@
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/>.
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
Written by Paul Eggert, Andreas Grünbacher, and Bruno Haible. */
diff --git a/gnulib-tests/flexmember.h b/gnulib-tests/flexmember.h
index c71ea65..7e3f598 100644
--- a/gnulib-tests/flexmember.h
+++ b/gnulib-tests/flexmember.h
@@ -1,19 +1,22 @@
/* Sizes of structs with flexible array members.
- Copyright 2016-2017 Free Software Foundation, Inc.
+ Copyright 2016-2018 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 file is part of the GNU C Library.
- This program is distributed in the hope that it will be useful,
+ The GNU C Library 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.
+
+ The GNU C Library 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.
+ 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/>.
+ You should have received a copy of the GNU General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>.
Written by Paul Eggert. */
diff --git a/gnulib-tests/fpurge.c b/gnulib-tests/fpurge.c
index 8e892f2..554790b 100644
--- a/gnulib-tests/fpurge.c
+++ b/gnulib-tests/fpurge.c
@@ -1,5 +1,5 @@
/* Flushing buffers of a FILE stream.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@@ -62,7 +62,8 @@ fpurge (FILE *fp)
/* Most systems provide FILE as a struct and the necessary bitmask in
<stdio.h>, because they need it for implementing getc() and putc() as
fast macros. */
-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+# if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
+ /* GNU libc, BeOS, Haiku, Linux libc5 */
fp->_IO_read_end = fp->_IO_read_ptr;
fp->_IO_write_ptr = fp->_IO_write_base;
/* Avoid memory leak when there is an active ungetc buffer. */
@@ -98,7 +99,7 @@ fpurge (FILE *fp)
if (fp->_ptr != NULL)
fp->_count = 0;
return 0;
-# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */
+# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */
fp_->_ptr = fp_->_base;
if (fp_->_ptr != NULL)
fp_->_cnt = 0;
diff --git a/gnulib-tests/freading.c b/gnulib-tests/freading.c
index 0c361ae..790f92c 100644
--- a/gnulib-tests/freading.c
+++ b/gnulib-tests/freading.c
@@ -1,5 +1,5 @@
/* Retrieve information about a FILE stream.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@@ -22,7 +22,7 @@
#include "stdio-impl.h"
/* Don't use glibc's __freading function in glibc < 2.7, see
- <http://sourceware.org/bugzilla/show_bug.cgi?id=4359> */
+ <https://sourceware.org/bugzilla/show_bug.cgi?id=4359> */
#if !(HAVE___FREADING && (!defined __GLIBC__ || defined __UCLIBC__ || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7)))
bool
@@ -31,7 +31,8 @@ freading (FILE *fp)
/* Most systems provide FILE as a struct and the necessary bitmask in
<stdio.h>, because they need it for implementing getc() and putc() as
fast macros. */
-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+# if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
+ /* GNU libc, BeOS, Haiku, Linux libc5 */
return ((fp->_flags & _IO_NO_WRITES) != 0
|| ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
&& fp->_IO_read_base != NULL));
@@ -42,7 +43,7 @@ freading (FILE *fp)
return (fp->_flags & _IOREAD) != 0;
# elif defined __minix /* Minix */
return (fp->_flags & _IOREADING) != 0;
-# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */
+# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */
# if defined __sun /* Solaris */
return (fp_->_flag & _IOREAD) != 0 && (fp_->_flag & _IOWRT) == 0;
# else
diff --git a/gnulib-tests/freading.h b/gnulib-tests/freading.h
index 29776fc..29d92b1 100644
--- a/gnulib-tests/freading.h
+++ b/gnulib-tests/freading.h
@@ -1,5 +1,5 @@
/* Retrieve information about a FILE stream.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <stdbool.h>
#include <stdio.h>
diff --git a/gnulib-tests/fseek.c b/gnulib-tests/fseek.c
index d9e2e84..e0b5877 100644
--- a/gnulib-tests/fseek.c
+++ b/gnulib-tests/fseek.c
@@ -1,5 +1,5 @@
/* An fseek() function that, together with fflush(), is POSIX compliant.
- Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/fseeko.c b/gnulib-tests/fseeko.c
index 5ae106f..8cb3baf 100644
--- a/gnulib-tests/fseeko.c
+++ b/gnulib-tests/fseeko.c
@@ -1,5 +1,5 @@
/* An fseeko() function that, together with fflush(), is POSIX compliant.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ with this program; if not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@@ -47,7 +47,8 @@ fseeko (FILE *fp, off_t offset, int whence)
#endif
/* These tests are based on fpurge.c. */
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
+ /* GNU libc, BeOS, Haiku, Linux libc5 */
if (fp->_IO_read_end == fp->_IO_read_ptr
&& fp->_IO_write_ptr == fp->_IO_write_base
&& fp->_IO_save_base == NULL)
@@ -80,7 +81,7 @@ fseeko (FILE *fp, off_t offset, int whence)
#elif defined __minix /* Minix */
if (fp_->_ptr == fp_->_buf
&& (fp_->_ptr == NULL || fp_->_count == 0))
-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */
if (fp_->_ptr == fp_->_base
&& (fp_->_ptr == NULL || fp_->_cnt == 0))
#elif defined __UCLIBC__ /* uClibc */
@@ -123,7 +124,8 @@ fseeko (FILE *fp, off_t offset, int whence)
return -1;
}
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
+ /* GNU libc, BeOS, Haiku, Linux libc5 */
fp->_flags &= ~_IO_EOF_SEEN;
fp->_offset = pos;
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
@@ -150,7 +152,7 @@ fseeko (FILE *fp, off_t offset, int whence)
fp_->_flags &= ~__SEOF;
#elif defined __EMX__ /* emx+gcc */
fp->_flags &= ~_IOEOF;
-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */
fp_->_flag &= ~_IOEOF;
#elif defined __MINT__ /* Atari FreeMiNT */
fp->__offset = pos;
diff --git a/gnulib-tests/ftell.c b/gnulib-tests/ftell.c
index a5c9489..74a1da8 100644
--- a/gnulib-tests/ftell.c
+++ b/gnulib-tests/ftell.c
@@ -1,5 +1,5 @@
/* An ftell() function that works around platform bugs.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/ftello.c b/gnulib-tests/ftello.c
index 298255a..495c254 100644
--- a/gnulib-tests/ftello.c
+++ b/gnulib-tests/ftello.c
@@ -1,5 +1,5 @@
/* An ftello() function that works around platform bugs.
- Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/ftruncate.c b/gnulib-tests/ftruncate.c
new file mode 100644
index 0000000..80cb480
--- /dev/null
+++ b/gnulib-tests/ftruncate.c
@@ -0,0 +1,193 @@
+/* ftruncate emulations for native Windows.
+ Copyright (C) 1992-2018 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, 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 <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <unistd.h>
+
+#if HAVE_CHSIZE
+/* A native Windows platform. */
+
+# include <errno.h>
+
+# if _GL_WINDOWS_64_BIT_OFF_T
+
+/* Large File Support: off_t is 64-bit, but chsize() takes only a 32-bit
+ argument. So, define a 64-bit safe SetFileSize function ourselves. */
+
+/* Ensure that <windows.h> declares GetFileSizeEx. */
+# undef _WIN32_WINNT
+# 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. */
+# if GNULIB_MSVC_NOTHROW
+# include "msvc-nothrow.h"
+# else
+# include <io.h>
+# endif
+
+static BOOL
+SetFileSize (HANDLE h, LONGLONG size)
+{
+ LARGE_INTEGER old_size;
+
+ if (!GetFileSizeEx (h, &old_size))
+ return FALSE;
+
+ if (size != old_size.QuadPart)
+ {
+ /* Duplicate the handle, so we are free to modify its file position. */
+ HANDLE curr_process = GetCurrentProcess ();
+ HANDLE tmph;
+
+ if (!DuplicateHandle (curr_process, /* SourceProcessHandle */
+ h, /* SourceHandle */
+ curr_process, /* TargetProcessHandle */
+ (PHANDLE) &tmph, /* TargetHandle */
+ (DWORD) 0, /* DesiredAccess */
+ FALSE, /* InheritHandle */
+ DUPLICATE_SAME_ACCESS)) /* Options */
+ return FALSE;
+
+ if (size < old_size.QuadPart)
+ {
+ /* Reduce the size. */
+ LONG size_hi = (LONG) (size >> 32);
+ if (SetFilePointer (tmph, (LONG) size, &size_hi, FILE_BEGIN)
+ == INVALID_SET_FILE_POINTER
+ && GetLastError() != NO_ERROR)
+ {
+ CloseHandle (tmph);
+ return FALSE;
+ }
+ if (!SetEndOfFile (tmph))
+ {
+ CloseHandle (tmph);
+ return FALSE;
+ }
+ }
+ else
+ {
+ /* Increase the size by adding zero bytes at the end. */
+ static char zero_bytes[1024];
+ LONG pos_hi = 0;
+ LONG pos_lo = SetFilePointer (tmph, (LONG) 0, &pos_hi, FILE_END);
+ LONGLONG pos;
+ if (pos_lo == INVALID_SET_FILE_POINTER
+ && GetLastError() != NO_ERROR)
+ {
+ CloseHandle (tmph);
+ return FALSE;
+ }
+ pos = ((LONGLONG) pos_hi << 32) | (ULONGLONG) (ULONG) pos_lo;
+ while (pos < size)
+ {
+ DWORD written;
+ LONGLONG count = size - pos;
+ if (count > sizeof (zero_bytes))
+ count = sizeof (zero_bytes);
+ if (!WriteFile (tmph, zero_bytes, (DWORD) count, &written, NULL)
+ || written == 0)
+ {
+ CloseHandle (tmph);
+ return FALSE;
+ }
+ pos += (ULONGLONG) (ULONG) written;
+ }
+ }
+ /* Close the handle. */
+ CloseHandle (tmph);
+ }
+ return TRUE;
+}
+
+int
+ftruncate (int fd, off_t length)
+{
+ HANDLE handle = (HANDLE) _get_osfhandle (fd);
+
+ if (handle == INVALID_HANDLE_VALUE)
+ {
+ errno = EBADF;
+ return -1;
+ }
+ if (length < 0)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+ if (!SetFileSize (handle, length))
+ {
+ switch (GetLastError ())
+ {
+ case ERROR_ACCESS_DENIED:
+ errno = EACCES;
+ break;
+ case ERROR_HANDLE_DISK_FULL:
+ case ERROR_DISK_FULL:
+ case ERROR_DISK_TOO_FRAGMENTED:
+ errno = ENOSPC;
+ break;
+ default:
+ errno = EIO;
+ break;
+ }
+ return -1;
+ }
+ return 0;
+}
+
+# else
+
+# include <io.h>
+
+# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+# include "msvc-inval.h"
+static int
+chsize_nothrow (int fd, long length)
+{
+ int result;
+
+ TRY_MSVC_INVAL
+ {
+ result = chsize (fd, length);
+ }
+ CATCH_MSVC_INVAL
+ {
+ result = -1;
+ errno = EBADF;
+ }
+ DONE_MSVC_INVAL;
+
+ return result;
+}
+# else
+# define chsize_nothrow chsize
+# endif
+
+int
+ftruncate (int fd, off_t length)
+{
+ return chsize_nothrow (fd, length);
+}
+
+# endif
+#endif
diff --git a/gnulib-tests/getcwd-lgpl.c b/gnulib-tests/getcwd-lgpl.c
index 34603c1..9f0e007 100644
--- a/gnulib-tests/getcwd-lgpl.c
+++ b/gnulib-tests/getcwd-lgpl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2018 Free Software Foundation, Inc.
This file is part of gnulib.
This program is free software: you can redistribute it and/or modify
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/getdtablesize.c b/gnulib-tests/getdtablesize.c
index 7fabb51..c6c1136 100644
--- a/gnulib-tests/getdtablesize.c
+++ b/gnulib-tests/getdtablesize.c
@@ -1,5 +1,5 @@
-/* getdtablesize() function for platforms that don't have it.
- Copyright (C) 2008-2017 Free Software Foundation, Inc.
+/* getdtablesize() function: Return maximum possible file descriptor value + 1.
+ Copyright (C) 2008-2018 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@@ -24,7 +24,9 @@
# include <stdio.h>
-# include "msvc-inval.h"
+# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+# include "msvc-inval.h"
+# endif
# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
static int
@@ -44,7 +46,8 @@ _setmaxstdio_nothrow (int newmax)
return result;
}
-# define _setmaxstdio _setmaxstdio_nothrow
+# else
+# define _setmaxstdio_nothrow _setmaxstdio
# endif
/* Cache for the previous getdtablesize () result. Safe to cache because
@@ -76,9 +79,9 @@ getdtablesize (void)
freed when we call _setmaxstdio with the original value. */
int orig_max_stdio = _getmaxstdio ();
unsigned int bound;
- for (bound = 0x10000; _setmaxstdio (bound) < 0; bound = bound / 2)
+ for (bound = 0x10000; _setmaxstdio_nothrow (bound) < 0; bound = bound / 2)
;
- _setmaxstdio (orig_max_stdio);
+ _setmaxstdio_nothrow (orig_max_stdio);
dtablesize = bound;
}
return dtablesize;
diff --git a/gnulib-tests/getpagesize.c b/gnulib-tests/getpagesize.c
index 9e91315..2a01563 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible and Martin Lambers. */
diff --git a/gnulib-tests/gnulib.mk b/gnulib-tests/gnulib.mk
index 81a9115..665e28e 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-2017 Free Software Foundation, Inc.
+# Copyright (C) 2002-2018 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
@@ -13,7 +13,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this file. If not, see <http://www.gnu.org/licenses/>.
+# along with this file. If not, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License,
# this file may be distributed as part of a program that
@@ -30,6 +30,7 @@ XFAIL_TESTS =
TESTS_ENVIRONMENT =
noinst_PROGRAMS =
check_PROGRAMS =
+EXTRA_PROGRAMS =
noinst_HEADERS =
noinst_LIBRARIES =
check_LIBRARIES = libtests.a
@@ -58,6 +59,24 @@ AM_LIBTOOLFLAGS = --preserve-dup-deps
TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' srcdir='$(srcdir)'
+## begin gnulib module accept
+
+
+EXTRA_DIST += accept.c w32sock.h
+
+EXTRA_libtests_a_SOURCES += accept.c
+
+## end gnulib module accept
+
+## begin gnulib module accept-tests
+
+TESTS += test-accept
+check_PROGRAMS += test-accept
+test_accept_LDADD = $(LDADD) @LIBSOCKET@
+EXTRA_DIST += test-accept.c signature.h macros.h
+
+## end gnulib module accept-tests
+
## begin gnulib module acl-tests
TESTS += \
@@ -90,6 +109,50 @@ EXTRA_DIST += test-alloca-opt.c
## end gnulib module alloca-opt-tests
+## begin gnulib module arpa_inet
+
+BUILT_SOURCES += arpa/inet.h
+
+# We need the following in order to create <arpa/inet.h> when the system
+# doesn't have one.
+arpa/inet.h: arpa_inet.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_at)$(MKDIR_P) arpa
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \
+ -e 's|@''NEXT_ARPA_INET_H''@|$(NEXT_ARPA_INET_H)|g' \
+ -e 's|@''HAVE_ARPA_INET_H''@|$(HAVE_ARPA_INET_H)|g' \
+ -e 's/@''GNULIB_INET_NTOP''@/$(GNULIB_INET_NTOP)/g' \
+ -e 's/@''GNULIB_INET_PTON''@/$(GNULIB_INET_PTON)/g' \
+ -e 's|@''HAVE_DECL_INET_NTOP''@|$(HAVE_DECL_INET_NTOP)|g' \
+ -e 's|@''HAVE_DECL_INET_PTON''@|$(HAVE_DECL_INET_PTON)|g' \
+ -e 's|@''REPLACE_INET_NTOP''@|$(REPLACE_INET_NTOP)|g' \
+ -e 's|@''REPLACE_INET_PTON''@|$(REPLACE_INET_PTON)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/arpa_inet.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += arpa/inet.h arpa/inet.h-t
+MOSTLYCLEANDIRS += arpa
+
+EXTRA_DIST += arpa_inet.in.h
+
+## end gnulib module arpa_inet
+
+## begin gnulib module arpa_inet-tests
+
+TESTS += test-arpa_inet
+check_PROGRAMS += test-arpa_inet
+EXTRA_DIST += test-arpa_inet.c
+
+## end gnulib module arpa_inet-tests
+
## begin gnulib module binary-io
libtests_a_SOURCES += binary-io.h binary-io.c
@@ -105,6 +168,24 @@ EXTRA_DIST += test-binary-io.sh test-binary-io.c macros.h
## end gnulib module binary-io-tests
+## begin gnulib module bind
+
+
+EXTRA_DIST += bind.c w32sock.h
+
+EXTRA_libtests_a_SOURCES += bind.c
+
+## end gnulib module bind
+
+## begin gnulib module bind-tests
+
+TESTS += test-bind
+check_PROGRAMS += test-bind
+test_bind_LDADD = $(LDADD) @LIBSOCKET@ $(INET_PTON_LIB)
+EXTRA_DIST += test-bind.c signature.h macros.h
+
+## end gnulib module bind-tests
+
## begin gnulib module btowc-tests
TESTS += test-btowc1.sh test-btowc2.sh
@@ -136,7 +217,7 @@ EXTRA_DIST += test-c-strcase.sh test-c-strcasecmp.c test-c-strncasecmp.c macros.
TESTS += test-canonicalize-lgpl
check_PROGRAMS += test-canonicalize-lgpl
-EXTRA_DIST += test-canonicalize-lgpl.c signature.h macros.h
+EXTRA_DIST += test-canonicalize-lgpl.c signature.h null-ptr.h macros.h
## end gnulib module canonicalize-lgpl-tests
@@ -148,6 +229,22 @@ EXTRA_DIST += test-chdir.c signature.h macros.h
## end gnulib module chdir-tests
+## begin gnulib module cloexec
+
+libtests_a_SOURCES += cloexec.c
+
+EXTRA_DIST += cloexec.h
+
+## end gnulib module cloexec
+
+## begin gnulib module cloexec-tests
+
+TESTS += test-cloexec
+check_PROGRAMS += test-cloexec
+EXTRA_DIST += test-cloexec.c macros.h
+
+## end gnulib module cloexec-tests
+
## begin gnulib module close
@@ -174,6 +271,24 @@ EXTRA_libtests_a_SOURCES += closedir.c
## end gnulib module closedir
+## begin gnulib module connect
+
+
+EXTRA_DIST += connect.c w32sock.h
+
+EXTRA_libtests_a_SOURCES += connect.c
+
+## end gnulib module connect
+
+## begin gnulib module connect-tests
+
+TESTS += test-connect
+check_PROGRAMS += test-connect
+test_connect_LDADD = $(LDADD) @LIBSOCKET@ $(INET_PTON_LIB)
+EXTRA_DIST += test-connect.c signature.h macros.h
+
+## end gnulib module connect-tests
+
## begin gnulib module ctype-tests
TESTS += test-ctype
@@ -294,6 +409,15 @@ EXTRA_DIST += test-errno.c
## end gnulib module errno-tests
+## begin gnulib module fcntl
+
+
+EXTRA_DIST += fcntl.c
+
+EXTRA_libtests_a_SOURCES += fcntl.c
+
+## end gnulib module fcntl
+
## begin gnulib module fcntl-h-tests
TESTS += test-fcntl-h
@@ -302,6 +426,14 @@ EXTRA_DIST += test-fcntl-h.c
## end gnulib module fcntl-h-tests
+## begin gnulib module fcntl-tests
+
+TESTS += test-fcntl
+check_PROGRAMS += test-fcntl
+EXTRA_DIST += test-fcntl.c signature.h macros.h
+
+## end gnulib module fcntl-tests
+
## begin gnulib module fd-hook
libtests_a_SOURCES += fd-hook.c
@@ -370,13 +502,6 @@ EXTRA_DIST += test-file-has-acl.sh test-file-has-acl-1.sh test-file-has-acl-2.sh
## end gnulib module file-has-acl-tests
-## begin gnulib module filename
-
-
-EXTRA_DIST += filename.h
-
-## end gnulib module filename
-
## begin gnulib module flexmember
@@ -522,6 +647,23 @@ EXTRA_DIST += test-ftello.c test-ftello.sh test-ftello2.sh test-ftello3.c test-f
## end gnulib module ftello-tests
+## begin gnulib module ftruncate
+
+
+EXTRA_DIST += ftruncate.c
+
+EXTRA_libtests_a_SOURCES += ftruncate.c
+
+## end gnulib module ftruncate
+
+## begin gnulib module ftruncate-tests
+
+TESTS += test-ftruncate.sh
+check_PROGRAMS += test-ftruncate
+EXTRA_DIST += test-ftruncate.c test-ftruncate.sh signature.h macros.h
+
+## end gnulib module ftruncate-tests
+
## begin gnulib module fwrite-tests
TESTS += test-fwrite
@@ -637,6 +779,24 @@ EXTRA_DIST += test-ignore-value.c
## end gnulib module ignore-value-tests
+## begin gnulib module inet_pton
+
+
+EXTRA_DIST += inet_pton.c
+
+EXTRA_libtests_a_SOURCES += inet_pton.c
+
+## end gnulib module inet_pton
+
+## begin gnulib module inet_pton-tests
+
+TESTS += test-inet_pton
+check_PROGRAMS += test-inet_pton
+test_inet_pton_LDADD = $(LDADD) @INET_PTON_LIB@
+EXTRA_DIST += test-inet_pton.c signature.h macros.h
+
+## end gnulib module inet_pton-tests
+
## begin gnulib module intprops-tests
TESTS += test-intprops
@@ -698,6 +858,23 @@ EXTRA_DIST += test-inttypes.c
## end gnulib module inttypes-tests
+## begin gnulib module ioctl
+
+
+EXTRA_DIST += ioctl.c w32sock.h
+
+EXTRA_libtests_a_SOURCES += ioctl.c
+
+## end gnulib module ioctl
+
+## begin gnulib module ioctl-tests
+
+TESTS += test-ioctl
+check_PROGRAMS += test-ioctl
+EXTRA_DIST += test-ioctl.c signature.h macros.h
+
+## end gnulib module ioctl-tests
+
## begin gnulib module isblank-tests
TESTS += test-isblank
@@ -739,6 +916,24 @@ EXTRA_DIST += test-link.h test-link.c signature.h macros.h
## end gnulib module link-tests
+## begin gnulib module listen
+
+
+EXTRA_DIST += listen.c w32sock.h
+
+EXTRA_libtests_a_SOURCES += listen.c
+
+## end gnulib module listen
+
+## begin gnulib module listen-tests
+
+TESTS += test-listen
+check_PROGRAMS += test-listen
+test_listen_LDADD = $(LDADD) @LIBSOCKET@
+EXTRA_DIST += test-listen.c signature.h macros.h
+
+## end gnulib module listen-tests
+
## begin gnulib module locale-tests
TESTS += test-locale
@@ -850,6 +1045,63 @@ EXTRA_DIST += test-memrchr.c zerosize-ptr.h signature.h macros.h
## end gnulib module memrchr-tests
+## begin gnulib module nanosleep
+
+
+EXTRA_DIST += nanosleep.c
+
+EXTRA_libtests_a_SOURCES += nanosleep.c
+
+## end gnulib module nanosleep
+
+## begin gnulib module nanosleep-tests
+
+TESTS += test-nanosleep
+check_PROGRAMS += test-nanosleep
+test_nanosleep_LDADD = $(LDADD) $(LIB_NANOSLEEP)
+EXTRA_DIST += test-nanosleep.c signature.h macros.h
+
+## end gnulib module nanosleep-tests
+
+## begin gnulib module netinet_in
+
+BUILT_SOURCES += $(NETINET_IN_H)
+
+# We need the following in order to create <netinet/in.h> when the system
+# doesn't have one.
+if GL_GENERATE_NETINET_IN_H
+netinet/in.h: netinet_in.in.h $(top_builddir)/config.status
+ $(AM_V_at)$(MKDIR_P) netinet
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_NETINET_IN_H''@|$(NEXT_NETINET_IN_H)|g' \
+ -e 's|@''HAVE_NETINET_IN_H''@|$(HAVE_NETINET_IN_H)|g' \
+ < $(srcdir)/netinet_in.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+else
+netinet/in.h: $(top_builddir)/config.status
+ rm -f $@
+endif
+MOSTLYCLEANFILES += netinet/in.h netinet/in.h-t
+MOSTLYCLEANDIRS += netinet
+
+EXTRA_DIST += netinet_in.in.h
+
+## end gnulib module netinet_in
+
+## begin gnulib module netinet_in-tests
+
+TESTS += test-netinet_in
+check_PROGRAMS += test-netinet_in
+EXTRA_DIST += test-netinet_in.c
+
+## end gnulib module netinet_in-tests
+
## begin gnulib module nl_langinfo-tests
TESTS += test-nl_langinfo.sh
@@ -893,6 +1145,40 @@ EXTRA_DIST += test-pathmax.c
## end gnulib module pathmax-tests
+## begin gnulib module perror
+
+
+EXTRA_DIST += perror.c
+
+EXTRA_libtests_a_SOURCES += perror.c
+
+## end gnulib module perror
+
+## begin gnulib module perror-tests
+
+TESTS += test-perror.sh test-perror2
+check_PROGRAMS += test-perror test-perror2
+EXTRA_DIST += macros.h signature.h test-perror.c test-perror2.c test-perror.sh
+
+## end gnulib module perror-tests
+
+## begin gnulib module pipe-posix
+
+
+EXTRA_DIST += pipe.c
+
+EXTRA_libtests_a_SOURCES += pipe.c
+
+## end gnulib module pipe-posix
+
+## begin gnulib module pipe-posix-tests
+
+TESTS += test-pipe
+check_PROGRAMS += test-pipe
+EXTRA_DIST += test-pipe.c signature.h macros.h
+
+## end gnulib module pipe-posix-tests
+
## begin gnulib module putenv
@@ -911,6 +1197,23 @@ EXTRA_DIST += test-quotearg-simple.c test-quotearg.h macros.h zerosize-ptr.h
## end gnulib module quotearg-simple-tests
+## begin gnulib module raise
+
+
+EXTRA_DIST += raise.c
+
+EXTRA_libtests_a_SOURCES += raise.c
+
+## end gnulib module raise
+
+## begin gnulib module raise-tests
+
+TESTS += test-raise
+check_PROGRAMS += test-raise
+EXTRA_DIST += test-raise.c signature.h macros.h
+
+## end gnulib module raise-tests
+
## begin gnulib module read-file
libtests_a_SOURCES += read-file.c
@@ -978,6 +1281,27 @@ EXTRA_DIST += test-rmdir.h test-rmdir.c signature.h macros.h
## end gnulib module rmdir-tests
+## begin gnulib module select
+
+
+EXTRA_DIST += select.c
+
+EXTRA_libtests_a_SOURCES += select.c
+
+## end gnulib module select
+
+## begin gnulib module select-tests
+
+TESTS += test-select test-select-in.sh test-select-out.sh
+# test-select-stdin has to be run by hand.
+check_PROGRAMS += test-select test-select-fd test-select-stdin
+test_select_LDADD = $(LDADD) @LIB_SELECT@ @LIBSOCKET@ $(INET_PTON_LIB)
+test_select_fd_LDADD = $(LDADD) @LIB_SELECT@
+test_select_stdin_LDADD = $(LDADD) @LIB_SELECT@
+EXTRA_DIST += macros.h signature.h test-select.c test-select.h test-select-fd.c test-select-in.sh test-select-out.sh test-select-stdin.c
+
+## end gnulib module select-tests
+
## begin gnulib module setenv
@@ -1017,112 +1341,212 @@ EXTRA_DIST += test-setlocale1.sh test-setlocale1.c test-setlocale2.sh test-setlo
## end gnulib module setlocale-tests
+## begin gnulib module setsockopt
+
+
+EXTRA_DIST += setsockopt.c w32sock.h
+
+EXTRA_libtests_a_SOURCES += setsockopt.c
+
+## end gnulib module setsockopt
+
+## begin gnulib module setsockopt-tests
+
+TESTS += test-setsockopt
+check_PROGRAMS += test-setsockopt
+test_setsockopt_LDADD = $(LDADD) @LIBSOCKET@
+EXTRA_DIST += test-setsockopt.c signature.h macros.h
+
+## end gnulib module setsockopt-tests
+
+## begin gnulib module sigaction
+
+libtests_a_SOURCES += sig-handler.c
+
+EXTRA_DIST += sig-handler.h sigaction.c
+
+EXTRA_libtests_a_SOURCES += sigaction.c
+
+## end gnulib module sigaction
+
+## begin gnulib module sigaction-tests
+
+TESTS += test-sigaction
+check_PROGRAMS += test-sigaction
+EXTRA_DIST += test-sigaction.c signature.h macros.h
+
+## end gnulib module sigaction-tests
+
+## begin gnulib module signal-h
+
+BUILT_SOURCES += signal.h
+
+# We need the following in order to create <signal.h> when the system
+# doesn't have a complete one.
+signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \
+ -e 's/@''GNULIB_PTHREAD_SIGMASK''@/$(GNULIB_PTHREAD_SIGMASK)/g' \
+ -e 's/@''GNULIB_RAISE''@/$(GNULIB_RAISE)/g' \
+ -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \
+ -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \
+ -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \
+ -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \
+ -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \
+ -e 's|@''HAVE_RAISE''@|$(HAVE_RAISE)|g' \
+ -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \
+ -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \
+ -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \
+ -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \
+ -e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \
+ -e 's|@''HAVE_SIGHANDLER_T''@|$(HAVE_SIGHANDLER_T)|g' \
+ -e 's|@''REPLACE_PTHREAD_SIGMASK''@|$(REPLACE_PTHREAD_SIGMASK)|g' \
+ -e 's|@''REPLACE_RAISE''@|$(REPLACE_RAISE)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/signal.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += signal.h signal.h-t
+
+EXTRA_DIST += signal.in.h
+
+## end gnulib module signal-h
+
+## begin gnulib module signal-h-tests
+
+TESTS += test-signal-h
+check_PROGRAMS += test-signal-h
+EXTRA_DIST += test-signal-h.c
+
+## end gnulib module signal-h-tests
+
+## begin gnulib module sigprocmask
+
+
+EXTRA_DIST += sigprocmask.c
+
+EXTRA_libtests_a_SOURCES += sigprocmask.c
+
+## end gnulib module sigprocmask
+
+## begin gnulib module sigprocmask-tests
+
+TESTS += test-sigprocmask
+check_PROGRAMS += test-sigprocmask
+EXTRA_DIST += test-sigprocmask.c signature.h macros.h
+
+## end gnulib module sigprocmask-tests
+
+## begin gnulib module sleep
+
+
+EXTRA_DIST += sleep.c
+
+EXTRA_libtests_a_SOURCES += sleep.c
+
+## end gnulib module sleep
+
+## begin gnulib module sleep-tests
+
+TESTS += test-sleep
+check_PROGRAMS += test-sleep
+EXTRA_DIST += test-sleep.c signature.h macros.h
+
+## end gnulib module sleep-tests
+
## 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
+## begin gnulib module socket
+
+
+EXTRA_DIST += socket.c w32sock.h
+
+EXTRA_libtests_a_SOURCES += socket.c
+
+## end gnulib module socket
+
+## begin gnulib module sockets
+
+libtests_a_SOURCES += sockets.h sockets.c
+
+EXTRA_DIST += w32sock.h
+
+## end gnulib module sockets
+
+## begin gnulib module sockets-tests
+
+TESTS += test-sockets
+check_PROGRAMS += test-sockets
+test_sockets_LDADD = $(LDADD) @LIBSOCKET@
+EXTRA_DIST += test-sockets.c
+
+## end gnulib module sockets-tests
+
## begin gnulib module stat-tests
TESTS += test-stat
@@ -1132,6 +1556,15 @@ EXTRA_DIST += test-stat.h test-stat.c signature.h macros.h
## end gnulib module stat-tests
+## begin gnulib module stat-time-tests
+
+TESTS += test-stat-time
+check_PROGRAMS += test-stat-time
+test_stat_time_LDADD = $(LDADD) $(LIB_NANOSLEEP)
+EXTRA_DIST += test-stat-time.c macros.h nap.h
+
+## end gnulib module stat-time-tests
+
## begin gnulib module stdalign-tests
TESTS += test-stdalign
@@ -1197,6 +1630,23 @@ EXTRA_DIST += test-strerror.c signature.h macros.h
## end gnulib module strerror-tests
+## begin gnulib module strerror_r-posix
+
+
+EXTRA_DIST += strerror_r.c
+
+EXTRA_libtests_a_SOURCES += strerror_r.c
+
+## end gnulib module strerror_r-posix
+
+## begin gnulib module strerror_r-posix-tests
+
+TESTS += test-strerror_r
+check_PROGRAMS += test-strerror_r
+EXTRA_DIST += test-strerror_r.c signature.h macros.h
+
+## end gnulib module strerror_r-posix-tests
+
## begin gnulib module string-tests
TESTS += test-string
@@ -1230,6 +1680,148 @@ EXTRA_DIST += test-symlink.h test-symlink.c signature.h macros.h
## end gnulib module symlink-tests
+## begin gnulib module sys_ioctl
+
+BUILT_SOURCES += sys/ioctl.h
+
+# We need the following in order to create <sys/ioctl.h> when the system
+# does not have a complete one.
+sys/ioctl.h: sys_ioctl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
+ $(AM_V_at)$(MKDIR_P) sys
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''HAVE_SYS_IOCTL_H''@|$(HAVE_SYS_IOCTL_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_SYS_IOCTL_H''@|$(NEXT_SYS_IOCTL_H)|g' \
+ -e 's/@''GNULIB_IOCTL''@/$(GNULIB_IOCTL)/g' \
+ -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H)|g' \
+ -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \
+ -e 's|@''REPLACE_IOCTL''@|$(REPLACE_IOCTL)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/sys_ioctl.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += sys/ioctl.h sys/ioctl.h-t
+MOSTLYCLEANDIRS += sys
+
+EXTRA_DIST += sys_ioctl.in.h
+
+## end gnulib module sys_ioctl
+
+## begin gnulib module sys_ioctl-tests
+
+TESTS += test-sys_ioctl
+check_PROGRAMS += test-sys_ioctl
+EXTRA_DIST += test-sys_ioctl.c
+
+## end gnulib module sys_ioctl-tests
+
+## begin gnulib module sys_select
+
+BUILT_SOURCES += sys/select.h
+
+# We need the following in order to create <sys/select.h> when the system
+# doesn't have one that works with the given compiler.
+sys/select.h: sys_select.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
+ $(AM_V_at)$(MKDIR_P) sys
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_SYS_SELECT_H''@|$(NEXT_SYS_SELECT_H)|g' \
+ -e 's|@''HAVE_SYS_SELECT_H''@|$(HAVE_SYS_SELECT_H)|g' \
+ -e 's/@''GNULIB_PSELECT''@/$(GNULIB_PSELECT)/g' \
+ -e 's/@''GNULIB_SELECT''@/$(GNULIB_SELECT)/g' \
+ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
+ -e 's|@''HAVE_PSELECT''@|$(HAVE_PSELECT)|g' \
+ -e 's|@''REPLACE_PSELECT''@|$(REPLACE_PSELECT)|g' \
+ -e 's|@''REPLACE_SELECT''@|$(REPLACE_SELECT)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/sys_select.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += sys/select.h sys/select.h-t
+MOSTLYCLEANDIRS += sys
+
+EXTRA_DIST += sys_select.in.h
+
+## end gnulib module sys_select
+
+## begin gnulib module sys_select-tests
+
+TESTS += test-sys_select
+check_PROGRAMS += test-sys_select
+EXTRA_DIST += test-sys_select.c signature.h
+
+## end gnulib module sys_select-tests
+
+## begin gnulib module sys_socket
+
+BUILT_SOURCES += sys/socket.h
+libtests_a_SOURCES += sys_socket.c
+
+# We need the following in order to create <sys/socket.h> when the system
+# doesn't have one that works with the given compiler.
+sys/socket.h: sys_socket.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_at)$(MKDIR_P) sys
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \
+ -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \
+ -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
+ -e 's/@''GNULIB_SOCKET''@/$(GNULIB_SOCKET)/g' \
+ -e 's/@''GNULIB_CONNECT''@/$(GNULIB_CONNECT)/g' \
+ -e 's/@''GNULIB_ACCEPT''@/$(GNULIB_ACCEPT)/g' \
+ -e 's/@''GNULIB_BIND''@/$(GNULIB_BIND)/g' \
+ -e 's/@''GNULIB_GETPEERNAME''@/$(GNULIB_GETPEERNAME)/g' \
+ -e 's/@''GNULIB_GETSOCKNAME''@/$(GNULIB_GETSOCKNAME)/g' \
+ -e 's/@''GNULIB_GETSOCKOPT''@/$(GNULIB_GETSOCKOPT)/g' \
+ -e 's/@''GNULIB_LISTEN''@/$(GNULIB_LISTEN)/g' \
+ -e 's/@''GNULIB_RECV''@/$(GNULIB_RECV)/g' \
+ -e 's/@''GNULIB_SEND''@/$(GNULIB_SEND)/g' \
+ -e 's/@''GNULIB_RECVFROM''@/$(GNULIB_RECVFROM)/g' \
+ -e 's/@''GNULIB_SENDTO''@/$(GNULIB_SENDTO)/g' \
+ -e 's/@''GNULIB_SETSOCKOPT''@/$(GNULIB_SETSOCKOPT)/g' \
+ -e 's/@''GNULIB_SHUTDOWN''@/$(GNULIB_SHUTDOWN)/g' \
+ -e 's/@''GNULIB_ACCEPT4''@/$(GNULIB_ACCEPT4)/g' \
+ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
+ -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \
+ -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \
+ -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY''@|$(HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY)|g' \
+ -e 's|@''HAVE_SA_FAMILY_T''@|$(HAVE_SA_FAMILY_T)|g' \
+ -e 's|@''HAVE_ACCEPT4''@|$(HAVE_ACCEPT4)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/sys_socket.in.h; \
+ } > $@-t && \
+ mv -f $@-t $@
+MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t
+MOSTLYCLEANDIRS += sys
+
+EXTRA_DIST += sys_socket.in.h
+
+## end gnulib module sys_socket
+
+## begin gnulib module sys_socket-tests
+
+TESTS += test-sys_socket
+check_PROGRAMS += test-sys_socket
+EXTRA_DIST += test-sys_socket.c
+
+## end gnulib module sys_socket-tests
+
## begin gnulib module sys_stat-tests
TESTS += test-sys_stat
@@ -1254,6 +1846,40 @@ EXTRA_DIST += test-sys_types.c
## end gnulib module sys_types-tests
+## begin gnulib module sys_uio
+
+BUILT_SOURCES += sys/uio.h
+
+# We need the following in order to create <sys/uio.h> when the system
+# doesn't have one that works with the given compiler.
+sys/uio.h: sys_uio.in.h $(top_builddir)/config.status
+ $(AM_V_at)$(MKDIR_P) sys
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_SYS_UIO_H''@|$(NEXT_SYS_UIO_H)|g' \
+ -e 's|@''HAVE_SYS_UIO_H''@|$(HAVE_SYS_UIO_H)|g' \
+ < $(srcdir)/sys_uio.in.h; \
+ } > $@-t && \
+ mv -f $@-t $@
+MOSTLYCLEANFILES += sys/uio.h sys/uio.h-t
+MOSTLYCLEANDIRS += sys
+
+EXTRA_DIST += sys_uio.in.h
+
+## end gnulib module sys_uio
+
+## begin gnulib module sys_uio-tests
+
+TESTS += test-sys_uio
+check_PROGRAMS += test-sys_uio
+EXTRA_DIST += test-sys_uio.c
+
+## end gnulib module sys_uio-tests
+
## begin gnulib module test-framework-sh-tests
TESTS += test-init.sh
@@ -1317,12 +1943,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
diff --git a/gnulib-tests/inet_pton.c b/gnulib-tests/inet_pton.c
new file mode 100644
index 0000000..c10b6f2
--- /dev/null
+++ b/gnulib-tests/inet_pton.c
@@ -0,0 +1,268 @@
+/* inet_pton.c -- convert IPv4 and IPv6 addresses from text to binary form
+
+ Copyright (C) 2006, 2008-2018 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 <https://www.gnu.org/licenses/>. */
+
+/*
+ * Copyright (c) 1996,1999 by Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ */
+
+#include <config.h>
+
+/* Specification. */
+#include <arpa/inet.h>
+
+#if HAVE_DECL_INET_PTON
+
+# undef inet_pton
+
+int
+rpl_inet_pton (int af, const char *restrict src, void *restrict dst)
+{
+ return inet_pton (af, src, dst);
+}
+
+#else
+
+# include <c-ctype.h>
+# include <string.h>
+# include <errno.h>
+
+# define NS_INADDRSZ 4
+# define NS_IN6ADDRSZ 16
+# define NS_INT16SZ 2
+
+/*
+ * WARNING: Don't even consider trying to compile this on a system where
+ * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
+ */
+
+static int inet_pton4 (const char *src, unsigned char *dst);
+# if HAVE_IPV6
+static int inet_pton6 (const char *src, unsigned char *dst);
+# endif
+
+/* int
+ * inet_pton(af, src, dst)
+ * convert from presentation format (which usually means ASCII printable)
+ * to network format (which is usually some kind of binary format).
+ * return:
+ * 1 if the address was valid for the specified address family
+ * 0 if the address wasn't valid ('dst' is untouched in this case)
+ * -1 if some other error occurred ('dst' is untouched in this case, too)
+ * author:
+ * Paul Vixie, 1996.
+ */
+int
+inet_pton (int af, const char *restrict src, void *restrict dst)
+{
+ switch (af)
+ {
+ case AF_INET:
+ return (inet_pton4 (src, dst));
+
+# if HAVE_IPV6
+ case AF_INET6:
+ return (inet_pton6 (src, dst));
+# endif
+
+ default:
+ errno = EAFNOSUPPORT;
+ return (-1);
+ }
+ /* NOTREACHED */
+}
+
+/* int
+ * inet_pton4(src, dst)
+ * like inet_aton() but without all the hexadecimal, octal (with the
+ * exception of 0) and shorthand.
+ * return:
+ * 1 if 'src' is a valid dotted quad, else 0.
+ * notice:
+ * does not touch 'dst' unless it's returning 1.
+ * author:
+ * Paul Vixie, 1996.
+ */
+static int
+inet_pton4 (const char *restrict src, unsigned char *restrict dst)
+{
+ int saw_digit, octets, ch;
+ unsigned char tmp[NS_INADDRSZ], *tp;
+
+ saw_digit = 0;
+ octets = 0;
+ *(tp = tmp) = 0;
+ while ((ch = *src++) != '\0')
+ {
+
+ if (ch >= '0' && ch <= '9')
+ {
+ unsigned new = *tp * 10 + (ch - '0');
+
+ if (saw_digit && *tp == 0)
+ return (0);
+ if (new > 255)
+ return (0);
+ *tp = new;
+ if (!saw_digit)
+ {
+ if (++octets > 4)
+ return (0);
+ saw_digit = 1;
+ }
+ }
+ else if (ch == '.' && saw_digit)
+ {
+ if (octets == 4)
+ return (0);
+ *++tp = 0;
+ saw_digit = 0;
+ }
+ else
+ return (0);
+ }
+ if (octets < 4)
+ return (0);
+ memcpy (dst, tmp, NS_INADDRSZ);
+ return (1);
+}
+
+# if HAVE_IPV6
+
+/* int
+ * inet_pton6(src, dst)
+ * convert presentation level address to network order binary form.
+ * return:
+ * 1 if 'src' is a valid [RFC1884 2.2] address, else 0.
+ * notice:
+ * (1) does not touch 'dst' unless it's returning 1.
+ * (2) :: in a full address is silently ignored.
+ * credit:
+ * inspired by Mark Andrews.
+ * author:
+ * Paul Vixie, 1996.
+ */
+static int
+inet_pton6 (const char *restrict src, unsigned char *restrict dst)
+{
+ static const char xdigits[] = "0123456789abcdef";
+ unsigned char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp;
+ const char *curtok;
+ int ch, saw_xdigit;
+ unsigned val;
+
+ tp = memset (tmp, '\0', NS_IN6ADDRSZ);
+ endp = tp + NS_IN6ADDRSZ;
+ colonp = NULL;
+ /* Leading :: requires some special handling. */
+ if (*src == ':')
+ if (*++src != ':')
+ return (0);
+ curtok = src;
+ saw_xdigit = 0;
+ val = 0;
+ while ((ch = c_tolower (*src++)) != '\0')
+ {
+ const char *pch;
+
+ pch = strchr (xdigits, ch);
+ if (pch != NULL)
+ {
+ val <<= 4;
+ val |= (pch - xdigits);
+ if (val > 0xffff)
+ return (0);
+ saw_xdigit = 1;
+ continue;
+ }
+ if (ch == ':')
+ {
+ curtok = src;
+ if (!saw_xdigit)
+ {
+ if (colonp)
+ return (0);
+ colonp = tp;
+ continue;
+ }
+ else if (*src == '\0')
+ {
+ return (0);
+ }
+ if (tp + NS_INT16SZ > endp)
+ return (0);
+ *tp++ = (u_char) (val >> 8) & 0xff;
+ *tp++ = (u_char) val & 0xff;
+ saw_xdigit = 0;
+ val = 0;
+ continue;
+ }
+ if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) &&
+ inet_pton4 (curtok, tp) > 0)
+ {
+ tp += NS_INADDRSZ;
+ saw_xdigit = 0;
+ break; /* '\0' was seen by inet_pton4(). */
+ }
+ return (0);
+ }
+ if (saw_xdigit)
+ {
+ if (tp + NS_INT16SZ > endp)
+ return (0);
+ *tp++ = (u_char) (val >> 8) & 0xff;
+ *tp++ = (u_char) val & 0xff;
+ }
+ if (colonp != NULL)
+ {
+ /*
+ * Since some memmove()'s erroneously fail to handle
+ * overlapping regions, we'll do the shift by hand.
+ */
+ const int n = tp - colonp;
+ int i;
+
+ if (tp == endp)
+ return (0);
+ for (i = 1; i <= n; i++)
+ {
+ endp[-i] = colonp[n - i];
+ colonp[n - i] = 0;
+ }
+ tp = endp;
+ }
+ if (tp != endp)
+ return (0);
+ memcpy (dst, tmp, NS_IN6ADDRSZ);
+ return (1);
+}
+
+# endif
+
+#endif
diff --git a/gnulib-tests/init.sh b/gnulib-tests/init.sh
index 584194f..93d14f5 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-2017 Free Software Foundation, Inc.
+# Copyright (C) 2009-2018 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
@@ -13,7 +13,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Using this file in a test
# =========================
@@ -62,6 +62,19 @@
ME_=`expr "./$0" : '.*/\(.*\)$'`
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+ # contains only /bin. Note that ksh looks also at the FPATH variable,
+ # so we have to set that as well for the test.
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+ || PATH_SEPARATOR=';'
+ }
+fi
+
# We use a trap below for cleanup. This requires us to go through
# hoops to get the right exit status transported through the handler.
# So use 'Exit STATUS' instead of 'exit STATUS' inside of the tests.
@@ -250,7 +263,7 @@ test -n "$BASH_VERSION" && unalias -a
# That is part of the shell-selection test above. Why use aliases rather
# than functions? Because support for hyphen-containing aliases is more
# widespread than that for hyphen-containing function names.
-test -n "$EXEEXT" && shopt -s expand_aliases
+test -n "$EXEEXT" && test -n "$BASH_VERSION" && shopt -s expand_aliases
# Enable glibc's malloc-perturbing option.
# This is useful for exposing code that depends on the fact that
@@ -429,13 +442,13 @@ path_prepend_ ()
path_dir_=$1
case $path_dir_ in
'') fail_ "invalid path dir: '$1'";;
- /*) abs_path_dir_=$path_dir_;;
+ /* | ?:*) abs_path_dir_=$path_dir_;;
*) abs_path_dir_=$initial_cwd_/$path_dir_;;
esac
case $abs_path_dir_ in
- *:*) fail_ "invalid path dir: '$abs_path_dir_'";;
+ *$PATH_SEPARATOR*) fail_ "invalid path dir: '$abs_path_dir_'";;
esac
- PATH="$abs_path_dir_:$PATH"
+ PATH="$abs_path_dir_$PATH_SEPARATOR$PATH"
# Create an alias, FOO, for each FOO.exe in this directory.
create_exe_shims_ "$abs_path_dir_" \
@@ -514,7 +527,7 @@ rand_bytes_ ()
fi
n_plus_50_=`expr $n_ + 50`
- cmds_='date; date +%N; free; who -a; w; ps auxww; ps ef; netstat -n'
+ cmds_='date; date +%N; free; who -a; w; ps auxww; ps -ef'
data_=` (eval "$cmds_") 2>&1 | gzip `
# Ensure that $data_ has length at least 50+$n_
diff --git a/gnulib-tests/inttypes.in.h b/gnulib-tests/inttypes.in.h
index 69b12a8..ca3cec5 100644
--- a/gnulib-tests/inttypes.in.h
+++ b/gnulib-tests/inttypes.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006-2017 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2018 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Derek Price.
This file is part of gnulib.
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/*
* ISO C 99 <inttypes.h> for platforms that lack it.
diff --git a/gnulib-tests/ioctl.c b/gnulib-tests/ioctl.c
new file mode 100644
index 0000000..140c7b6
--- /dev/null
+++ b/gnulib-tests/ioctl.c
@@ -0,0 +1,92 @@
+/* ioctl.c --- wrappers for Windows ioctl function
+
+ Copyright (C) 2008-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Paolo Bonzini */
+
+#include <config.h>
+
+#include <sys/ioctl.h>
+
+#include <stdarg.h>
+
+#if HAVE_IOCTL
+
+/* Provide a wrapper with the POSIX prototype. */
+# undef ioctl
+int
+rpl_ioctl (int fd, int request, ... /* {void *,char *} arg */)
+{
+ void *buf;
+ va_list args;
+
+ va_start (args, request);
+ buf = va_arg (args, void *);
+ va_end (args);
+
+ /* Cast 'request' so that when the system's ioctl function takes a 64-bit
+ request argument, the value gets zero-extended, not sign-extended. */
+ return ioctl (fd, (unsigned int) request, buf);
+}
+
+#else /* mingw */
+
+# include <errno.h>
+
+/* Get HANDLE. */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+
+# include "fd-hook.h"
+/* Get _get_osfhandle. */
+# if GNULIB_MSVC_NOTHROW
+# include "msvc-nothrow.h"
+# else
+# include <io.h>
+# endif
+
+static int
+primary_ioctl (int fd, int request, void *arg)
+{
+ /* We don't support FIONBIO on pipes here. If you want to make pipe
+ fds non-blocking, use the gnulib 'nonblocking' module, until
+ gnulib implements fcntl F_GETFL / F_SETFL with O_NONBLOCK. */
+
+ if ((HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE)
+ errno = ENOSYS;
+ else
+ errno = EBADF;
+ return -1;
+}
+
+int
+ioctl (int fd, int request, ... /* {void *,char *} arg */)
+{
+ void *arg;
+ va_list args;
+
+ va_start (args, request);
+ arg = va_arg (args, void *);
+ va_end (args);
+
+# if WINDOWS_SOCKETS
+ return execute_all_ioctl_hooks (primary_ioctl, fd, request, arg);
+# else
+ return primary_ioctl (fd, request, arg);
+# endif
+}
+
+#endif
diff --git a/gnulib-tests/link.c b/gnulib-tests/link.c
index e821e2d..8212723 100644
--- a/gnulib-tests/link.c
+++ b/gnulib-tests/link.c
@@ -1,6 +1,6 @@
/* Emulate link on platforms that lack it, namely native Windows platforms.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/listen.c b/gnulib-tests/listen.c
new file mode 100644
index 0000000..00627f6
--- /dev/null
+++ b/gnulib-tests/listen.c
@@ -0,0 +1,49 @@
+/* listen.c --- wrappers for Windows listen function
+
+ Copyright (C) 2008-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Paolo Bonzini */
+
+#include <config.h>
+
+#define WIN32_LEAN_AND_MEAN
+/* Get winsock2.h. */
+#include <sys/socket.h>
+
+/* Get set_winsock_errno, FD_TO_SOCKET etc. */
+#include "w32sock.h"
+
+#undef listen
+
+int
+rpl_listen (int fd, int backlog)
+{
+ SOCKET sock = FD_TO_SOCKET (fd);
+
+ if (sock == INVALID_SOCKET)
+ {
+ errno = EBADF;
+ return -1;
+ }
+ else
+ {
+ int r = listen (sock, backlog);
+ if (r < 0)
+ set_winsock_errno ();
+
+ return r;
+ }
+}
diff --git a/gnulib-tests/localename.c b/gnulib-tests/localename.c
index 2c2d22b..37a2b65 100644
--- a/gnulib-tests/localename.c
+++ b/gnulib-tests/localename.c
@@ -1,5 +1,5 @@
/* Determine name of the currently selected locale.
- Copyright (C) 1995-2017 Free Software Foundation, Inc.
+ Copyright (C) 1995-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper <drepper@gnu.org>, 1995. */
/* Native Windows code written by Tor Lillqvist <tml@iki.fi>. */
@@ -40,7 +40,7 @@
# if defined __APPLE__ && defined __MACH__
# include <xlocale.h>
# endif
-# if __GLIBC__ >= 2 && !defined __UCLIBC__
+# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || (defined __linux__ && HAVE_LANGINFO_H) || defined __CYGWIN__
# include <langinfo.h>
# endif
# if !defined IN_LIBINTL
@@ -61,7 +61,7 @@ extern char * getlocalename_l(int, locale_t);
# endif
#endif
-#if defined _WIN32 || defined __WIN32__
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
# define WINDOWS_NATIVE
# if !defined IN_LIBINTL
# include "glthread/lock.h"
@@ -1157,7 +1157,7 @@ gl_locale_name_canonicalize (char *name)
{
/* This conversion is based on a posting by
Deborah GoldSmith <goldsmit@apple.com> on 2005-03-08,
- http://lists.apple.com/archives/carbon-dev/2005/Mar/msg00293.html */
+ https://lists.apple.com/archives/carbon-dev/2005/Mar/msg00293.html */
/* Convert legacy (NeXTstep inherited) English names to Unix (ISO 639 and
ISO 3166) names. Prior to Mac OS X 10.3, there is no API for doing this.
@@ -1493,7 +1493,7 @@ gl_locale_name_from_win32_LANGID (LANGID langid)
/* Dispatch on language.
See also http://www.unicode.org/unicode/onlinedat/languages.html .
- For details about languages, see http://www.ethnologue.com/ . */
+ For details about languages, see https://www.ethnologue.com/ . */
switch (primary)
{
case LANG_AFRIKAANS:
@@ -2259,10 +2259,10 @@ gl_locale_name_from_win32_LANGID (LANGID langid)
}
return "wen";
case LANG_SOTHO:
- /* <http://www.microsoft.com/globaldev/reference/lcid-all.mspx> calls
- it "Sepedi"; according to
- <http://www.ethnologue.com/show_language.asp?code=nso>
- <http://www.ethnologue.com/show_language.asp?code=sot>
+ /* <https://msdn.microsoft.com/en-us/library/dd318693.aspx> calls
+ it "Sesotho sa Leboa"; according to
+ <https://www.ethnologue.com/show_language.asp?code=nso>
+ <https://www.ethnologue.com/show_language.asp?code=sot>
it's the same as Northern Sotho. */
switch (sub)
{
@@ -2592,7 +2592,7 @@ get_lcid (const char *locale_name)
#endif
-#if HAVE_USELOCALE /* glibc, Solaris >= 12 or Mac OS X */
+#if HAVE_USELOCALE /* glibc, Mac OS X, Solaris 11 OpenIndiana, or Solaris 12 */
/* Simple hash set of strings. We don't want to drag in lots of hash table
code here. */
@@ -2601,7 +2601,7 @@ get_lcid (const char *locale_name)
/* A hash function for NUL-terminated char* strings using
the method described by Bruno Haible.
- See http://www.haible.de/bruno/hashfunc.html. */
+ See https://www.haible.de/bruno/hashfunc.html. */
static size_t _GL_ATTRIBUTE_PURE
string_hash (const void *x)
{
@@ -2695,7 +2695,7 @@ gl_locale_name_thread_unsafe (int category, const char *categoryname)
# if __GLIBC__ >= 2 && !defined __UCLIBC__
/* Work around an incorrect definition of the _NL_LOCALE_NAME macro in
glibc < 2.12.
- See <http://sourceware.org/bugzilla/show_bug.cgi?id=10968>. */
+ See <https://sourceware.org/bugzilla/show_bug.cgi?id=10968>. */
const char *name =
nl_langinfo (_NL_ITEM ((category), _NL_ITEM_INDEX (-1)));
if (name[0] == '\0')
@@ -2703,7 +2703,10 @@ gl_locale_name_thread_unsafe (int category, const char *categoryname)
nl_langinfo (_NL_LOCALE_NAME (category)). */
name = thread_locale->__names[category];
return name;
-# elif defined __FreeBSD__ || (defined __APPLE__ && defined __MACH__)
+# elif defined __linux__ && HAVE_LANGINFO_H && defined NL_LOCALE_NAME
+ /* musl libc */
+ return nl_langinfo_l (NL_LOCALE_NAME (category), thread_locale);
+# elif (defined __FreeBSD__ || defined __DragonFly__) || (defined __APPLE__ && defined __MACH__)
/* FreeBSD, Mac OS X */
int mask;
@@ -2731,9 +2734,27 @@ gl_locale_name_thread_unsafe (int category, const char *categoryname)
return "";
}
return querylocale (mask, thread_locale);
-# elif defined __sun && HAVE_GETLOCALENAME_L
+# elif defined __sun
+# if HAVE_GETLOCALENAME_L
/* Solaris >= 12. */
return getlocalename_l (category, thread_locale);
+# else
+ /* Solaris 11 OpenIndiana.
+ For the internal structure of locale objects, see
+ https://github.com/OpenIndiana/illumos-gate/blob/master/usr/src/lib/libc/port/locale/localeimpl.h */
+ switch (category)
+ {
+ case LC_CTYPE:
+ case LC_NUMERIC:
+ case LC_TIME:
+ case LC_COLLATE:
+ case LC_MONETARY:
+ case LC_MESSAGES:
+ return ((const char * const *) thread_locale)[category];
+ default: /* We shouldn't get here. */
+ return "";
+ }
+# endif
# elif defined __CYGWIN__
/* Cygwin < 2.6 lacks uselocale and thread-local locales altogether.
Cygwin <= 2.6.1 lacks NL_LOCALE_NAME, requiring peeking inside
diff --git a/gnulib-tests/localename.h b/gnulib-tests/localename.h
index c9f321d..1b9e2bb 100644
--- a/gnulib-tests/localename.h
+++ b/gnulib-tests/localename.h
@@ -1,5 +1,5 @@
/* Determine name of the currently selected locale.
- Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef _GL_LOCALENAME_H
#define _GL_LOCALENAME_H
diff --git a/gnulib-tests/lseek.c b/gnulib-tests/lseek.c
index 3b2fdf2..e37aadf 100644
--- a/gnulib-tests/lseek.c
+++ b/gnulib-tests/lseek.c
@@ -1,5 +1,5 @@
/* An lseek() function that detects pipes.
- Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ with this program; if not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@@ -24,7 +24,11 @@
/* Get GetFileType. */
# include <windows.h>
/* Get _get_osfhandle. */
-# include "msvc-nothrow.h"
+# if GNULIB_MSVC_NOTHROW
+# include "msvc-nothrow.h"
+# else
+# include <io.h>
+# endif
#else
# include <sys/stat.h>
#endif
diff --git a/gnulib-tests/macros.h b/gnulib-tests/macros.h
index 53b270c..dd6357a 100644
--- a/gnulib-tests/macros.h
+++ b/gnulib-tests/macros.h
@@ -1,5 +1,5 @@
/* Common macros used by gnulib tests.
- Copyright (C) 2006-2017 Free Software Foundation, Inc.
+ Copyright (C) 2006-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* This file contains macros that are used by many gnulib tests.
@@ -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
new file mode 100644
index 0000000..8c3be40
--- /dev/null
+++ b/gnulib-tests/nanosleep.c
@@ -0,0 +1,276 @@
+/* Provide a replacement for the POSIX nanosleep function.
+
+ Copyright (C) 1999-2000, 2002, 2004-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* written by Jim Meyering
+ and Bruno Haible for the native Windows part */
+
+#include <config.h>
+
+#include <time.h>
+
+#include "intprops.h"
+#include "sig-handler.h"
+#include "verify.h"
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/select.h>
+#include <signal.h>
+
+#include <sys/time.h>
+#include <errno.h>
+
+#include <unistd.h>
+
+
+enum { BILLION = 1000 * 1000 * 1000 };
+
+#if HAVE_BUG_BIG_NANOSLEEP
+
+int
+nanosleep (const struct timespec *requested_delay,
+ struct timespec *remaining_delay)
+# undef nanosleep
+{
+ /* nanosleep mishandles large sleeps due to internal overflow problems.
+ The worst known case of this is Linux 2.6.9 with glibc 2.3.4, which
+ can't sleep more than 24.85 days (2^31 milliseconds). Similarly,
+ cygwin 1.5.x, which can't sleep more than 49.7 days (2^32 milliseconds).
+ Solve this by breaking the sleep up into smaller chunks. */
+
+ if (requested_delay->tv_nsec < 0 || BILLION <= requested_delay->tv_nsec)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ {
+ /* Verify that time_t is large enough. */
+ verify (TYPE_MAXIMUM (time_t) / 24 / 24 / 60 / 60);
+ const time_t limit = 24 * 24 * 60 * 60;
+ time_t seconds = requested_delay->tv_sec;
+ struct timespec intermediate;
+ intermediate.tv_nsec = requested_delay->tv_nsec;
+
+ while (limit < seconds)
+ {
+ int result;
+ intermediate.tv_sec = limit;
+ result = nanosleep (&intermediate, remaining_delay);
+ seconds -= limit;
+ if (result)
+ {
+ if (remaining_delay)
+ remaining_delay->tv_sec += seconds;
+ return result;
+ }
+ intermediate.tv_nsec = 0;
+ }
+ intermediate.tv_sec = seconds;
+ return nanosleep (&intermediate, remaining_delay);
+ }
+}
+
+#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Native Windows platforms. */
+
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+
+/* The Windows API function Sleep() has a resolution of about 15 ms and takes
+ at least 5 ms to execute. We use this function for longer time periods.
+ Additionally, we use busy-looping over short time periods, to get a
+ resolution of about 0.01 ms. In order to measure such short timespans,
+ we use the QueryPerformanceCounter() function. */
+
+int
+nanosleep (const struct timespec *requested_delay,
+ struct timespec *remaining_delay)
+{
+ static bool initialized;
+ /* Number of performance counter increments per nanosecond,
+ or zero if it could not be determined. */
+ static double ticks_per_nanosecond;
+
+ if (requested_delay->tv_nsec < 0 || BILLION <= requested_delay->tv_nsec)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ /* For requested delays of one second or more, 15ms resolution is
+ sufficient. */
+ if (requested_delay->tv_sec == 0)
+ {
+ if (!initialized)
+ {
+ /* Initialize ticks_per_nanosecond. */
+ LARGE_INTEGER ticks_per_second;
+
+ if (QueryPerformanceFrequency (&ticks_per_second))
+ ticks_per_nanosecond =
+ (double) ticks_per_second.QuadPart / 1000000000.0;
+
+ initialized = true;
+ }
+ if (ticks_per_nanosecond)
+ {
+ /* QueryPerformanceFrequency worked. We can use
+ QueryPerformanceCounter. Use a combination of Sleep and
+ busy-looping. */
+ /* Number of milliseconds to pass to the Sleep function.
+ Since Sleep can take up to 8 ms less or 8 ms more than requested
+ (or maybe more if the system is loaded), we subtract 10 ms. */
+ int sleep_millis = (int) requested_delay->tv_nsec / 1000000 - 10;
+ /* Determine how many ticks to delay. */
+ LONGLONG wait_ticks = requested_delay->tv_nsec * ticks_per_nanosecond;
+ /* Start. */
+ LARGE_INTEGER counter_before;
+ if (QueryPerformanceCounter (&counter_before))
+ {
+ /* Wait until the performance counter has reached this value.
+ We don't need to worry about overflow, because the performance
+ counter is reset at reboot, and with a frequency of 3.6E6
+ ticks per second 63 bits suffice for over 80000 years. */
+ LONGLONG wait_until = counter_before.QuadPart + wait_ticks;
+ /* Use Sleep for the longest part. */
+ if (sleep_millis > 0)
+ Sleep (sleep_millis);
+ /* Busy-loop for the rest. */
+ for (;;)
+ {
+ LARGE_INTEGER counter_after;
+ if (!QueryPerformanceCounter (&counter_after))
+ /* QueryPerformanceCounter failed, but succeeded earlier.
+ Should not happen. */
+ break;
+ if (counter_after.QuadPart >= wait_until)
+ /* The requested time has elapsed. */
+ break;
+ }
+ goto done;
+ }
+ }
+ }
+ /* Implementation for long delays and as fallback. */
+ Sleep (requested_delay->tv_sec * 1000 + requested_delay->tv_nsec / 1000000);
+
+ done:
+ /* Sleep is not interruptible. So there is no remaining delay. */
+ if (remaining_delay != NULL)
+ {
+ remaining_delay->tv_sec = 0;
+ remaining_delay->tv_nsec = 0;
+ }
+ return 0;
+}
+
+#else
+/* Unix platforms lacking nanosleep. */
+
+/* Some systems (MSDOS) don't have SIGCONT.
+ Using SIGTERM here turns the signal-handling code below
+ into a no-op on such systems. */
+# ifndef SIGCONT
+# define SIGCONT SIGTERM
+# endif
+
+static sig_atomic_t volatile suspended;
+
+/* Handle SIGCONT. */
+
+static void
+sighandler (int sig)
+{
+ suspended = 1;
+}
+
+/* Suspend execution for at least *TS_DELAY seconds. */
+
+static int
+my_usleep (const struct timespec *ts_delay)
+{
+ struct timeval tv_delay;
+ tv_delay.tv_sec = ts_delay->tv_sec;
+ tv_delay.tv_usec = (ts_delay->tv_nsec + 999) / 1000;
+ if (tv_delay.tv_usec == 1000000)
+ {
+ if (tv_delay.tv_sec == TYPE_MAXIMUM (time_t))
+ tv_delay.tv_usec = 1000000 - 1; /* close enough */
+ else
+ {
+ tv_delay.tv_sec++;
+ tv_delay.tv_usec = 0;
+ }
+ }
+ return select (0, NULL, NULL, NULL, &tv_delay);
+}
+
+/* Suspend execution for at least *REQUESTED_DELAY seconds. The
+ *REMAINING_DELAY part isn't implemented yet. */
+
+int
+nanosleep (const struct timespec *requested_delay,
+ struct timespec *remaining_delay)
+{
+ static bool initialized;
+
+ if (requested_delay->tv_nsec < 0 || BILLION <= requested_delay->tv_nsec)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ /* set up sig handler */
+ if (! initialized)
+ {
+ struct sigaction oldact;
+
+ sigaction (SIGCONT, NULL, &oldact);
+ if (get_handler (&oldact) != SIG_IGN)
+ {
+ struct sigaction newact;
+
+ newact.sa_handler = sighandler;
+ sigemptyset (&newact.sa_mask);
+ newact.sa_flags = 0;
+ sigaction (SIGCONT, &newact, NULL);
+ }
+ initialized = true;
+ }
+
+ suspended = 0;
+
+ if (my_usleep (requested_delay) == -1)
+ {
+ if (suspended)
+ {
+ /* Calculate time remaining. */
+ /* FIXME: the code in sleep doesn't use this, so there's no
+ rush to implement it. */
+
+ errno = EINTR;
+ }
+ return -1;
+ }
+
+ /* FIXME: Restore sig handler? */
+
+ return 0;
+}
+#endif
diff --git a/gnulib-tests/nap.h b/gnulib-tests/nap.h
new file mode 100644
index 0000000..97a3cca
--- /dev/null
+++ b/gnulib-tests/nap.h
@@ -0,0 +1,155 @@
+/* Assist in file system timestamp tests.
+ Copyright (C) 2009-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#ifndef GLTEST_NAP_H
+# define GLTEST_NAP_H
+
+# include <limits.h>
+# include <stdbool.h>
+
+# include <intprops.h>
+
+/* Name of the witness file. */
+#define TEMPFILE BASE "nap.tmp"
+
+/* File descriptor used for the witness file. */
+static int nap_fd = -1;
+
+/* Return A - B, in ns.
+ Return 0 if the true result would be negative.
+ Return INT_MAX if the true result would be greater than INT_MAX. */
+static int
+diff_timespec (struct timespec a, struct timespec b)
+{
+ time_t as = a.tv_sec;
+ time_t bs = b.tv_sec;
+ int ans = a.tv_nsec;
+ int bns = b.tv_nsec;
+ int sdiff;
+
+ ASSERT (0 <= ans && ans < 2000000000);
+ ASSERT (0 <= bns && bns < 2000000000);
+
+ if (! (bs < as || (bs == as && bns < ans)))
+ return 0;
+
+ if (INT_SUBTRACT_WRAPV (as, bs, &sdiff)
+ || INT_MULTIPLY_WRAPV (sdiff, 1000000000, &sdiff)
+ || INT_ADD_WRAPV (sdiff, ans - bns, &sdiff))
+ return INT_MAX;
+
+ return sdiff;
+}
+
+/* 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
+nap_get_stat (struct stat *st, int do_write)
+{
+ if (do_write)
+ {
+ 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 mtime.
+ OLD_ST is the file's status, recently gotten. */
+static bool
+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);
+ nap_get_stat (&st, 1);
+
+ if (diff_timespec (get_stat_mtime (&st), get_stat_mtime (&old_st)))
+ return true;
+
+ return false;
+}
+
+static void
+clear_temp_file (void)
+{
+ if (0 <= nap_fd)
+ {
+ ASSERT (close (nap_fd) != -1);
+ ASSERT (unlink (TEMPFILE) != -1);
+ }
+}
+
+/* Sleep long enough to notice a timestamp difference on the file
+ system in the current directory. Use an adaptive approach, trying
+ to find the smallest delay which works on the current file system
+ to make the timestamp difference appear. Assert a maximum delay of
+ ~2 seconds, more precisely sum(2^n) from 0 to 30 = 2^31 - 1 = 2.1s.
+ Assumes that BASE is defined, and requires that the test module
+ depends on nanosleep. */
+static void
+nap (void)
+{
+ struct stat old_st;
+ static int delay = 1;
+
+ if (-1 == nap_fd)
+ {
+ atexit (clear_temp_file);
+ ASSERT ((nap_fd = creat (TEMPFILE, 0600)) != -1);
+ nap_get_stat (&old_st, 0);
+ }
+ else
+ {
+ ASSERT (0 <= nap_fd);
+ nap_get_stat (&old_st, 1);
+ }
+
+ if (1 < delay)
+ delay = delay / 2; /* Try half of the previous delay. */
+ ASSERT (0 < delay);
+
+ 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);
+}
+
+#endif /* GLTEST_NAP_H */
diff --git a/gnulib-tests/netinet_in.in.h b/gnulib-tests/netinet_in.in.h
new file mode 100644
index 0000000..0f26cf5
--- /dev/null
+++ b/gnulib-tests/netinet_in.in.h
@@ -0,0 +1,47 @@
+/* Substitute for <netinet/in.h>.
+ Copyright (C) 2007-2018 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, 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 <https://www.gnu.org/licenses/>. */
+
+#ifndef _@GUARD_PREFIX@_NETINET_IN_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+#if @HAVE_NETINET_IN_H@
+
+/* On many platforms, <netinet/in.h> assumes prior inclusion of
+ <sys/types.h>. */
+# include <sys/types.h>
+
+/* The include_next requires a split double-inclusion guard. */
+# @INCLUDE_NEXT@ @NEXT_NETINET_IN_H@
+
+#endif
+
+#ifndef _@GUARD_PREFIX@_NETINET_IN_H
+#define _@GUARD_PREFIX@_NETINET_IN_H
+
+#if !@HAVE_NETINET_IN_H@
+
+/* A platform that lacks <netinet/in.h>. */
+
+# include <sys/socket.h>
+
+#endif
+
+#endif /* _@GUARD_PREFIX@_NETINET_IN_H */
+#endif /* _@GUARD_PREFIX@_NETINET_IN_H */
diff --git a/gnulib-tests/null-ptr.h b/gnulib-tests/null-ptr.h
new file mode 100644
index 0000000..1ba0755
--- /dev/null
+++ b/gnulib-tests/null-ptr.h
@@ -0,0 +1,33 @@
+/* Return a NULL pointer, without letting the compiler know it.
+ Copyright (C) 2017-2018 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 <https://www.gnu.org/licenses/>. */
+
+#include <stdlib.h>
+
+/* Return NULL.
+ Usual compilers are not able to infer something about the return value. */
+static void *
+null_ptr (void)
+{
+ unsigned int x = rand ();
+ unsigned int y = x * x;
+ if (y & 2)
+ return (void *) -1;
+ else
+ return (void *) 0;
+}
+
+/* If you want to know why this always returns NULL, read
+ https://en.wikipedia.org/wiki/Quadratic_residue#Prime_power_modulus . */
diff --git a/gnulib-tests/open.c b/gnulib-tests/open.c
index 193dc45..b344f13 100644
--- a/gnulib-tests/open.c
+++ b/gnulib-tests/open.c
@@ -1,5 +1,5 @@
/* Open a descriptor to a file.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
@@ -38,6 +38,8 @@ orig_open (const char *filename, int flags, mode_t mode)
this include because of the preliminary #include <fcntl.h> above. */
#include "fcntl.h"
+#include "cloexec.h"
+
#include <errno.h>
#include <stdarg.h>
#include <string.h>
@@ -52,6 +54,13 @@ orig_open (const char *filename, int flags, mode_t mode)
int
open (const char *filename, int flags, ...)
{
+ /* 0 = unknown, 1 = yes, -1 = no. */
+#if GNULIB_defined_O_CLOEXEC
+ int have_cloexec = -1;
+#else
+ static int have_cloexec;
+#endif
+
mode_t mode;
int fd;
@@ -115,7 +124,25 @@ open (const char *filename, int flags, ...)
}
#endif
- fd = orig_open (filename, flags, mode);
+ fd = orig_open (filename,
+ flags & ~(have_cloexec <= 0 ? O_CLOEXEC : 0), mode);
+
+ if (flags & O_CLOEXEC)
+ {
+ if (! have_cloexec)
+ {
+ if (0 <= fd)
+ have_cloexec = 1;
+ else if (errno == EINVAL)
+ {
+ fd = orig_open (filename, flags & ~O_CLOEXEC, mode);
+ have_cloexec = -1;
+ }
+ }
+ if (have_cloexec < 0 && 0 <= fd)
+ set_cloexec_flag (fd, true);
+ }
+
#if REPLACE_FCHDIR
/* Implementing fchdir and fdopendir requires the ability to open a
diff --git a/gnulib-tests/opendir.c b/gnulib-tests/opendir.c
index 694a782..b77f540 100644
--- a/gnulib-tests/opendir.c
+++ b/gnulib-tests/opendir.c
@@ -1,5 +1,5 @@
/* Start reading the entries of a directory.
- Copyright (C) 2006-2017 Free Software Foundation, Inc.
+ Copyright (C) 2006-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/perror.c b/gnulib-tests/perror.c
new file mode 100644
index 0000000..827a37c
--- /dev/null
+++ b/gnulib-tests/perror.c
@@ -0,0 +1,49 @@
+/* Print a message describing error code.
+ Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ Written by Bruno Haible and Simon Josefsson.
+
+ 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 <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <stdio.h>
+
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "strerror-override.h"
+
+/* Use the system functions, not the gnulib overrides in this file. */
+#undef fprintf
+
+void
+perror (const char *string)
+{
+ char stackbuf[STACKBUF_LEN];
+ int ret;
+
+ /* Our implementation guarantees that this will be a non-empty
+ string, even if it returns EINVAL; and stackbuf should be sized
+ large enough to avoid ERANGE. */
+ ret = strerror_r (errno, stackbuf, sizeof stackbuf);
+ if (ret == ERANGE)
+ abort ();
+
+ if (string != NULL && *string != '\0')
+ fprintf (stderr, "%s: %s\n", string, stackbuf);
+ else
+ fprintf (stderr, "%s\n", stackbuf);
+}
diff --git a/gnulib-tests/pipe.c b/gnulib-tests/pipe.c
new file mode 100644
index 0000000..f87e11d
--- /dev/null
+++ b/gnulib-tests/pipe.c
@@ -0,0 +1,50 @@
+/* Create a pipe.
+ Copyright (C) 2009-2018 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, 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 <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <unistd.h>
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Native Windows API. */
+
+/* Get _pipe(). */
+# include <io.h>
+
+/* Get _O_BINARY. */
+# include <fcntl.h>
+
+int
+pipe (int fd[2])
+{
+ /* Mingw changes fd to {-1,-1} on failure, but this violates
+ http://austingroupbugs.net/view.php?id=467 */
+ int tmp[2];
+ int result = _pipe (tmp, 4096, _O_BINARY);
+ if (!result)
+ {
+ fd[0] = tmp[0];
+ fd[1] = tmp[1];
+ }
+ return result;
+}
+
+#else
+
+# error "This platform lacks a pipe function, and Gnulib doesn't provide a replacement. This is a bug in Gnulib."
+
+#endif
diff --git a/gnulib-tests/putenv.c b/gnulib-tests/putenv.c
index b55e262..556d5f8 100644
--- a/gnulib-tests/putenv.c
+++ b/gnulib-tests/putenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2017 Free Software
+/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2018 Free Software
Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C
@@ -15,7 +15,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/raise.c b/gnulib-tests/raise.c
new file mode 100644
index 0000000..3a29339
--- /dev/null
+++ b/gnulib-tests/raise.c
@@ -0,0 +1,81 @@
+/* Provide a non-threads replacement for the POSIX raise function.
+
+ Copyright (C) 2002-2003, 2005-2006, 2009-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* written by Jim Meyering and Bruno Haible */
+
+#include <config.h>
+
+/* Specification. */
+#include <signal.h>
+
+#if HAVE_RAISE
+/* Native Windows platform. */
+
+# include <errno.h>
+
+# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+# include "msvc-inval.h"
+# endif
+
+# undef raise
+
+# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+static int
+raise_nothrow (int sig)
+{
+ int result;
+
+ TRY_MSVC_INVAL
+ {
+ result = raise (sig);
+ }
+ CATCH_MSVC_INVAL
+ {
+ result = -1;
+ errno = EINVAL;
+ }
+ DONE_MSVC_INVAL;
+
+ return result;
+}
+# else
+# define raise_nothrow raise
+# endif
+
+#else
+/* An old Unix platform. */
+
+# include <unistd.h>
+
+# define rpl_raise raise
+
+#endif
+
+int
+rpl_raise (int sig)
+{
+#if GNULIB_defined_signal_blocking && GNULIB_defined_SIGPIPE
+ if (sig == SIGPIPE)
+ return _gl_raise_SIGPIPE ();
+#endif
+
+#if HAVE_RAISE
+ return raise_nothrow (sig);
+#else
+ return kill (getpid (), sig);
+#endif
+}
diff --git a/gnulib-tests/read-file.c b/gnulib-tests/read-file.c
index 2418053..af1ab8b 100644
--- a/gnulib-tests/read-file.c
+++ b/gnulib-tests/read-file.c
@@ -1,5 +1,5 @@
/* read-file.c -- read file contents into a string
- Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc.
Written by Simon Josefsson and Bruno Haible.
This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/read-file.h b/gnulib-tests/read-file.h
index 23e0920..bddeab3 100644
--- a/gnulib-tests/read-file.h
+++ b/gnulib-tests/read-file.h
@@ -1,5 +1,5 @@
/* read-file.h -- read file contents into a string
- Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef READ_FILE_H
#define READ_FILE_H
diff --git a/gnulib-tests/readdir.c b/gnulib-tests/readdir.c
index d1773af..c1c564d 100644
--- a/gnulib-tests/readdir.c
+++ b/gnulib-tests/readdir.c
@@ -1,5 +1,5 @@
/* Read the next entry of a directory.
- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/realloc.c b/gnulib-tests/realloc.c
index 526b487..7620b6a 100644
--- a/gnulib-tests/realloc.c
+++ b/gnulib-tests/realloc.c
@@ -1,6 +1,6 @@
/* realloc() function that is glibc compatible.
- Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2017 Free Software
+ Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2018 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -14,7 +14,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* written by Jim Meyering and Bruno Haible */
diff --git a/gnulib-tests/select.c b/gnulib-tests/select.c
new file mode 100644
index 0000000..92ca725
--- /dev/null
+++ b/gnulib-tests/select.c
@@ -0,0 +1,579 @@
+/* Emulation for select(2)
+ Contributed by Paolo Bonzini.
+
+ Copyright 2008-2018 Free Software Foundation, Inc.
+
+ This file is part of gnulib.
+
+ 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, 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 <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <alloca.h>
+#include <assert.h>
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Native Windows. */
+
+#include <sys/types.h>
+#include <errno.h>
+#include <limits.h>
+
+#include <winsock2.h>
+#include <windows.h>
+#include <io.h>
+#include <stdio.h>
+#include <conio.h>
+#include <time.h>
+
+/* Get the overridden 'struct timeval'. */
+#include <sys/time.h>
+
+#if GNULIB_MSVC_NOTHROW
+# include "msvc-nothrow.h"
+#else
+# include <io.h>
+#endif
+
+#undef select
+
+struct bitset {
+ unsigned char in[FD_SETSIZE / CHAR_BIT];
+ unsigned char out[FD_SETSIZE / CHAR_BIT];
+};
+
+/* Declare data structures for ntdll functions. */
+typedef struct _FILE_PIPE_LOCAL_INFORMATION {
+ ULONG NamedPipeType;
+ ULONG NamedPipeConfiguration;
+ ULONG MaximumInstances;
+ ULONG CurrentInstances;
+ ULONG InboundQuota;
+ ULONG ReadDataAvailable;
+ ULONG OutboundQuota;
+ ULONG WriteQuotaAvailable;
+ ULONG NamedPipeState;
+ ULONG NamedPipeEnd;
+} FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION;
+
+typedef struct _IO_STATUS_BLOCK
+{
+ union {
+ DWORD Status;
+ PVOID Pointer;
+ } u;
+ ULONG_PTR Information;
+} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
+
+typedef enum _FILE_INFORMATION_CLASS {
+ FilePipeLocalInformation = 24
+} FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;
+
+typedef DWORD (WINAPI *PNtQueryInformationFile)
+ (HANDLE, IO_STATUS_BLOCK *, VOID *, ULONG, FILE_INFORMATION_CLASS);
+
+#ifndef PIPE_BUF
+#define PIPE_BUF 512
+#endif
+
+static BOOL IsConsoleHandle (HANDLE h)
+{
+ DWORD mode;
+ return GetConsoleMode (h, &mode) != 0;
+}
+
+static BOOL
+IsSocketHandle (HANDLE h)
+{
+ WSANETWORKEVENTS ev;
+
+ if (IsConsoleHandle (h))
+ return FALSE;
+
+ /* Under Wine, it seems that getsockopt returns 0 for pipes too.
+ WSAEnumNetworkEvents instead distinguishes the two correctly. */
+ ev.lNetworkEvents = 0xDEADBEEF;
+ WSAEnumNetworkEvents ((SOCKET) h, NULL, &ev);
+ return ev.lNetworkEvents != 0xDEADBEEF;
+}
+
+/* Compute output fd_sets for libc descriptor FD (whose Windows handle is
+ H). */
+
+static int
+windows_poll_handle (HANDLE h, int fd,
+ struct bitset *rbits,
+ struct bitset *wbits,
+ struct bitset *xbits)
+{
+ BOOL read, write, except;
+ int i, ret;
+ INPUT_RECORD *irbuffer;
+ DWORD avail, nbuffer;
+ BOOL bRet;
+ IO_STATUS_BLOCK iosb;
+ FILE_PIPE_LOCAL_INFORMATION fpli;
+ static PNtQueryInformationFile NtQueryInformationFile;
+ static BOOL once_only;
+
+ read = write = except = FALSE;
+ switch (GetFileType (h))
+ {
+ case FILE_TYPE_DISK:
+ read = TRUE;
+ write = TRUE;
+ break;
+
+ case FILE_TYPE_PIPE:
+ if (!once_only)
+ {
+ NtQueryInformationFile = (PNtQueryInformationFile)
+ GetProcAddress (GetModuleHandle ("ntdll.dll"),
+ "NtQueryInformationFile");
+ once_only = TRUE;
+ }
+
+ if (PeekNamedPipe (h, NULL, 0, NULL, &avail, NULL) != 0)
+ {
+ if (avail)
+ read = TRUE;
+ }
+ else if (GetLastError () == ERROR_BROKEN_PIPE)
+ ;
+
+ else
+ {
+ /* It was the write-end of the pipe. Check if it is writable.
+ If NtQueryInformationFile fails, optimistically assume the pipe is
+ writable. This could happen on Windows 9x, where
+ NtQueryInformationFile is not available, or if we inherit a pipe
+ that doesn't permit FILE_READ_ATTRIBUTES access on the write end
+ (I think this should not happen since Windows XP SP2; WINE seems
+ fine too). Otherwise, ensure that enough space is available for
+ atomic writes. */
+ memset (&iosb, 0, sizeof (iosb));
+ memset (&fpli, 0, sizeof (fpli));
+
+ if (!NtQueryInformationFile
+ || NtQueryInformationFile (h, &iosb, &fpli, sizeof (fpli),
+ FilePipeLocalInformation)
+ || fpli.WriteQuotaAvailable >= PIPE_BUF
+ || (fpli.OutboundQuota < PIPE_BUF &&
+ fpli.WriteQuotaAvailable == fpli.OutboundQuota))
+ write = TRUE;
+ }
+ break;
+
+ case FILE_TYPE_CHAR:
+ write = TRUE;
+ if (!(rbits->in[fd / CHAR_BIT] & (1 << (fd & (CHAR_BIT - 1)))))
+ break;
+
+ ret = WaitForSingleObject (h, 0);
+ if (ret == WAIT_OBJECT_0)
+ {
+ if (!IsConsoleHandle (h))
+ {
+ read = TRUE;
+ break;
+ }
+
+ nbuffer = avail = 0;
+ bRet = GetNumberOfConsoleInputEvents (h, &nbuffer);
+
+ /* Screen buffers handles are filtered earlier. */
+ assert (bRet);
+ if (nbuffer == 0)
+ {
+ except = TRUE;
+ break;
+ }
+
+ irbuffer = (INPUT_RECORD *) alloca (nbuffer * sizeof (INPUT_RECORD));
+ bRet = PeekConsoleInput (h, irbuffer, nbuffer, &avail);
+ if (!bRet || avail == 0)
+ {
+ except = TRUE;
+ break;
+ }
+
+ for (i = 0; i < avail; i++)
+ if (irbuffer[i].EventType == KEY_EVENT)
+ read = TRUE;
+ }
+ break;
+
+ default:
+ ret = WaitForSingleObject (h, 0);
+ write = TRUE;
+ if (ret == WAIT_OBJECT_0)
+ read = TRUE;
+
+ break;
+ }
+
+ ret = 0;
+ if (read && (rbits->in[fd / CHAR_BIT] & (1 << (fd & (CHAR_BIT - 1)))))
+ {
+ rbits->out[fd / CHAR_BIT] |= (1 << (fd & (CHAR_BIT - 1)));
+ ret++;
+ }
+
+ if (write && (wbits->in[fd / CHAR_BIT] & (1 << (fd & (CHAR_BIT - 1)))))
+ {
+ wbits->out[fd / CHAR_BIT] |= (1 << (fd & (CHAR_BIT - 1)));
+ ret++;
+ }
+
+ if (except && (xbits->in[fd / CHAR_BIT] & (1 << (fd & (CHAR_BIT - 1)))))
+ {
+ xbits->out[fd / CHAR_BIT] |= (1 << (fd & (CHAR_BIT - 1)));
+ ret++;
+ }
+
+ return ret;
+}
+
+int
+rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds,
+ struct timeval *timeout)
+#undef timeval
+{
+ static struct timeval tv0;
+ static HANDLE hEvent;
+ HANDLE h, handle_array[FD_SETSIZE + 2];
+ fd_set handle_rfds, handle_wfds, handle_xfds;
+ struct bitset rbits, wbits, xbits;
+ unsigned char anyfds_in[FD_SETSIZE / CHAR_BIT];
+ DWORD ret, wait_timeout, nhandles, nsock, nbuffer;
+ MSG msg;
+ int i, fd, rc;
+ clock_t tend;
+
+ if (nfds > FD_SETSIZE)
+ nfds = FD_SETSIZE;
+
+ if (!timeout)
+ wait_timeout = INFINITE;
+ else
+ {
+ wait_timeout = timeout->tv_sec * 1000 + timeout->tv_usec / 1000;
+
+ /* select is also used as a portable usleep. */
+ if (!rfds && !wfds && !xfds)
+ {
+ Sleep (wait_timeout);
+ return 0;
+ }
+ }
+
+ if (!hEvent)
+ hEvent = CreateEvent (NULL, FALSE, FALSE, NULL);
+
+ handle_array[0] = hEvent;
+ nhandles = 1;
+ nsock = 0;
+
+ /* Copy descriptors to bitsets. At the same time, eliminate
+ bits in the "wrong" direction for console input buffers
+ and screen buffers, because screen buffers are waitable
+ and they will block until a character is available. */
+ memset (&rbits, 0, sizeof (rbits));
+ memset (&wbits, 0, sizeof (wbits));
+ memset (&xbits, 0, sizeof (xbits));
+ memset (anyfds_in, 0, sizeof (anyfds_in));
+ if (rfds)
+ for (i = 0; i < rfds->fd_count; i++)
+ {
+ fd = rfds->fd_array[i];
+ h = (HANDLE) _get_osfhandle (fd);
+ if (IsConsoleHandle (h)
+ && !GetNumberOfConsoleInputEvents (h, &nbuffer))
+ continue;
+
+ rbits.in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1));
+ anyfds_in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1));
+ }
+ else
+ rfds = (fd_set *) alloca (sizeof (fd_set));
+
+ if (wfds)
+ for (i = 0; i < wfds->fd_count; i++)
+ {
+ fd = wfds->fd_array[i];
+ h = (HANDLE) _get_osfhandle (fd);
+ if (IsConsoleHandle (h)
+ && GetNumberOfConsoleInputEvents (h, &nbuffer))
+ continue;
+
+ wbits.in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1));
+ anyfds_in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1));
+ }
+ else
+ wfds = (fd_set *) alloca (sizeof (fd_set));
+
+ if (xfds)
+ for (i = 0; i < xfds->fd_count; i++)
+ {
+ fd = xfds->fd_array[i];
+ xbits.in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1));
+ anyfds_in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1));
+ }
+ else
+ xfds = (fd_set *) alloca (sizeof (fd_set));
+
+ /* Zero all the fd_sets, including the application's. */
+ FD_ZERO (rfds);
+ FD_ZERO (wfds);
+ FD_ZERO (xfds);
+ FD_ZERO (&handle_rfds);
+ FD_ZERO (&handle_wfds);
+ FD_ZERO (&handle_xfds);
+
+ /* Classify handles. Create fd sets for sockets, poll the others. */
+ for (i = 0; i < nfds; i++)
+ {
+ if ((anyfds_in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) == 0)
+ continue;
+
+ h = (HANDLE) _get_osfhandle (i);
+ if (!h)
+ {
+ errno = EBADF;
+ return -1;
+ }
+
+ if (IsSocketHandle (h))
+ {
+ int requested = FD_CLOSE;
+
+ /* See above; socket handles are mapped onto select, but we
+ need to map descriptors to handles. */
+ if (rbits.in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1))))
+ {
+ requested |= FD_READ | FD_ACCEPT;
+ FD_SET ((SOCKET) h, rfds);
+ FD_SET ((SOCKET) h, &handle_rfds);
+ }
+ if (wbits.in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1))))
+ {
+ requested |= FD_WRITE | FD_CONNECT;
+ FD_SET ((SOCKET) h, wfds);
+ FD_SET ((SOCKET) h, &handle_wfds);
+ }
+ if (xbits.in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1))))
+ {
+ requested |= FD_OOB;
+ FD_SET ((SOCKET) h, xfds);
+ FD_SET ((SOCKET) h, &handle_xfds);
+ }
+
+ WSAEventSelect ((SOCKET) h, hEvent, requested);
+ nsock++;
+ }
+ else
+ {
+ handle_array[nhandles++] = h;
+
+ /* Poll now. If we get an event, do not wait below. */
+ if (wait_timeout != 0
+ && windows_poll_handle (h, i, &rbits, &wbits, &xbits))
+ wait_timeout = 0;
+ }
+ }
+
+ /* Place a sentinel at the end of the array. */
+ handle_array[nhandles] = NULL;
+
+ /* When will the waiting period expire? */
+ if (wait_timeout != INFINITE)
+ tend = clock () + wait_timeout;
+
+restart:
+ if (wait_timeout == 0 || nsock == 0)
+ rc = 0;
+ else
+ {
+ /* See if we need to wait in the loop below. If any select is ready,
+ do MsgWaitForMultipleObjects anyway to dispatch messages, but
+ no need to call select again. */
+ rc = select (0, &handle_rfds, &handle_wfds, &handle_xfds, &tv0);
+ if (rc == 0)
+ {
+ /* Restore the fd_sets for the other select we do below. */
+ memcpy (&handle_rfds, rfds, sizeof (fd_set));
+ memcpy (&handle_wfds, wfds, sizeof (fd_set));
+ memcpy (&handle_xfds, xfds, sizeof (fd_set));
+ }
+ else
+ wait_timeout = 0;
+ }
+
+ /* How much is left to wait? */
+ if (wait_timeout != INFINITE)
+ {
+ clock_t tnow = clock ();
+ if (tend >= tnow)
+ wait_timeout = tend - tnow;
+ else
+ wait_timeout = 0;
+ }
+
+ for (;;)
+ {
+ ret = MsgWaitForMultipleObjects (nhandles, handle_array, FALSE,
+ wait_timeout, QS_ALLINPUT);
+
+ if (ret == WAIT_OBJECT_0 + nhandles)
+ {
+ /* new input of some other kind */
+ BOOL bRet;
+ while ((bRet = PeekMessage (&msg, NULL, 0, 0, PM_REMOVE)) != 0)
+ {
+ TranslateMessage (&msg);
+ DispatchMessage (&msg);
+ }
+ }
+ else
+ break;
+ }
+
+ /* If we haven't done it yet, check the status of the sockets. */
+ if (rc == 0 && nsock > 0)
+ rc = select (0, &handle_rfds, &handle_wfds, &handle_xfds, &tv0);
+
+ if (nhandles > 1)
+ {
+ /* Count results that are not counted in the return value of select. */
+ nhandles = 1;
+ for (i = 0; i < nfds; i++)
+ {
+ if ((anyfds_in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) == 0)
+ continue;
+
+ h = (HANDLE) _get_osfhandle (i);
+ if (h == handle_array[nhandles])
+ {
+ /* Not a socket. */
+ nhandles++;
+ windows_poll_handle (h, i, &rbits, &wbits, &xbits);
+ if (rbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))
+ || wbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))
+ || xbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1))))
+ rc++;
+ }
+ }
+
+ if (rc == 0
+ && (wait_timeout == INFINITE
+ /* If NHANDLES > 1, but no bits are set, it means we've
+ been told incorrectly that some handle was signaled.
+ This happens with anonymous pipes, which always cause
+ MsgWaitForMultipleObjects to exit immediately, but no
+ data is found ready to be read by windows_poll_handle.
+ To avoid a total failure (whereby we return zero and
+ don't wait at all), let's poll in a more busy loop. */
+ || (wait_timeout != 0 && nhandles > 1)))
+ {
+ /* Sleep 1 millisecond to avoid busy wait and retry with the
+ original fd_sets. */
+ memcpy (&handle_rfds, rfds, sizeof (fd_set));
+ memcpy (&handle_wfds, wfds, sizeof (fd_set));
+ memcpy (&handle_xfds, xfds, sizeof (fd_set));
+ SleepEx (1, TRUE);
+ goto restart;
+ }
+ if (timeout && wait_timeout == 0 && rc == 0)
+ timeout->tv_sec = timeout->tv_usec = 0;
+ }
+
+ /* Now fill in the results. */
+ FD_ZERO (rfds);
+ FD_ZERO (wfds);
+ FD_ZERO (xfds);
+ nhandles = 1;
+ for (i = 0; i < nfds; i++)
+ {
+ if ((anyfds_in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) == 0)
+ continue;
+
+ h = (HANDLE) _get_osfhandle (i);
+ if (h != handle_array[nhandles])
+ {
+ /* Perform handle->descriptor mapping. */
+ WSAEventSelect ((SOCKET) h, NULL, 0);
+ if (FD_ISSET (h, &handle_rfds))
+ FD_SET (i, rfds);
+ if (FD_ISSET (h, &handle_wfds))
+ FD_SET (i, wfds);
+ if (FD_ISSET (h, &handle_xfds))
+ FD_SET (i, xfds);
+ }
+ else
+ {
+ /* Not a socket. */
+ nhandles++;
+ if (rbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1))))
+ FD_SET (i, rfds);
+ if (wbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1))))
+ FD_SET (i, wfds);
+ if (xbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1))))
+ FD_SET (i, xfds);
+ }
+ }
+
+ return rc;
+}
+
+#else /* ! Native Windows. */
+
+#include <sys/select.h>
+#include <stddef.h> /* NULL */
+#include <errno.h>
+#include <unistd.h>
+
+#undef select
+
+int
+rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds,
+ struct timeval *timeout)
+{
+ int i;
+
+ /* FreeBSD 8.2 has a bug: it does not always detect invalid fds. */
+ if (nfds < 0 || nfds > FD_SETSIZE)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+ for (i = 0; i < nfds; i++)
+ {
+ if (((rfds && FD_ISSET (i, rfds))
+ || (wfds && FD_ISSET (i, wfds))
+ || (xfds && FD_ISSET (i, xfds)))
+ && dup2 (i, i) != i)
+ return -1;
+ }
+
+ /* Interix 3.5 has a bug: it does not support nfds == 0. */
+ if (nfds == 0)
+ {
+ nfds = 1;
+ rfds = NULL;
+ wfds = NULL;
+ xfds = NULL;
+ }
+ return select (nfds, rfds, wfds, xfds, timeout);
+}
+
+#endif
diff --git a/gnulib-tests/setenv.c b/gnulib-tests/setenv.c
index edc6a0a..439e1ff 100644
--- a/gnulib-tests/setenv.c
+++ b/gnulib-tests/setenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995-2003, 2005-2017 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995-2003, 2005-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#if !_LIBC
/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
diff --git a/gnulib-tests/setlocale.c b/gnulib-tests/setlocale.c
index af8cc90..5ac7f72 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2011-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
@@ -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
new file mode 100644
index 0000000..1a7b583
--- /dev/null
+++ b/gnulib-tests/setsockopt.c
@@ -0,0 +1,65 @@
+/* setsockopt.c --- wrappers for Windows setsockopt function
+
+ Copyright (C) 2008-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Paolo Bonzini */
+
+#include <config.h>
+
+#define WIN32_LEAN_AND_MEAN
+/* Get winsock2.h. */
+#include <sys/socket.h>
+
+/* Get struct timeval. */
+#include <sys/time.h>
+
+/* Get set_winsock_errno, FD_TO_SOCKET etc. */
+#include "w32sock.h"
+
+#undef setsockopt
+
+int
+rpl_setsockopt (int fd, int level, int optname, const void *optval, socklen_t optlen)
+{
+ SOCKET sock = FD_TO_SOCKET (fd);
+ int r;
+
+ if (sock == INVALID_SOCKET)
+ {
+ errno = EBADF;
+ return -1;
+ }
+ else
+ {
+ if (level == SOL_SOCKET
+ && (optname == SO_RCVTIMEO || optname == SO_SNDTIMEO))
+ {
+ const struct timeval *tv = optval;
+ int milliseconds = tv->tv_sec * 1000 + tv->tv_usec / 1000;
+ optval = &milliseconds;
+ r = setsockopt (sock, level, optname, optval, sizeof (int));
+ }
+ else
+ {
+ r = setsockopt (sock, level, optname, optval, optlen);
+ }
+
+ if (r < 0)
+ set_winsock_errno ();
+
+ return r;
+ }
+}
diff --git a/gnulib-tests/sig-handler.c b/gnulib-tests/sig-handler.c
new file mode 100644
index 0000000..52c3621
--- /dev/null
+++ b/gnulib-tests/sig-handler.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define SIG_HANDLER_INLINE _GL_EXTERN_INLINE
+#include "sig-handler.h"
diff --git a/gnulib-tests/sig-handler.h b/gnulib-tests/sig-handler.h
new file mode 100644
index 0000000..ce28a2a
--- /dev/null
+++ b/gnulib-tests/sig-handler.h
@@ -0,0 +1,54 @@
+/* Convenience declarations when working with <signal.h>.
+
+ Copyright (C) 2008-2018 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 <https://www.gnu.org/licenses/>. */
+
+#ifndef _GL_SIG_HANDLER_H
+#define _GL_SIG_HANDLER_H
+
+#include <signal.h>
+
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef SIG_HANDLER_INLINE
+# define SIG_HANDLER_INLINE _GL_INLINE
+#endif
+
+/* Convenience type when working with signal handlers. */
+typedef void (*sa_handler_t) (int);
+
+/* Return the handler of a signal, as a sa_handler_t value regardless
+ of its true type. The resulting function can be compared to
+ special values like SIG_IGN but it is not portable to call it. */
+SIG_HANDLER_INLINE sa_handler_t _GL_ATTRIBUTE_PURE
+get_handler (struct sigaction const *a)
+{
+#ifdef SA_SIGINFO
+ /* POSIX says that special values like SIG_IGN can only occur when
+ action.sa_flags does not contain SA_SIGINFO. But in Linux 2.4,
+ for example, sa_sigaction and sa_handler are aliases and a signal
+ is ignored if sa_sigaction (after casting) equals SIG_IGN. So
+ use (and cast) sa_sigaction in that case. */
+ if (a->sa_flags & SA_SIGINFO)
+ return (sa_handler_t) a->sa_sigaction;
+#endif
+ return a->sa_handler;
+}
+
+_GL_INLINE_HEADER_END
+
+#endif /* _GL_SIG_HANDLER_H */
diff --git a/gnulib-tests/sigaction.c b/gnulib-tests/sigaction.c
new file mode 100644
index 0000000..da46b1c
--- /dev/null
+++ b/gnulib-tests/sigaction.c
@@ -0,0 +1,204 @@
+/* POSIX compatible signal blocking.
+ Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ Written by Eric Blake <ebb9@byu.net>, 2008.
+
+ 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 <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <signal.h>
+
+#include <errno.h>
+#include <stdint.h>
+#include <stdlib.h>
+
+/* This implementation of sigaction is tailored to native Windows behavior:
+ signal() has SysV semantics (ie. the handler is uninstalled before
+ it is invoked). This is an inherent data race if an asynchronous
+ signal is sent twice in a row before we can reinstall our handler,
+ but there's nothing we can do about it. Meanwhile, sigprocmask()
+ is not present, and while we can use the gnulib replacement to
+ provide critical sections, it too suffers from potential data races
+ in the face of an ill-timed asynchronous signal. And we compound
+ the situation by reading static storage in a signal handler, which
+ POSIX warns is not generically async-signal-safe. Oh well.
+
+ Additionally:
+ - We don't implement SA_NOCLDSTOP or SA_NOCLDWAIT, because SIGCHLD
+ is not defined.
+ - We don't implement SA_ONSTACK, because sigaltstack() is not present.
+ - We ignore SA_RESTART, because blocking native Windows API calls are
+ not interrupted anyway when an asynchronous signal occurs, and the
+ MSVCRT runtime never sets errno to EINTR.
+ - We don't implement SA_SIGINFO because it is impossible to do so
+ portably.
+
+ POSIX states that an application should not mix signal() and
+ sigaction(). We support the use of signal() within the gnulib
+ sigprocmask() substitute, but all other application code linked
+ with this module should stick with only sigaction(). */
+
+/* Check some of our assumptions. */
+#if defined SIGCHLD || defined HAVE_SIGALTSTACK || defined HAVE_SIGINTERRUPT
+# error "Revisit the assumptions made in the sigaction module"
+#endif
+
+/* Out-of-range substitutes make a good fallback for uncatchable
+ signals. */
+#ifndef SIGKILL
+# define SIGKILL (-1)
+#endif
+#ifndef SIGSTOP
+# define SIGSTOP (-1)
+#endif
+
+/* On native Windows, as of 2008, the signal SIGABRT_COMPAT is an alias
+ for the signal SIGABRT. Only one signal handler is stored for both
+ SIGABRT and SIGABRT_COMPAT. SIGABRT_COMPAT is not a signal of its own. */
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# undef SIGABRT_COMPAT
+# define SIGABRT_COMPAT 6
+#endif
+
+/* A signal handler. */
+typedef void (*handler_t) (int signal);
+
+/* Set of current actions. If sa_handler for an entry is NULL, then
+ that signal is not currently handled by the sigaction handler. */
+static struct sigaction volatile action_array[NSIG] /* = 0 */;
+
+/* Signal handler that is installed for signals. */
+static void
+sigaction_handler (int sig)
+{
+ handler_t handler;
+ sigset_t mask;
+ sigset_t oldmask;
+ int saved_errno = errno;
+ if (sig < 0 || NSIG <= sig || !action_array[sig].sa_handler)
+ {
+ /* Unexpected situation; be careful to avoid recursive abort. */
+ if (sig == SIGABRT)
+ signal (SIGABRT, SIG_DFL);
+ abort ();
+ }
+
+ /* Reinstall the signal handler when required; otherwise update the
+ bookkeeping so that the user's handler may call sigaction and get
+ accurate results. We know the signal isn't currently blocked, or
+ we wouldn't be in its handler, therefore we know that we are not
+ interrupting a sigaction() call. There is a race where any
+ asynchronous instance of the same signal occurring before we
+ reinstall the handler will trigger the default handler; oh
+ well. */
+ handler = action_array[sig].sa_handler;
+ if ((action_array[sig].sa_flags & SA_RESETHAND) == 0)
+ signal (sig, sigaction_handler);
+ else
+ action_array[sig].sa_handler = NULL;
+
+ /* Block appropriate signals. */
+ mask = action_array[sig].sa_mask;
+ if ((action_array[sig].sa_flags & SA_NODEFER) == 0)
+ sigaddset (&mask, sig);
+ sigprocmask (SIG_BLOCK, &mask, &oldmask);
+
+ /* Invoke the user's handler, then restore prior mask. */
+ errno = saved_errno;
+ handler (sig);
+ saved_errno = errno;
+ sigprocmask (SIG_SETMASK, &oldmask, NULL);
+ errno = saved_errno;
+}
+
+/* Change and/or query the action that will be taken on delivery of
+ signal SIG. If not NULL, ACT describes the new behavior. If not
+ NULL, OACT is set to the prior behavior. Return 0 on success, or
+ set errno and return -1 on failure. */
+int
+sigaction (int sig, const struct sigaction *restrict act,
+ struct sigaction *restrict oact)
+{
+ sigset_t mask;
+ sigset_t oldmask;
+ int saved_errno;
+
+ if (sig < 0 || NSIG <= sig || sig == SIGKILL || sig == SIGSTOP
+ || (act && act->sa_handler == SIG_ERR))
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+#ifdef SIGABRT_COMPAT
+ if (sig == SIGABRT_COMPAT)
+ sig = SIGABRT;
+#endif
+
+ /* POSIX requires sigaction() to be async-signal-safe. In other
+ words, if an asynchronous signal can occur while we are anywhere
+ inside this function, the user's handler could then call
+ sigaction() recursively and expect consistent results. We meet
+ this rule by using sigprocmask to block all signals before
+ modifying any data structure that could be read from a signal
+ handler; this works since we know that the gnulib sigprocmask
+ replacement does not try to use sigaction() from its handler. */
+ if (!act && !oact)
+ return 0;
+ sigfillset (&mask);
+ sigprocmask (SIG_BLOCK, &mask, &oldmask);
+ if (oact)
+ {
+ if (action_array[sig].sa_handler)
+ *oact = action_array[sig];
+ else
+ {
+ /* Safe to change the handler at will here, since all
+ signals are currently blocked. */
+ oact->sa_handler = signal (sig, SIG_DFL);
+ if (oact->sa_handler == SIG_ERR)
+ goto failure;
+ signal (sig, oact->sa_handler);
+ oact->sa_flags = SA_RESETHAND | SA_NODEFER;
+ sigemptyset (&oact->sa_mask);
+ }
+ }
+
+ if (act)
+ {
+ /* Safe to install the handler before updating action_array,
+ since all signals are currently blocked. */
+ if (act->sa_handler == SIG_DFL || act->sa_handler == SIG_IGN)
+ {
+ if (signal (sig, act->sa_handler) == SIG_ERR)
+ goto failure;
+ action_array[sig].sa_handler = NULL;
+ }
+ else
+ {
+ if (signal (sig, sigaction_handler) == SIG_ERR)
+ goto failure;
+ action_array[sig] = *act;
+ }
+ }
+ sigprocmask (SIG_SETMASK, &oldmask, NULL);
+ return 0;
+
+ failure:
+ saved_errno = errno;
+ sigprocmask (SIG_SETMASK, &oldmask, NULL);
+ errno = saved_errno;
+ return -1;
+}
diff --git a/gnulib-tests/signal.in.h b/gnulib-tests/signal.in.h
new file mode 100644
index 0000000..7d4927b
--- /dev/null
+++ b/gnulib-tests/signal.in.h
@@ -0,0 +1,463 @@
+/* A GNU-like <signal.h>.
+
+ Copyright (C) 2006-2018 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 <https://www.gnu.org/licenses/>. */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+#if defined __need_sig_atomic_t || defined __need_sigset_t || defined _GL_ALREADY_INCLUDING_SIGNAL_H || (defined _SIGNAL_H && !defined __SIZEOF_PTHREAD_MUTEX_T)
+/* Special invocation convention:
+ - Inside glibc header files.
+ - On glibc systems we have a sequence of nested includes
+ <signal.h> -> <ucontext.h> -> <signal.h>.
+ In this situation, the functions are not yet declared, therefore we cannot
+ provide the C++ aliases.
+ - On glibc systems with GCC 4.3 we have a sequence of nested includes
+ <csignal> -> </usr/include/signal.h> -> <sys/ucontext.h> -> <signal.h>.
+ In this situation, some of the functions are not yet declared, therefore
+ we cannot provide the C++ aliases. */
+
+# @INCLUDE_NEXT@ @NEXT_SIGNAL_H@
+
+#else
+/* Normal invocation convention. */
+
+#ifndef _@GUARD_PREFIX@_SIGNAL_H
+
+#define _GL_ALREADY_INCLUDING_SIGNAL_H
+
+/* Define pid_t, uid_t.
+ Also, mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.
+ On Solaris 10, <signal.h> includes <sys/types.h>, which eventually includes
+ us; so include <sys/types.h> now, before the second inclusion guard. */
+#include <sys/types.h>
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_SIGNAL_H@
+
+#undef _GL_ALREADY_INCLUDING_SIGNAL_H
+
+#ifndef _@GUARD_PREFIX@_SIGNAL_H
+#define _@GUARD_PREFIX@_SIGNAL_H
+
+/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6, Android
+ declare pthread_sigmask in <pthread.h>, not in <signal.h>.
+ But avoid namespace pollution on glibc systems.*/
+#if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \
+ && ((defined __APPLE__ && defined __MACH__) \
+ || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ \
+ || defined __sun || defined __ANDROID__) \
+ && ! defined __GLIBC__
+# include <pthread.h>
+#endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+/* On AIX, sig_atomic_t already includes volatile. C99 requires that
+ 'volatile sig_atomic_t' ignore the extra modifier, but C89 did not.
+ Hence, redefine this to a non-volatile type as needed. */
+#if ! @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
+# if !GNULIB_defined_sig_atomic_t
+typedef int rpl_sig_atomic_t;
+# undef sig_atomic_t
+# define sig_atomic_t rpl_sig_atomic_t
+# define GNULIB_defined_sig_atomic_t 1
+# endif
+#endif
+
+/* A set or mask of signals. */
+#if !@HAVE_SIGSET_T@
+# if !GNULIB_defined_sigset_t
+typedef unsigned int sigset_t;
+# define GNULIB_defined_sigset_t 1
+# endif
+#endif
+
+/* Define sighandler_t, the type of signal handlers. A GNU extension. */
+#if !@HAVE_SIGHANDLER_T@
+# ifdef __cplusplus
+extern "C" {
+# endif
+# if !GNULIB_defined_sighandler_t
+typedef void (*sighandler_t) (int);
+# define GNULIB_defined_sighandler_t 1
+# endif
+# ifdef __cplusplus
+}
+# endif
+#endif
+
+
+#if @GNULIB_SIGNAL_H_SIGPIPE@
+# ifndef SIGPIPE
+/* Define SIGPIPE to a value that does not overlap with other signals. */
+# define SIGPIPE 13
+# define GNULIB_defined_SIGPIPE 1
+/* To actually use SIGPIPE, you also need the gnulib modules 'sigprocmask',
+ 'write', 'stdio'. */
+# endif
+#endif
+
+
+/* Maximum signal number + 1. */
+#ifndef NSIG
+# if defined __TANDEM
+# define NSIG 32
+# endif
+#endif
+
+
+#if @GNULIB_PTHREAD_SIGMASK@
+# if @REPLACE_PTHREAD_SIGMASK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_sigmask
+# define pthread_sigmask rpl_pthread_sigmask
+# endif
+_GL_FUNCDECL_RPL (pthread_sigmask, int,
+ (int how, const sigset_t *new_mask, sigset_t *old_mask));
+_GL_CXXALIAS_RPL (pthread_sigmask, int,
+ (int how, const sigset_t *new_mask, sigset_t *old_mask));
+# else
+# if !(@HAVE_PTHREAD_SIGMASK@ || defined pthread_sigmask)
+_GL_FUNCDECL_SYS (pthread_sigmask, int,
+ (int how, const sigset_t *new_mask, sigset_t *old_mask));
+# endif
+_GL_CXXALIAS_SYS (pthread_sigmask, int,
+ (int how, const sigset_t *new_mask, sigset_t *old_mask));
+# endif
+_GL_CXXALIASWARN (pthread_sigmask);
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_sigmask
+# if HAVE_RAW_DECL_PTHREAD_SIGMASK
+_GL_WARN_ON_USE (pthread_sigmask, "pthread_sigmask is not portable - "
+ "use gnulib module pthread_sigmask for portability");
+# endif
+#endif
+
+
+#if @GNULIB_RAISE@
+# if @REPLACE_RAISE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef raise
+# define raise rpl_raise
+# endif
+_GL_FUNCDECL_RPL (raise, int, (int sig));
+_GL_CXXALIAS_RPL (raise, int, (int sig));
+# else
+# if !@HAVE_RAISE@
+_GL_FUNCDECL_SYS (raise, int, (int sig));
+# endif
+_GL_CXXALIAS_SYS (raise, int, (int sig));
+# endif
+_GL_CXXALIASWARN (raise);
+#elif defined GNULIB_POSIXCHECK
+# undef raise
+/* Assume raise is always declared. */
+_GL_WARN_ON_USE (raise, "raise can crash on native Windows - "
+ "use gnulib module raise for portability");
+#endif
+
+
+#if @GNULIB_SIGPROCMASK@
+# if !@HAVE_POSIX_SIGNALBLOCKING@
+
+# ifndef GNULIB_defined_signal_blocking
+# define GNULIB_defined_signal_blocking 1
+# endif
+
+/* Maximum signal number + 1. */
+# ifndef NSIG
+# define NSIG 32
+# endif
+
+/* This code supports only 32 signals. */
+# if !GNULIB_defined_verify_NSIG_constraint
+typedef int verify_NSIG_constraint[NSIG <= 32 ? 1 : -1];
+# define GNULIB_defined_verify_NSIG_constraint 1
+# endif
+
+# endif
+
+/* When also using extern inline, suppress the use of static inline in
+ standard headers of problematic Apple configurations, as Libc at
+ least through Libc-825.26 (2013-04-09) mishandles it; see, e.g.,
+ <https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html>.
+ Perhaps Apple will fix this some day. */
+#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \
+ && (defined __i386__ || defined __x86_64__))
+# undef sigaddset
+# undef sigdelset
+# undef sigemptyset
+# undef sigfillset
+# undef sigismember
+#endif
+
+/* Test whether a given signal is contained in a signal set. */
+# if @HAVE_POSIX_SIGNALBLOCKING@
+/* This function is defined as a macro on Mac OS X. */
+# if defined __cplusplus && defined GNULIB_NAMESPACE
+# undef sigismember
+# endif
+# else
+_GL_FUNCDECL_SYS (sigismember, int, (const sigset_t *set, int sig)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (sigismember, int, (const sigset_t *set, int sig));
+_GL_CXXALIASWARN (sigismember);
+
+/* Initialize a signal set to the empty set. */
+# if @HAVE_POSIX_SIGNALBLOCKING@
+/* This function is defined as a macro on Mac OS X. */
+# if defined __cplusplus && defined GNULIB_NAMESPACE
+# undef sigemptyset
+# endif
+# else
+_GL_FUNCDECL_SYS (sigemptyset, int, (sigset_t *set) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (sigemptyset, int, (sigset_t *set));
+_GL_CXXALIASWARN (sigemptyset);
+
+/* Add a signal to a signal set. */
+# if @HAVE_POSIX_SIGNALBLOCKING@
+/* This function is defined as a macro on Mac OS X. */
+# if defined __cplusplus && defined GNULIB_NAMESPACE
+# undef sigaddset
+# endif
+# else
+_GL_FUNCDECL_SYS (sigaddset, int, (sigset_t *set, int sig)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (sigaddset, int, (sigset_t *set, int sig));
+_GL_CXXALIASWARN (sigaddset);
+
+/* Remove a signal from a signal set. */
+# if @HAVE_POSIX_SIGNALBLOCKING@
+/* This function is defined as a macro on Mac OS X. */
+# if defined __cplusplus && defined GNULIB_NAMESPACE
+# undef sigdelset
+# endif
+# else
+_GL_FUNCDECL_SYS (sigdelset, int, (sigset_t *set, int sig)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (sigdelset, int, (sigset_t *set, int sig));
+_GL_CXXALIASWARN (sigdelset);
+
+/* Fill a signal set with all possible signals. */
+# if @HAVE_POSIX_SIGNALBLOCKING@
+/* This function is defined as a macro on Mac OS X. */
+# if defined __cplusplus && defined GNULIB_NAMESPACE
+# undef sigfillset
+# endif
+# else
+_GL_FUNCDECL_SYS (sigfillset, int, (sigset_t *set) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (sigfillset, int, (sigset_t *set));
+_GL_CXXALIASWARN (sigfillset);
+
+/* Return the set of those blocked signals that are pending. */
+# if !@HAVE_POSIX_SIGNALBLOCKING@
+_GL_FUNCDECL_SYS (sigpending, int, (sigset_t *set) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (sigpending, int, (sigset_t *set));
+_GL_CXXALIASWARN (sigpending);
+
+/* If OLD_SET is not NULL, put the current set of blocked signals in *OLD_SET.
+ Then, if SET is not NULL, affect the current set of blocked signals by
+ combining it with *SET as indicated in OPERATION.
+ In this implementation, you are not allowed to change a signal handler
+ while the signal is blocked. */
+# if !@HAVE_POSIX_SIGNALBLOCKING@
+# define SIG_BLOCK 0 /* blocked_set = blocked_set | *set; */
+# define SIG_SETMASK 1 /* blocked_set = *set; */
+# define SIG_UNBLOCK 2 /* blocked_set = blocked_set & ~*set; */
+_GL_FUNCDECL_SYS (sigprocmask, int,
+ (int operation, const sigset_t *set, sigset_t *old_set));
+# endif
+_GL_CXXALIAS_SYS (sigprocmask, int,
+ (int operation, const sigset_t *set, sigset_t *old_set));
+_GL_CXXALIASWARN (sigprocmask);
+
+/* Install the handler FUNC for signal SIG, and return the previous
+ handler. */
+# ifdef __cplusplus
+extern "C" {
+# endif
+# if !GNULIB_defined_function_taking_int_returning_void_t
+typedef void (*_gl_function_taking_int_returning_void_t) (int);
+# define GNULIB_defined_function_taking_int_returning_void_t 1
+# endif
+# ifdef __cplusplus
+}
+# endif
+# if !@HAVE_POSIX_SIGNALBLOCKING@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define signal rpl_signal
+# endif
+_GL_FUNCDECL_RPL (signal, _gl_function_taking_int_returning_void_t,
+ (int sig, _gl_function_taking_int_returning_void_t func));
+_GL_CXXALIAS_RPL (signal, _gl_function_taking_int_returning_void_t,
+ (int sig, _gl_function_taking_int_returning_void_t func));
+# else
+_GL_CXXALIAS_SYS (signal, _gl_function_taking_int_returning_void_t,
+ (int sig, _gl_function_taking_int_returning_void_t func));
+# endif
+_GL_CXXALIASWARN (signal);
+
+# if !@HAVE_POSIX_SIGNALBLOCKING@ && GNULIB_defined_SIGPIPE
+/* Raise signal SIGPIPE. */
+_GL_EXTERN_C int _gl_raise_SIGPIPE (void);
+# endif
+
+#elif defined GNULIB_POSIXCHECK
+# undef sigaddset
+# if HAVE_RAW_DECL_SIGADDSET
+_GL_WARN_ON_USE (sigaddset, "sigaddset is unportable - "
+ "use the gnulib module sigprocmask for portability");
+# endif
+# undef sigdelset
+# if HAVE_RAW_DECL_SIGDELSET
+_GL_WARN_ON_USE (sigdelset, "sigdelset is unportable - "
+ "use the gnulib module sigprocmask for portability");
+# endif
+# undef sigemptyset
+# if HAVE_RAW_DECL_SIGEMPTYSET
+_GL_WARN_ON_USE (sigemptyset, "sigemptyset is unportable - "
+ "use the gnulib module sigprocmask for portability");
+# endif
+# undef sigfillset
+# if HAVE_RAW_DECL_SIGFILLSET
+_GL_WARN_ON_USE (sigfillset, "sigfillset is unportable - "
+ "use the gnulib module sigprocmask for portability");
+# endif
+# undef sigismember
+# if HAVE_RAW_DECL_SIGISMEMBER
+_GL_WARN_ON_USE (sigismember, "sigismember is unportable - "
+ "use the gnulib module sigprocmask for portability");
+# endif
+# undef sigpending
+# if HAVE_RAW_DECL_SIGPENDING
+_GL_WARN_ON_USE (sigpending, "sigpending is unportable - "
+ "use the gnulib module sigprocmask for portability");
+# endif
+# undef sigprocmask
+# if HAVE_RAW_DECL_SIGPROCMASK
+_GL_WARN_ON_USE (sigprocmask, "sigprocmask is unportable - "
+ "use the gnulib module sigprocmask for portability");
+# endif
+#endif /* @GNULIB_SIGPROCMASK@ */
+
+
+#if @GNULIB_SIGACTION@
+# if !@HAVE_SIGACTION@
+
+# if !@HAVE_SIGINFO_T@
+
+# if !GNULIB_defined_siginfo_types
+
+/* Present to allow compilation, but unsupported by gnulib. */
+union sigval
+{
+ int sival_int;
+ void *sival_ptr;
+};
+
+/* Present to allow compilation, but unsupported by gnulib. */
+struct siginfo_t
+{
+ int si_signo;
+ int si_code;
+ int si_errno;
+ pid_t si_pid;
+ uid_t si_uid;
+ void *si_addr;
+ int si_status;
+ long si_band;
+ union sigval si_value;
+};
+typedef struct siginfo_t siginfo_t;
+
+# define GNULIB_defined_siginfo_types 1
+# endif
+
+# endif /* !@HAVE_SIGINFO_T@ */
+
+/* We assume that platforms which lack the sigaction() function also lack
+ the 'struct sigaction' type, and vice versa. */
+
+# if !GNULIB_defined_struct_sigaction
+
+struct sigaction
+{
+ union
+ {
+ void (*_sa_handler) (int);
+ /* Present to allow compilation, but unsupported by gnulib. POSIX
+ says that implementations may, but not must, make sa_sigaction
+ overlap with sa_handler, but we know of no implementation where
+ they do not overlap. */
+ void (*_sa_sigaction) (int, siginfo_t *, void *);
+ } _sa_func;
+ sigset_t sa_mask;
+ /* Not all POSIX flags are supported. */
+ int sa_flags;
+};
+# define sa_handler _sa_func._sa_handler
+# define sa_sigaction _sa_func._sa_sigaction
+/* Unsupported flags are not present. */
+# define SA_RESETHAND 1
+# define SA_NODEFER 2
+# define SA_RESTART 4
+
+# define GNULIB_defined_struct_sigaction 1
+# endif
+
+_GL_FUNCDECL_SYS (sigaction, int, (int, const struct sigaction *restrict,
+ struct sigaction *restrict));
+
+# elif !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@
+
+# define sa_sigaction sa_handler
+
+# endif /* !@HAVE_SIGACTION@, !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@ */
+
+_GL_CXXALIAS_SYS (sigaction, int, (int, const struct sigaction *restrict,
+ struct sigaction *restrict));
+_GL_CXXALIASWARN (sigaction);
+
+#elif defined GNULIB_POSIXCHECK
+# undef sigaction
+# if HAVE_RAW_DECL_SIGACTION
+_GL_WARN_ON_USE (sigaction, "sigaction is unportable - "
+ "use the gnulib module sigaction for portability");
+# endif
+#endif
+
+/* Some systems don't have SA_NODEFER. */
+#ifndef SA_NODEFER
+# define SA_NODEFER 0
+#endif
+
+
+#endif /* _@GUARD_PREFIX@_SIGNAL_H */
+#endif /* _@GUARD_PREFIX@_SIGNAL_H */
+#endif
diff --git a/gnulib-tests/signature.h b/gnulib-tests/signature.h
index 0fdfc11..adabfad 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef SIGNATURE_CHECK
diff --git a/gnulib-tests/sigprocmask.c b/gnulib-tests/sigprocmask.c
new file mode 100644
index 0000000..0a8cd53
--- /dev/null
+++ b/gnulib-tests/sigprocmask.c
@@ -0,0 +1,349 @@
+/* POSIX compatible signal blocking.
+ Copyright (C) 2006-2018 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ 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 <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <signal.h>
+
+#include <errno.h>
+#include <stdint.h>
+#include <stdlib.h>
+
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+# include "msvc-inval.h"
+#endif
+
+/* We assume that a platform without POSIX signal blocking functions
+ also does not have the POSIX sigaction() function, only the
+ signal() function. We also assume signal() has SysV semantics,
+ where any handler is uninstalled prior to being invoked. This is
+ true for native Windows platforms. */
+
+/* We use raw signal(), but also provide a wrapper rpl_signal() so
+ that applications can query or change a blocked signal. */
+#undef signal
+
+/* Provide invalid signal numbers as fallbacks if the uncatchable
+ signals are not defined. */
+#ifndef SIGKILL
+# define SIGKILL (-1)
+#endif
+#ifndef SIGSTOP
+# define SIGSTOP (-1)
+#endif
+
+/* On native Windows, as of 2008, the signal SIGABRT_COMPAT is an alias
+ for the signal SIGABRT. Only one signal handler is stored for both
+ SIGABRT and SIGABRT_COMPAT. SIGABRT_COMPAT is not a signal of its own. */
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# undef SIGABRT_COMPAT
+# define SIGABRT_COMPAT 6
+#endif
+#ifdef SIGABRT_COMPAT
+# define SIGABRT_COMPAT_MASK (1U << SIGABRT_COMPAT)
+#else
+# define SIGABRT_COMPAT_MASK 0
+#endif
+
+typedef void (*handler_t) (int);
+
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+static handler_t
+signal_nothrow (int sig, handler_t handler)
+{
+ handler_t result;
+
+ TRY_MSVC_INVAL
+ {
+ result = signal (sig, handler);
+ }
+ CATCH_MSVC_INVAL
+ {
+ result = SIG_ERR;
+ errno = EINVAL;
+ }
+ DONE_MSVC_INVAL;
+
+ return result;
+}
+# define signal signal_nothrow
+#endif
+
+/* Handling of gnulib defined signals. */
+
+#if GNULIB_defined_SIGPIPE
+static handler_t SIGPIPE_handler = SIG_DFL;
+#endif
+
+#if GNULIB_defined_SIGPIPE
+static handler_t
+ext_signal (int sig, handler_t handler)
+{
+ switch (sig)
+ {
+ case SIGPIPE:
+ {
+ handler_t old_handler = SIGPIPE_handler;
+ SIGPIPE_handler = handler;
+ return old_handler;
+ }
+ default: /* System defined signal */
+ return signal (sig, handler);
+ }
+}
+# undef signal
+# define signal ext_signal
+#endif
+
+int
+sigismember (const sigset_t *set, int sig)
+{
+ if (sig >= 0 && sig < NSIG)
+ {
+ #ifdef SIGABRT_COMPAT
+ if (sig == SIGABRT_COMPAT)
+ sig = SIGABRT;
+ #endif
+
+ return (*set >> sig) & 1;
+ }
+ else
+ return 0;
+}
+
+int
+sigemptyset (sigset_t *set)
+{
+ *set = 0;
+ return 0;
+}
+
+int
+sigaddset (sigset_t *set, int sig)
+{
+ if (sig >= 0 && sig < NSIG)
+ {
+ #ifdef SIGABRT_COMPAT
+ if (sig == SIGABRT_COMPAT)
+ sig = SIGABRT;
+ #endif
+
+ *set |= 1U << sig;
+ return 0;
+ }
+ else
+ {
+ errno = EINVAL;
+ return -1;
+ }
+}
+
+int
+sigdelset (sigset_t *set, int sig)
+{
+ if (sig >= 0 && sig < NSIG)
+ {
+ #ifdef SIGABRT_COMPAT
+ if (sig == SIGABRT_COMPAT)
+ sig = SIGABRT;
+ #endif
+
+ *set &= ~(1U << sig);
+ return 0;
+ }
+ else
+ {
+ errno = EINVAL;
+ return -1;
+ }
+}
+
+
+int
+sigfillset (sigset_t *set)
+{
+ *set = ((2U << (NSIG - 1)) - 1) & ~ SIGABRT_COMPAT_MASK;
+ return 0;
+}
+
+/* Set of currently blocked signals. */
+static volatile sigset_t blocked_set /* = 0 */;
+
+/* Set of currently blocked and pending signals. */
+static volatile sig_atomic_t pending_array[NSIG] /* = { 0 } */;
+
+/* Signal handler that is installed for blocked signals. */
+static void
+blocked_handler (int sig)
+{
+ /* Reinstall the handler, in case the signal occurs multiple times
+ while blocked. There is an inherent race where an asynchronous
+ signal in between when the kernel uninstalled the handler and
+ when we reinstall it will trigger the default handler; oh
+ well. */
+ signal (sig, blocked_handler);
+ if (sig >= 0 && sig < NSIG)
+ pending_array[sig] = 1;
+}
+
+int
+sigpending (sigset_t *set)
+{
+ sigset_t pending = 0;
+ int sig;
+
+ for (sig = 0; sig < NSIG; sig++)
+ if (pending_array[sig])
+ pending |= 1U << sig;
+ *set = pending;
+ return 0;
+}
+
+/* The previous signal handlers.
+ Only the array elements corresponding to blocked signals are relevant. */
+static volatile handler_t old_handlers[NSIG];
+
+int
+sigprocmask (int operation, const sigset_t *set, sigset_t *old_set)
+{
+ if (old_set != NULL)
+ *old_set = blocked_set;
+
+ if (set != NULL)
+ {
+ sigset_t new_blocked_set;
+ sigset_t to_unblock;
+ sigset_t to_block;
+
+ switch (operation)
+ {
+ case SIG_BLOCK:
+ new_blocked_set = blocked_set | *set;
+ break;
+ case SIG_SETMASK:
+ new_blocked_set = *set;
+ break;
+ case SIG_UNBLOCK:
+ new_blocked_set = blocked_set & ~*set;
+ break;
+ default:
+ errno = EINVAL;
+ return -1;
+ }
+ to_unblock = blocked_set & ~new_blocked_set;
+ to_block = new_blocked_set & ~blocked_set;
+
+ if (to_block != 0)
+ {
+ int sig;
+
+ for (sig = 0; sig < NSIG; sig++)
+ if ((to_block >> sig) & 1)
+ {
+ pending_array[sig] = 0;
+ if ((old_handlers[sig] = signal (sig, blocked_handler)) != SIG_ERR)
+ blocked_set |= 1U << sig;
+ }
+ }
+
+ if (to_unblock != 0)
+ {
+ sig_atomic_t received[NSIG];
+ int sig;
+
+ for (sig = 0; sig < NSIG; sig++)
+ if ((to_unblock >> sig) & 1)
+ {
+ if (signal (sig, old_handlers[sig]) != blocked_handler)
+ /* The application changed a signal handler while the signal
+ was blocked, bypassing our rpl_signal replacement.
+ We don't support this. */
+ abort ();
+ received[sig] = pending_array[sig];
+ blocked_set &= ~(1U << sig);
+ pending_array[sig] = 0;
+ }
+ else
+ received[sig] = 0;
+
+ for (sig = 0; sig < NSIG; sig++)
+ if (received[sig])
+ raise (sig);
+ }
+ }
+ return 0;
+}
+
+/* Install the handler FUNC for signal SIG, and return the previous
+ handler. */
+handler_t
+rpl_signal (int sig, handler_t handler)
+{
+ /* We must provide a wrapper, so that a user can query what handler
+ they installed even if that signal is currently blocked. */
+ if (sig >= 0 && sig < NSIG && sig != SIGKILL && sig != SIGSTOP
+ && handler != SIG_ERR)
+ {
+ #ifdef SIGABRT_COMPAT
+ if (sig == SIGABRT_COMPAT)
+ sig = SIGABRT;
+ #endif
+
+ if (blocked_set & (1U << sig))
+ {
+ /* POSIX states that sigprocmask and signal are both
+ async-signal-safe. This is not true of our
+ implementation - there is a slight data race where an
+ asynchronous interrupt on signal A can occur after we
+ install blocked_handler but before we have updated
+ old_handlers for signal B, such that handler A can see
+ stale information if it calls signal(B). Oh well -
+ signal handlers really shouldn't try to manipulate the
+ installed handlers of unrelated signals. */
+ handler_t result = old_handlers[sig];
+ old_handlers[sig] = handler;
+ return result;
+ }
+ else
+ return signal (sig, handler);
+ }
+ else
+ {
+ errno = EINVAL;
+ return SIG_ERR;
+ }
+}
+
+#if GNULIB_defined_SIGPIPE
+/* Raise the signal SIGPIPE. */
+int
+_gl_raise_SIGPIPE (void)
+{
+ if (blocked_set & (1U << SIGPIPE))
+ pending_array[SIGPIPE] = 1;
+ else
+ {
+ handler_t handler = SIGPIPE_handler;
+ if (handler == SIG_DFL)
+ exit (128 + SIGPIPE);
+ else if (handler != SIG_IGN)
+ (*handler) (SIGPIPE);
+ }
+ return 0;
+}
+#endif
diff --git a/gnulib-tests/sleep.c b/gnulib-tests/sleep.c
new file mode 100644
index 0000000..0b58697
--- /dev/null
+++ b/gnulib-tests/sleep.c
@@ -0,0 +1,76 @@
+/* Pausing execution of the current thread.
+ Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2007.
+
+ 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 <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <unistd.h>
+
+#include <limits.h>
+
+#include "verify.h"
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+# define WIN32_LEAN_AND_MEAN /* avoid including junk */
+# include <windows.h>
+
+unsigned int
+sleep (unsigned int seconds)
+{
+ unsigned int remaining;
+
+ /* Sleep for 1 second many times, because
+ 1. Sleep is not interruptible by Ctrl-C,
+ 2. we want to avoid arithmetic overflow while multiplying with 1000. */
+ for (remaining = seconds; remaining > 0; remaining--)
+ Sleep (1000);
+
+ return remaining;
+}
+
+#elif HAVE_SLEEP
+
+# undef sleep
+
+/* Guarantee unlimited sleep and a reasonable return value. Cygwin
+ 1.5.x rejects attempts to sleep more than 49.7 days (2**32
+ milliseconds), but uses uninitialized memory which results in a
+ garbage answer. Similarly, Linux 2.6.9 with glibc 2.3.4 has a too
+ small return value when asked to sleep more than 24.85 days. */
+unsigned int
+rpl_sleep (unsigned int seconds)
+{
+ /* This requires int larger than 16 bits. */
+ verify (UINT_MAX / 24 / 24 / 60 / 60);
+ const unsigned int limit = 24 * 24 * 60 * 60;
+ while (limit < seconds)
+ {
+ unsigned int result;
+ seconds -= limit;
+ result = sleep (limit);
+ if (result)
+ return seconds + result;
+ }
+ return sleep (seconds);
+}
+
+#else /* !HAVE_SLEEP */
+
+ #error "Please port gnulib sleep.c to your platform, possibly using usleep() or select(), then report this to bug-gnulib."
+
+#endif
diff --git a/gnulib-tests/socket.c b/gnulib-tests/socket.c
new file mode 100644
index 0000000..84f4d94
--- /dev/null
+++ b/gnulib-tests/socket.c
@@ -0,0 +1,49 @@
+/* socket.c --- wrappers for Windows socket function
+
+ Copyright (C) 2008-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Paolo Bonzini */
+
+#include <config.h>
+
+#define WIN32_LEAN_AND_MEAN
+/* Get winsock2.h. */
+#include <sys/socket.h>
+
+/* Get set_winsock_errno, FD_TO_SOCKET etc. */
+#include "w32sock.h"
+
+#include "sockets.h"
+
+int
+rpl_socket (int domain, int type, int protocol)
+{
+ SOCKET fh;
+
+ gl_sockets_startup (SOCKETS_1_1);
+
+ /* We have to use WSASocket() to create non-overlapped IO sockets.
+ Overlapped IO sockets cannot be used with read/write. */
+ fh = WSASocket (domain, type, protocol, NULL, 0, 0);
+
+ if (fh == INVALID_SOCKET)
+ {
+ set_winsock_errno ();
+ return -1;
+ }
+ else
+ return SOCKET_TO_FD (fh);
+}
diff --git a/gnulib-tests/sockets.c b/gnulib-tests/sockets.c
new file mode 100644
index 0000000..eec1ec8
--- /dev/null
+++ b/gnulib-tests/sockets.c
@@ -0,0 +1,161 @@
+/* sockets.c --- wrappers for Windows socket functions
+
+ Copyright (C) 2008-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Simon Josefsson */
+
+#include <config.h>
+
+/* Specification. */
+#include "sockets.h"
+
+#if WINDOWS_SOCKETS
+
+/* This includes winsock2.h on MinGW. */
+# include <sys/socket.h>
+
+# include "fd-hook.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"
+
+static int
+close_fd_maybe_socket (const struct fd_hook *remaining_list,
+ gl_close_fn primary,
+ int fd)
+{
+ /* Note about multithread-safety: There is a race condition where, between
+ our calls to closesocket() and the primary close(), some other thread
+ could make system calls that allocate precisely the same HANDLE value
+ as sock; then the primary close() would call CloseHandle() on it. */
+ SOCKET sock;
+ WSANETWORKEVENTS ev;
+
+ /* Test whether fd refers to a socket. */
+ sock = FD_TO_SOCKET (fd);
+ ev.lNetworkEvents = 0xDEADBEEF;
+ WSAEnumNetworkEvents (sock, NULL, &ev);
+ if (ev.lNetworkEvents != 0xDEADBEEF)
+ {
+ /* fd refers to a socket. */
+ /* FIXME: other applications, like squid, use an undocumented
+ _free_osfhnd free function. But this is not enough: The 'osfile'
+ flags for fd also needs to be cleared, but it is hard to access it.
+ Instead, here we just close twice the file descriptor. */
+ if (closesocket (sock))
+ {
+ set_winsock_errno ();
+ return -1;
+ }
+ else
+ {
+ /* This call frees the file descriptor and does a
+ CloseHandle ((HANDLE) _get_osfhandle (fd)), which fails. */
+ _close (fd);
+ return 0;
+ }
+ }
+ else
+ /* Some other type of file descriptor. */
+ return execute_close_hooks (remaining_list, primary, fd);
+}
+
+static int
+ioctl_fd_maybe_socket (const struct fd_hook *remaining_list,
+ gl_ioctl_fn primary,
+ int fd, int request, void *arg)
+{
+ SOCKET sock;
+ WSANETWORKEVENTS ev;
+
+ /* Test whether fd refers to a socket. */
+ sock = FD_TO_SOCKET (fd);
+ ev.lNetworkEvents = 0xDEADBEEF;
+ WSAEnumNetworkEvents (sock, NULL, &ev);
+ if (ev.lNetworkEvents != 0xDEADBEEF)
+ {
+ /* fd refers to a socket. */
+ if (ioctlsocket (sock, request, arg) < 0)
+ {
+ set_winsock_errno ();
+ return -1;
+ }
+ else
+ return 0;
+ }
+ else
+ /* Some other type of file descriptor. */
+ return execute_ioctl_hooks (remaining_list, primary, fd, request, arg);
+}
+
+static struct fd_hook fd_sockets_hook;
+
+static int initialized_sockets_version /* = 0 */;
+
+#endif /* WINDOWS_SOCKETS */
+
+int
+gl_sockets_startup (int version _GL_UNUSED)
+{
+#if WINDOWS_SOCKETS
+ if (version > initialized_sockets_version)
+ {
+ WSADATA data;
+ int err;
+
+ err = WSAStartup (version, &data);
+ if (err != 0)
+ return 1;
+
+ if (data.wVersion != version)
+ {
+ WSACleanup ();
+ return 2;
+ }
+
+ if (initialized_sockets_version == 0)
+ register_fd_hook (close_fd_maybe_socket, ioctl_fd_maybe_socket,
+ &fd_sockets_hook);
+
+ initialized_sockets_version = version;
+ }
+#endif
+
+ return 0;
+}
+
+int
+gl_sockets_cleanup (void)
+{
+#if WINDOWS_SOCKETS
+ int err;
+
+ initialized_sockets_version = 0;
+
+ unregister_fd_hook (&fd_sockets_hook);
+
+ err = WSACleanup ();
+ if (err != 0)
+ return 1;
+#endif
+
+ return 0;
+}
diff --git a/gnulib-tests/sockets.h b/gnulib-tests/sockets.h
new file mode 100644
index 0000000..5a83332
--- /dev/null
+++ b/gnulib-tests/sockets.h
@@ -0,0 +1,66 @@
+/* sockets.h - wrappers for Windows socket functions
+
+ Copyright (C) 2008-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Simon Josefsson */
+
+#ifndef SOCKETS_H
+#define SOCKETS_H 1
+
+#define SOCKETS_1_0 0x0001
+#define SOCKETS_1_1 0x0101
+#define SOCKETS_2_0 0x0002
+#define SOCKETS_2_1 0x0102
+#define SOCKETS_2_2 0x0202
+
+int gl_sockets_startup (int version)
+#ifndef WINDOWS_SOCKETS
+ _GL_ATTRIBUTE_CONST
+#endif
+ ;
+
+int gl_sockets_cleanup (void)
+#ifndef WINDOWS_SOCKETS
+ _GL_ATTRIBUTE_CONST
+#endif
+ ;
+
+/* 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. */
+#ifdef WINDOWS_SOCKETS
+
+# include <sys/socket.h>
+
+# if GNULIB_MSVC_NOTHROW
+# include "msvc-nothrow.h"
+# else
+# include <io.h>
+# endif
+
+static inline SOCKET
+gl_fd_to_handle (int fd)
+{
+ return _get_osfhandle (fd);
+}
+
+#else
+
+# define gl_fd_to_handle(x) (x)
+
+#endif /* WINDOWS_SOCKETS */
+
+#endif /* SOCKETS_H */
diff --git a/gnulib-tests/stdio-impl.h b/gnulib-tests/stdio-impl.h
index 75a945e..05c5752 100644
--- a/gnulib-tests/stdio-impl.h
+++ b/gnulib-tests/stdio-impl.h
@@ -1,5 +1,5 @@
/* Implementation details of FILE streams.
- Copyright (C) 2007-2008, 2010-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2008, 2010-2018 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
@@ -12,12 +12,18 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Many stdio implementations have the same logic and therefore can share
the same implementation of stdio extension API, except that some fields
have different naming conventions, or their access requires some casts. */
+/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this
+ problem by defining it ourselves. FIXME: Do not rely on glibc
+ internals. */
+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
+# define _IO_IN_BACKUP 0x100
+#endif
/* BSD stdio derived implementations. */
@@ -32,7 +38,7 @@
/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
# if defined __DragonFly__ /* DragonFly */
- /* See <http://www.dragonflybsd.org/cvsweb/src/lib/libc/stdio/priv_stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>. */
+ /* See <https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/lib/libc/stdio/priv_stdio.h>. */
# define fp_ ((struct { struct __FILE_public pub; \
struct { unsigned char *_base; int _size; } _bf; \
void *cookie; \
@@ -49,7 +55,7 @@
fpos_t _offset; \
/* More fields, not relevant here. */ \
} *) fp)
- /* See <http://www.dragonflybsd.org/cvsweb/src/include/stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>. */
+ /* See <https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/include/stdio.h>. */
# define _p pub._p
# define _flags pub._flags
# define _r pub._r
@@ -60,7 +66,7 @@
# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __minix || defined __ANDROID__ /* NetBSD >= 1.5ZA, OpenBSD, Minix 3, Android */
/* See <http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup>
- and <http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup> */
+ and <https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup> */
struct __sfileext
{
struct __sbuf _ub; /* ungetc buffer */
@@ -81,7 +87,7 @@
#ifdef __TANDEM /* NonStop Kernel */
# ifndef _IOERR
/* These values were determined by the program 'stdioext-flags' at
- <http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00165.html>. */
+ <https://lists.gnu.org/r/bug-gnulib/2010-12/msg00165.html>. */
# define _IOERR 0x40
# define _IOREAD 0x80
# define _IOWRT 0x4
@@ -99,6 +105,8 @@
int _file; \
unsigned int _flag; \
} *) fp)
+# elif defined __VMS /* OpenVMS */
+# define fp_ ((struct _iobuf *) fp)
# else
# define fp_ fp
# endif
@@ -130,7 +138,7 @@ struct _gl_real_FILE
# define fp_ ((struct _gl_real_FILE *) fp)
/* These values were determined by a program similar to the one at
- <http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00165.html>. */
+ <https://lists.gnu.org/r/bug-gnulib/2010-12/msg00165.html>. */
# define _IOREAD 0x1
# define _IOWRT 0x2
# define _IORW 0x4
diff --git a/gnulib-tests/strdup.c b/gnulib-tests/strdup.c
index 0c096e3..ce43940 100644
--- a/gnulib-tests/strdup.c
+++ b/gnulib-tests/strdup.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2017 Free Software
+/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2018 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
@@ -14,7 +14,7 @@
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/>. */
+ with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _LIBC
# include <config.h>
diff --git a/gnulib-tests/strerror_r.c b/gnulib-tests/strerror_r.c
new file mode 100644
index 0000000..c556c26
--- /dev/null
+++ b/gnulib-tests/strerror_r.c
@@ -0,0 +1,460 @@
+/* strerror_r.c --- POSIX compatible system error routine
+
+ Copyright (C) 2010-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2010. */
+
+#include <config.h>
+
+/* Enable declaration of sys_nerr and sys_errlist in <errno.h> on NetBSD. */
+#define _NETBSD_SOURCE 1
+
+/* Specification. */
+#include <string.h>
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#if !HAVE_SNPRINTF
+# include <stdarg.h>
+#endif
+
+#include "strerror-override.h"
+
+#if (__GLIBC__ >= 2 || defined __UCLIBC__ || defined __CYGWIN__) && HAVE___XPG_STRERROR_R /* glibc >= 2.3.4, cygwin >= 1.7.9 */
+
+# define USE_XPG_STRERROR_R 1
+extern
+#ifdef __cplusplus
+"C"
+#endif
+int __xpg_strerror_r (int errnum, char *buf, size_t buflen);
+
+#elif HAVE_DECL_STRERROR_R && !(__GLIBC__ >= 2 || defined __UCLIBC__ || defined __CYGWIN__)
+
+/* The system's strerror_r function is OK, except that its third argument
+ is 'int', not 'size_t', or its return type is wrong. */
+
+# include <limits.h>
+
+# define USE_SYSTEM_STRERROR_R 1
+
+#else /* (__GLIBC__ >= 2 || defined __UCLIBC__ || defined __CYGWIN__ ? !HAVE___XPG_STRERROR_R : !HAVE_DECL_STRERROR_R) */
+
+/* Use the system's strerror(). Exclude glibc and cygwin because the
+ system strerror_r has the wrong return type, and cygwin 1.7.9
+ strerror_r clobbers strerror. */
+# undef strerror
+
+# define USE_SYSTEM_STRERROR 1
+
+# if defined __NetBSD__ || defined __hpux || ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __sgi || (defined __sun && !defined _LP64) || defined __CYGWIN__
+
+/* No locking needed. */
+
+/* Get catgets internationalization functions. */
+# if HAVE_CATGETS
+# include <nl_types.h>
+# endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Get sys_nerr, sys_errlist on HP-UX (otherwise only declared in C++ mode).
+ Get sys_nerr, sys_errlist on IRIX (otherwise only declared with _SGIAPI). */
+# if defined __hpux || defined __sgi
+extern int sys_nerr;
+extern char *sys_errlist[];
+# endif
+
+/* Get sys_nerr on Solaris. */
+# if defined __sun && !defined _LP64
+extern int sys_nerr;
+# endif
+
+#ifdef __cplusplus
+}
+#endif
+
+# else
+
+# include "glthread/lock.h"
+
+/* This lock protects the buffer returned by strerror(). We assume that
+ no other uses of strerror() exist in the program. */
+gl_lock_define_initialized(static, strerror_lock)
+
+# endif
+
+#endif
+
+/* On MSVC, there is no snprintf() function, just a _snprintf().
+ It is of lower quality, but sufficient for the simple use here.
+ We only have to make sure to NUL terminate the result (_snprintf
+ does not NUL terminate, like strncpy). */
+#if !HAVE_SNPRINTF
+static int
+local_snprintf (char *buf, size_t buflen, const char *format, ...)
+{
+ va_list args;
+ int result;
+
+ va_start (args, format);
+ result = _vsnprintf (buf, buflen, format, args);
+ va_end (args);
+ if (buflen > 0 && (result < 0 || result >= buflen))
+ buf[buflen - 1] = '\0';
+ return result;
+}
+# define snprintf local_snprintf
+#endif
+
+/* Copy as much of MSG into BUF as possible, without corrupting errno.
+ Return 0 if MSG fit in BUFLEN, otherwise return ERANGE. */
+static int
+safe_copy (char *buf, size_t buflen, const char *msg)
+{
+ size_t len = strlen (msg);
+ int ret;
+
+ if (len < buflen)
+ {
+ /* Although POSIX allows memcpy() to corrupt errno, we don't
+ know of any implementation where this is a real problem. */
+ memcpy (buf, msg, len + 1);
+ ret = 0;
+ }
+ else
+ {
+ memcpy (buf, msg, buflen - 1);
+ buf[buflen - 1] = '\0';
+ ret = ERANGE;
+ }
+ return ret;
+}
+
+
+int
+strerror_r (int errnum, char *buf, size_t buflen)
+#undef strerror_r
+{
+ /* Filter this out now, so that rest of this replacement knows that
+ there is room for a non-empty message and trailing NUL. */
+ if (buflen <= 1)
+ {
+ if (buflen)
+ *buf = '\0';
+ return ERANGE;
+ }
+ *buf = '\0';
+
+ /* Check for gnulib overrides. */
+ {
+ char const *msg = strerror_override (errnum);
+
+ if (msg)
+ return safe_copy (buf, buflen, msg);
+ }
+
+ {
+ int ret;
+ int saved_errno = errno;
+
+#if USE_XPG_STRERROR_R
+
+ {
+ ret = __xpg_strerror_r (errnum, buf, buflen);
+ if (ret < 0)
+ ret = errno;
+ if (!*buf)
+ {
+ /* glibc 2.13 would not touch buf on err, so we have to fall
+ back to GNU strerror_r which always returns a thread-safe
+ untruncated string to (partially) copy into our buf. */
+ safe_copy (buf, buflen, strerror_r (errnum, buf, buflen));
+ }
+ }
+
+#elif USE_SYSTEM_STRERROR_R
+
+ if (buflen > INT_MAX)
+ buflen = INT_MAX;
+
+# ifdef __hpux
+ /* On HP-UX 11.31, strerror_r always fails when buflen < 80; it
+ also fails to change buf on EINVAL. */
+ {
+ char stackbuf[80];
+
+ if (buflen < sizeof stackbuf)
+ {
+ ret = strerror_r (errnum, stackbuf, sizeof stackbuf);
+ if (ret == 0)
+ ret = safe_copy (buf, buflen, stackbuf);
+ }
+ else
+ ret = strerror_r (errnum, buf, buflen);
+ }
+# else
+ ret = strerror_r (errnum, buf, buflen);
+
+ /* Some old implementations may return (-1, EINVAL) instead of EINVAL.
+ But on Haiku, valid error numbers are negative. */
+# if !defined __HAIKU__
+ if (ret < 0)
+ ret = errno;
+# endif
+# endif
+
+# if defined _AIX || defined __HAIKU__
+ /* AIX and Haiku return 0 rather than ERANGE when truncating strings; try
+ again until we are sure we got the entire string. */
+ if (!ret && strlen (buf) == buflen - 1)
+ {
+ char stackbuf[STACKBUF_LEN];
+ size_t len;
+ strerror_r (errnum, stackbuf, sizeof stackbuf);
+ len = strlen (stackbuf);
+ /* STACKBUF_LEN should have been large enough. */
+ if (len + 1 == sizeof stackbuf)
+ abort ();
+ if (buflen <= len)
+ ret = ERANGE;
+ }
+# else
+ /* Solaris 10 does not populate buf on ERANGE. OpenBSD 4.7
+ truncates early on ERANGE rather than return a partial integer.
+ We prefer the maximal string. We set buf[0] earlier, and we
+ know of no implementation that modifies buf to be an
+ unterminated string, so this strlen should be portable in
+ practice (rather than pulling in a safer strnlen). */
+ if (ret == ERANGE && strlen (buf) < buflen - 1)
+ {
+ char stackbuf[STACKBUF_LEN];
+
+ /* STACKBUF_LEN should have been large enough. */
+ if (strerror_r (errnum, stackbuf, sizeof stackbuf) == ERANGE)
+ abort ();
+ safe_copy (buf, buflen, stackbuf);
+ }
+# endif
+
+#else /* USE_SYSTEM_STRERROR */
+
+ /* Try to do what strerror (errnum) does, but without clobbering the
+ buffer used by strerror(). */
+
+# if defined __NetBSD__ || defined __hpux || ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __CYGWIN__ /* NetBSD, HP-UX, native Windows, Cygwin */
+
+ /* NetBSD: sys_nerr, sys_errlist are declared through _NETBSD_SOURCE
+ and <errno.h> above.
+ HP-UX: sys_nerr, sys_errlist are declared explicitly above.
+ native Windows: sys_nerr, sys_errlist are declared in <stdlib.h>.
+ Cygwin: sys_nerr, sys_errlist are declared in <errno.h>. */
+ if (errnum >= 0 && errnum < sys_nerr)
+ {
+# if HAVE_CATGETS && (defined __NetBSD__ || defined __hpux)
+# if defined __NetBSD__
+ nl_catd catd = catopen ("libc", NL_CAT_LOCALE);
+ const char *errmsg =
+ (catd != (nl_catd)-1
+ ? catgets (catd, 1, errnum, sys_errlist[errnum])
+ : sys_errlist[errnum]);
+# endif
+# if defined __hpux
+ nl_catd catd = catopen ("perror", NL_CAT_LOCALE);
+ const char *errmsg =
+ (catd != (nl_catd)-1
+ ? catgets (catd, 1, 1 + errnum, sys_errlist[errnum])
+ : sys_errlist[errnum]);
+# endif
+# else
+ const char *errmsg = sys_errlist[errnum];
+# endif
+ if (errmsg == NULL || *errmsg == '\0')
+ ret = EINVAL;
+ else
+ ret = safe_copy (buf, buflen, errmsg);
+# if HAVE_CATGETS && (defined __NetBSD__ || defined __hpux)
+ if (catd != (nl_catd)-1)
+ catclose (catd);
+# endif
+ }
+ else
+ ret = EINVAL;
+
+# elif defined __sgi || (defined __sun && !defined _LP64) /* IRIX, Solaris <= 9 32-bit */
+
+ /* For a valid error number, the system's strerror() function returns
+ a pointer to a not copied string, not to a buffer. */
+ if (errnum >= 0 && errnum < sys_nerr)
+ {
+ char *errmsg = strerror (errnum);
+
+ if (errmsg == NULL || *errmsg == '\0')
+ ret = EINVAL;
+ else
+ ret = safe_copy (buf, buflen, errmsg);
+ }
+ else
+ ret = EINVAL;
+
+# else
+
+ gl_lock_lock (strerror_lock);
+
+ {
+ char *errmsg = strerror (errnum);
+
+ /* For invalid error numbers, strerror() on
+ - IRIX 6.5 returns NULL,
+ - HP-UX 11 returns an empty string. */
+ if (errmsg == NULL || *errmsg == '\0')
+ ret = EINVAL;
+ else
+ ret = safe_copy (buf, buflen, errmsg);
+ }
+
+ gl_lock_unlock (strerror_lock);
+
+# endif
+
+#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)
+ {
+#if defined __HAIKU__
+ /* For consistency with perror(). */
+ snprintf (buf, buflen, "Unknown Application Error (%d)", errnum);
+#else
+ snprintf (buf, buflen, "Unknown error %d", errnum);
+#endif
+ }
+
+ errno = saved_errno;
+ return ret;
+ }
+}
diff --git a/gnulib-tests/symlink.c b/gnulib-tests/symlink.c
index 60d4c14..c1c4b40 100644
--- a/gnulib-tests/symlink.c
+++ b/gnulib-tests/symlink.c
@@ -1,5 +1,5 @@
/* Stub for symlink().
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/sys_ioctl.in.h b/gnulib-tests/sys_ioctl.in.h
new file mode 100644
index 0000000..42a5ca4
--- /dev/null
+++ b/gnulib-tests/sys_ioctl.in.h
@@ -0,0 +1,79 @@
+/* Substitute for and wrapper around <sys/ioctl.h>.
+ Copyright (C) 2008-2018 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, 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 <https://www.gnu.org/licenses/>. */
+
+#ifndef _@GUARD_PREFIX@_SYS_IOCTL_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* The include_next requires a split double-inclusion guard. */
+#if @HAVE_SYS_IOCTL_H@
+# @INCLUDE_NEXT@ @NEXT_SYS_IOCTL_H@
+#endif
+
+#ifndef _@GUARD_PREFIX@_SYS_IOCTL_H
+#define _@GUARD_PREFIX@_SYS_IOCTL_H
+
+/* AIX 5.1 and Solaris 10 declare ioctl() in <unistd.h> and in <stropts.h>,
+ but not in <sys/ioctl.h>.
+ Haiku declares ioctl() in <unistd.h>, but not in <sys/ioctl.h>.
+ But avoid namespace pollution on glibc systems. */
+#ifndef __GLIBC__
+# include <unistd.h>
+#endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+
+/* Declare overridden functions. */
+
+#if @GNULIB_IOCTL@
+# if @REPLACE_IOCTL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef ioctl
+# define ioctl rpl_ioctl
+# endif
+_GL_FUNCDECL_RPL (ioctl, int,
+ (int fd, int request, ... /* {void *,char *} arg */));
+_GL_CXXALIAS_RPL (ioctl, int,
+ (int fd, int request, ... /* {void *,char *} arg */));
+# else
+# if @SYS_IOCTL_H_HAVE_WINSOCK2_H@ || 1
+_GL_FUNCDECL_SYS (ioctl, int,
+ (int fd, int request, ... /* {void *,char *} arg */));
+# endif
+_GL_CXXALIAS_SYS (ioctl, int,
+ (int fd, int request, ... /* {void *,char *} arg */));
+# endif
+_GL_CXXALIASWARN (ioctl);
+#elif @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
+# undef ioctl
+# define ioctl ioctl_used_without_requesting_gnulib_module_ioctl
+#elif defined GNULIB_POSIXCHECK
+# undef ioctl
+# if HAVE_RAW_DECL_IOCTL
+_GL_WARN_ON_USE (ioctl, "ioctl does not portably work on sockets - "
+ "use gnulib module ioctl for portability");
+# endif
+#endif
+
+
+#endif /* _@GUARD_PREFIX@_SYS_IOCTL_H */
+#endif /* _@GUARD_PREFIX@_SYS_IOCTL_H */
diff --git a/gnulib-tests/sys_select.in.h b/gnulib-tests/sys_select.in.h
new file mode 100644
index 0000000..154e570
--- /dev/null
+++ b/gnulib-tests/sys_select.in.h
@@ -0,0 +1,319 @@
+/* Substitute for <sys/select.h>.
+ Copyright (C) 2007-2018 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, 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 <https://www.gnu.org/licenses/>. */
+
+# if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+# endif
+@PRAGMA_COLUMNS@
+
+/* On OSF/1 and Solaris 2.6, <sys/types.h> and <sys/time.h>
+ both include <sys/select.h>.
+ On Cygwin, <sys/time.h> includes <sys/select.h>.
+ Simply delegate to the system's header in this case. */
+#if (@HAVE_SYS_SELECT_H@ \
+ && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H \
+ && ((defined __osf__ && defined _SYS_TYPES_H_ \
+ && defined _OSF_SOURCE) \
+ || (defined __sun && defined _SYS_TYPES_H \
+ && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE) \
+ || defined __EXTENSIONS__))))
+
+# define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H
+# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
+
+#elif (@HAVE_SYS_SELECT_H@ \
+ && (defined _CYGWIN_SYS_TIME_H \
+ || (!defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H \
+ && ((defined __osf__ && defined _SYS_TIME_H_ \
+ && defined _OSF_SOURCE) \
+ || (defined __sun && defined _SYS_TIME_H \
+ && (! (defined _XOPEN_SOURCE \
+ || defined _POSIX_C_SOURCE) \
+ || defined __EXTENSIONS__))))))
+
+# define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H
+# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
+
+/* On IRIX 6.5, <sys/timespec.h> includes <sys/types.h>, which includes
+ <sys/bsd_types.h>, which includes <sys/select.h>. At this point we cannot
+ include <signal.h>, because that includes <internal/signal_core.h>, which
+ gives a syntax error because <sys/timespec.h> has not been completely
+ processed. Simply delegate to the system's header in this case. */
+#elif @HAVE_SYS_SELECT_H@ && defined __sgi && (defined _SYS_BSD_TYPES_H && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_BSD_TYPES_H)
+
+# define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_BSD_TYPES_H
+# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
+
+/* On OpenBSD 5.0, <pthread.h> includes <sys/types.h>, which includes
+ <sys/select.h>. At this point we cannot include <signal.h>, because that
+ includes gnulib's pthread.h override, which gives a syntax error because
+ /usr/include/pthread.h has not been completely processed. Simply delegate
+ to the system's header in this case. */
+#elif @HAVE_SYS_SELECT_H@ && defined __OpenBSD__ && (defined _PTHREAD_H_ && !defined PTHREAD_MUTEX_INITIALIZER)
+
+# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
+
+#else
+
+#ifndef _@GUARD_PREFIX@_SYS_SELECT_H
+
+/* On many platforms, <sys/select.h> assumes prior inclusion of
+ <sys/types.h>. Also, mingw defines sigset_t there, instead of
+ in <signal.h> where it belongs. */
+#include <sys/types.h>
+
+#if @HAVE_SYS_SELECT_H@
+
+/* On OSF/1 4.0, <sys/select.h> provides only a forward declaration
+ of 'struct timeval', and no definition of this type.
+ Also, Mac OS X, AIX, HP-UX, IRIX, Solaris, Interix declare select()
+ in <sys/time.h>.
+ But avoid namespace pollution on glibc systems and "unknown type
+ name" problems on Cygwin. */
+# if !(defined __GLIBC__ || defined __CYGWIN__)
+# include <sys/time.h>
+# endif
+
+/* On AIX 7 and Solaris 10, <sys/select.h> provides an FD_ZERO implementation
+ that relies on memset(), but without including <string.h>.
+ But in any case avoid namespace pollution on glibc systems. */
+# if (defined __OpenBSD__ || defined _AIX || defined __sun || defined __osf__ || defined __BEOS__) \
+ && ! defined __GLIBC__
+# include <string.h>
+# endif
+
+/* The include_next requires a split double-inclusion guard. */
+# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
+
+#endif
+
+/* Get definition of 'sigset_t'.
+ But avoid namespace pollution on glibc systems and "unknown type
+ name" problems on Cygwin.
+ Do this after the include_next (for the sake of OpenBSD 5.0) but before
+ the split double-inclusion guard (for the sake of Solaris). */
+#if !((defined __GLIBC__ || defined __CYGWIN__) && !defined __UCLIBC__)
+# include <signal.h>
+#endif
+
+#ifndef _@GUARD_PREFIX@_SYS_SELECT_H
+#define _@GUARD_PREFIX@_SYS_SELECT_H
+
+#if !@HAVE_SYS_SELECT_H@
+/* A platform that lacks <sys/select.h>. */
+/* Get the 'struct timeval' and 'fd_set' types and the FD_* macros
+ on most platforms. */
+# include <sys/time.h>
+/* On HP-UX 11, <sys/time.h> provides an FD_ZERO implementation
+ that relies on memset(), but without including <string.h>. */
+# if defined __hpux
+# include <string.h>
+# endif
+/* On native Windows platforms:
+ Get the 'fd_set' type.
+ Get the close() declaration before we override it. */
+# if @HAVE_WINSOCK2_H@
+# if !defined _GL_INCLUDING_WINSOCK2_H
+# define _GL_INCLUDING_WINSOCK2_H
+# include <winsock2.h>
+# undef _GL_INCLUDING_WINSOCK2_H
+# endif
+# include <io.h>
+# endif
+#endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+
+/* Fix some definitions from <winsock2.h>. */
+
+#if @HAVE_WINSOCK2_H@
+
+# if !GNULIB_defined_rpl_fd_isset
+
+/* Re-define FD_ISSET to avoid a WSA call while we are not using
+ network sockets. */
+static int
+rpl_fd_isset (SOCKET fd, fd_set * set)
+{
+ u_int i;
+ if (set == NULL)
+ return 0;
+
+ for (i = 0; i < set->fd_count; i++)
+ if (set->fd_array[i] == fd)
+ return 1;
+
+ return 0;
+}
+
+# define GNULIB_defined_rpl_fd_isset 1
+# endif
+
+# undef FD_ISSET
+# define FD_ISSET(fd, set) rpl_fd_isset(fd, set)
+
+#endif
+
+/* Hide some function declarations from <winsock2.h>. */
+
+#if @HAVE_WINSOCK2_H@
+# if !defined _@GUARD_PREFIX@_UNISTD_H
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef close
+# define close close_used_without_including_unistd_h
+# else
+ _GL_WARN_ON_USE (close,
+ "close() used without including <unistd.h>");
+# endif
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef gethostname
+# define gethostname gethostname_used_without_including_unistd_h
+# else
+ _GL_WARN_ON_USE (gethostname,
+ "gethostname() used without including <unistd.h>");
+# endif
+# endif
+# if !defined _@GUARD_PREFIX@_SYS_SOCKET_H
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef socket
+# define socket socket_used_without_including_sys_socket_h
+# undef connect
+# define connect connect_used_without_including_sys_socket_h
+# undef accept
+# define accept accept_used_without_including_sys_socket_h
+# undef bind
+# define bind bind_used_without_including_sys_socket_h
+# undef getpeername
+# define getpeername getpeername_used_without_including_sys_socket_h
+# undef getsockname
+# define getsockname getsockname_used_without_including_sys_socket_h
+# undef getsockopt
+# define getsockopt getsockopt_used_without_including_sys_socket_h
+# undef listen
+# define listen listen_used_without_including_sys_socket_h
+# undef recv
+# define recv recv_used_without_including_sys_socket_h
+# undef send
+# define send send_used_without_including_sys_socket_h
+# undef recvfrom
+# define recvfrom recvfrom_used_without_including_sys_socket_h
+# undef sendto
+# define sendto sendto_used_without_including_sys_socket_h
+# undef setsockopt
+# define setsockopt setsockopt_used_without_including_sys_socket_h
+# undef shutdown
+# define shutdown shutdown_used_without_including_sys_socket_h
+# else
+ _GL_WARN_ON_USE (socket,
+ "socket() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (connect,
+ "connect() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (accept,
+ "accept() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (bind,
+ "bind() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (getpeername,
+ "getpeername() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (getsockname,
+ "getsockname() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (getsockopt,
+ "getsockopt() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (listen,
+ "listen() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (recv,
+ "recv() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (send,
+ "send() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (recvfrom,
+ "recvfrom() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (sendto,
+ "sendto() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (setsockopt,
+ "setsockopt() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (shutdown,
+ "shutdown() used without including <sys/socket.h>");
+# endif
+# endif
+#endif
+
+
+#if @GNULIB_PSELECT@
+# if @REPLACE_PSELECT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pselect
+# define pselect rpl_pselect
+# endif
+_GL_FUNCDECL_RPL (pselect, int,
+ (int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
+ struct timespec const *restrict, const sigset_t *restrict));
+_GL_CXXALIAS_RPL (pselect, int,
+ (int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
+ struct timespec const *restrict, const sigset_t *restrict));
+# else
+# if !@HAVE_PSELECT@
+_GL_FUNCDECL_SYS (pselect, int,
+ (int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
+ struct timespec const *restrict, const sigset_t *restrict));
+# endif
+_GL_CXXALIAS_SYS (pselect, int,
+ (int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
+ struct timespec const *restrict, const sigset_t *restrict));
+# endif
+_GL_CXXALIASWARN (pselect);
+#elif defined GNULIB_POSIXCHECK
+# undef pselect
+# if HAVE_RAW_DECL_PSELECT
+_GL_WARN_ON_USE (pselect, "pselect is not portable - "
+ "use gnulib module pselect for portability");
+# endif
+#endif
+
+#if @GNULIB_SELECT@
+# if @REPLACE_SELECT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef select
+# define select rpl_select
+# endif
+_GL_FUNCDECL_RPL (select, int,
+ (int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
+ struct timeval *restrict));
+_GL_CXXALIAS_RPL (select, int,
+ (int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
+ struct timeval *restrict));
+# else
+_GL_CXXALIAS_SYS (select, int,
+ (int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
+ struct timeval *restrict));
+# endif
+_GL_CXXALIASWARN (select);
+#elif @HAVE_WINSOCK2_H@
+# undef select
+# define select select_used_without_requesting_gnulib_module_select
+#elif defined GNULIB_POSIXCHECK
+# undef select
+# if HAVE_RAW_DECL_SELECT
+_GL_WARN_ON_USE (select, "select is not always POSIX compliant - "
+ "use gnulib module select for portability");
+# endif
+#endif
+
+
+#endif /* _@GUARD_PREFIX@_SYS_SELECT_H */
+#endif /* _@GUARD_PREFIX@_SYS_SELECT_H */
+#endif /* OSF/1 */
diff --git a/gnulib-tests/sys_socket.c b/gnulib-tests/sys_socket.c
new file mode 100644
index 0000000..3b261da
--- /dev/null
+++ b/gnulib-tests/sys_socket.c
@@ -0,0 +1,4 @@
+#include <config.h>
+#define _GL_SYS_SOCKET_INLINE _GL_EXTERN_INLINE
+#include "sys/socket.h"
+typedef int dummy;
diff --git a/gnulib-tests/sys_socket.in.h b/gnulib-tests/sys_socket.in.h
new file mode 100644
index 0000000..7a125e1
--- /dev/null
+++ b/gnulib-tests/sys_socket.in.h
@@ -0,0 +1,706 @@
+/* Provide a sys/socket header file for systems lacking it (read: MinGW)
+ and for systems where it is incomplete.
+ Copyright (C) 2005-2018 Free Software Foundation, Inc.
+ Written by Simon Josefsson.
+
+ 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, 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 <https://www.gnu.org/licenses/>. */
+
+/* This file is supposed to be used on platforms that lack <sys/socket.h>,
+ on platforms where <sys/socket.h> cannot be included standalone, and on
+ platforms where <sys/socket.h> does not provide all necessary definitions.
+ It is intended to provide definitions and prototypes needed by an
+ application. */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+#if defined _GL_ALREADY_INCLUDING_SYS_SOCKET_H
+/* Special invocation convention:
+ - On Cygwin 1.5.x we have a sequence of nested includes
+ <sys/socket.h> -> <cygwin/socket.h> -> <asm/socket.h> -> <cygwin/if.h>,
+ and the latter includes <sys/socket.h>. In this situation, the functions
+ are not yet declared, therefore we cannot provide the C++ aliases. */
+
+#@INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@
+
+#else
+/* Normal invocation convention. */
+
+#ifndef _@GUARD_PREFIX@_SYS_SOCKET_H
+
+#if @HAVE_SYS_SOCKET_H@
+
+# define _GL_ALREADY_INCLUDING_SYS_SOCKET_H
+
+/* On many platforms, <sys/socket.h> assumes prior inclusion of
+ <sys/types.h>. */
+# include <sys/types.h>
+
+/* On FreeBSD 6.4, <sys/socket.h> defines some macros that assume that NULL
+ is defined. */
+# include <stddef.h>
+
+/* The include_next requires a split double-inclusion guard. */
+# @INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@
+
+# undef _GL_ALREADY_INCLUDING_SYS_SOCKET_H
+
+#endif
+
+#ifndef _@GUARD_PREFIX@_SYS_SOCKET_H
+#define _@GUARD_PREFIX@_SYS_SOCKET_H
+
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_SYS_SOCKET_INLINE
+# define _GL_SYS_SOCKET_INLINE _GL_INLINE
+#endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+#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
+
+#if @HAVE_STRUCT_SOCKADDR_STORAGE@
+/* Make the 'struct sockaddr_storage' field 'ss_family' visible on AIX 7.1. */
+# if !@HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@
+# ifndef ss_family
+# define ss_family __ss_family
+# endif
+# endif
+#else
+# include <stdalign.h>
+/* Code taken from glibc sysdeps/unix/sysv/linux/bits/socket.h on
+ 2009-05-08, licensed under LGPLv2.1+, plus portability fixes. */
+# define __ss_aligntype unsigned long int
+# define _SS_SIZE 256
+# define _SS_PADSIZE \
+ (_SS_SIZE - ((sizeof (sa_family_t) >= alignof (__ss_aligntype) \
+ ? sizeof (sa_family_t) \
+ : alignof (__ss_aligntype)) \
+ + sizeof (__ss_aligntype)))
+
+# if !GNULIB_defined_struct_sockaddr_storage
+struct sockaddr_storage
+{
+ sa_family_t ss_family; /* Address family, etc. */
+ __ss_aligntype __ss_align; /* Force desired alignment. */
+ char __ss_padding[_SS_PADSIZE];
+};
+# define GNULIB_defined_struct_sockaddr_storage 1
+# endif
+
+#endif
+
+/* Get struct iovec. */
+/* But avoid namespace pollution on glibc systems. */
+#if ! defined __GLIBC__
+# include <sys/uio.h>
+#endif
+
+#if @HAVE_SYS_SOCKET_H@
+
+/* A platform that has <sys/socket.h>. */
+
+/* For shutdown(). */
+# if !defined SHUT_RD
+# define SHUT_RD 0
+# endif
+# if !defined SHUT_WR
+# define SHUT_WR 1
+# endif
+# if !defined SHUT_RDWR
+# define SHUT_RDWR 2
+# endif
+
+# ifdef __VMS /* OpenVMS */
+# ifndef CMSG_SPACE
+# define CMSG_SPACE(length) _CMSG_SPACE(length)
+# endif
+# ifndef CMSG_LEN
+# define CMSG_LEN(length) _CMSG_LEN(length)
+# endif
+# endif
+
+#else
+
+# ifdef __CYGWIN__
+# error "Cygwin does have a sys/socket.h, doesn't it?!?"
+# endif
+
+/* A platform that lacks <sys/socket.h>.
+
+ Currently only MinGW is supported. See the gnulib manual regarding
+ Windows sockets. MinGW has the header files winsock2.h and
+ ws2tcpip.h that declare the sys/socket.h definitions we need. Note
+ that you can influence which definitions you get by setting the
+ WINVER symbol before including these two files. For example,
+ getaddrinfo is only available if _WIN32_WINNT >= 0x0501 (that
+ symbol is set indirectly through WINVER). You can set this by
+ adding AC_DEFINE(WINVER, 0x0501) to configure.ac. Note that your
+ code may not run on older Windows releases then. My Windows 2000
+ box was not able to run the code, for example. The situation is
+ slightly confusing because
+ <https://msdn.microsoft.com/en-us/library/ms738520>
+ suggests that getaddrinfo should be available on all Windows
+ releases. */
+
+# if @HAVE_WINSOCK2_H@
+# include <winsock2.h>
+# endif
+# if @HAVE_WS2TCPIP_H@
+# include <ws2tcpip.h>
+# endif
+
+/* For shutdown(). */
+# if !defined SHUT_RD && defined SD_RECEIVE
+# define SHUT_RD SD_RECEIVE
+# endif
+# if !defined SHUT_WR && defined SD_SEND
+# define SHUT_WR SD_SEND
+# endif
+# if !defined SHUT_RDWR && defined SD_BOTH
+# define SHUT_RDWR SD_BOTH
+# endif
+
+# if @HAVE_WINSOCK2_H@
+/* Include headers needed by the emulation code. */
+# include <sys/types.h>
+# include <io.h>
+
+# if !GNULIB_defined_socklen_t
+typedef int socklen_t;
+# define GNULIB_defined_socklen_t 1
+# endif
+
+# endif
+
+/* Rudimentary 'struct msghdr'; this works as long as you don't try to
+ access msg_control or msg_controllen. */
+struct msghdr {
+ void *msg_name;
+ socklen_t msg_namelen;
+ struct iovec *msg_iov;
+ int msg_iovlen;
+ int msg_flags;
+};
+
+#endif
+
+/* Fix some definitions from <winsock2.h>. */
+
+#if @HAVE_WINSOCK2_H@
+
+# if !GNULIB_defined_rpl_fd_isset
+
+/* Re-define FD_ISSET to avoid a WSA call while we are not using
+ network sockets. */
+_GL_SYS_SOCKET_INLINE int
+rpl_fd_isset (SOCKET fd, fd_set * set)
+{
+ u_int i;
+ if (set == NULL)
+ return 0;
+
+ for (i = 0; i < set->fd_count; i++)
+ if (set->fd_array[i] == fd)
+ return 1;
+
+ return 0;
+}
+
+# define GNULIB_defined_rpl_fd_isset 1
+# endif
+
+# undef FD_ISSET
+# define FD_ISSET(fd, set) rpl_fd_isset(fd, set)
+
+#endif
+
+/* Hide some function declarations from <winsock2.h>. */
+
+#if @HAVE_WINSOCK2_H@
+# if !defined _@GUARD_PREFIX@_UNISTD_H
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef close
+# define close close_used_without_including_unistd_h
+# else
+ _GL_WARN_ON_USE (close,
+ "close() used without including <unistd.h>");
+# endif
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef gethostname
+# define gethostname gethostname_used_without_including_unistd_h
+# else
+ _GL_WARN_ON_USE (gethostname,
+ "gethostname() used without including <unistd.h>");
+# endif
+# endif
+# if !defined _@GUARD_PREFIX@_SYS_SELECT_H
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef select
+# define select select_used_without_including_sys_select_h
+# else
+ _GL_WARN_ON_USE (select,
+ "select() used without including <sys/select.h>");
+# endif
+# endif
+#endif
+
+/* Wrap everything else to use libc file descriptors for sockets. */
+
+#if @GNULIB_SOCKET@
+# if @HAVE_WINSOCK2_H@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef socket
+# define socket rpl_socket
+# endif
+_GL_FUNCDECL_RPL (socket, int, (int domain, int type, int protocol));
+_GL_CXXALIAS_RPL (socket, int, (int domain, int type, int protocol));
+# else
+_GL_CXXALIAS_SYS (socket, int, (int domain, int type, int protocol));
+# endif
+_GL_CXXALIASWARN (socket);
+#elif @HAVE_WINSOCK2_H@
+# undef socket
+# define socket socket_used_without_requesting_gnulib_module_socket
+#elif defined GNULIB_POSIXCHECK
+# undef socket
+# if HAVE_RAW_DECL_SOCKET
+_GL_WARN_ON_USE (socket, "socket is not always POSIX compliant - "
+ "use gnulib module socket for portability");
+# endif
+#endif
+
+#if @GNULIB_CONNECT@
+# if @HAVE_WINSOCK2_H@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef connect
+# define connect rpl_connect
+# endif
+_GL_FUNCDECL_RPL (connect, int,
+ (int fd, const struct sockaddr *addr, socklen_t addrlen)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (connect, int,
+ (int fd, const struct sockaddr *addr, socklen_t addrlen));
+# else
+/* Need to cast, because on NonStop Kernel, the third parameter is
+ size_t addrlen. */
+_GL_CXXALIAS_SYS_CAST (connect, int,
+ (int fd,
+ const struct sockaddr *addr, socklen_t addrlen));
+# endif
+_GL_CXXALIASWARN (connect);
+#elif @HAVE_WINSOCK2_H@
+# undef connect
+# define connect socket_used_without_requesting_gnulib_module_connect
+#elif defined GNULIB_POSIXCHECK
+# undef connect
+# if HAVE_RAW_DECL_CONNECT
+_GL_WARN_ON_USE (connect, "connect is not always POSIX compliant - "
+ "use gnulib module connect for portability");
+# endif
+#endif
+
+#if @GNULIB_ACCEPT@
+# if @HAVE_WINSOCK2_H@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef accept
+# define accept rpl_accept
+# endif
+_GL_FUNCDECL_RPL (accept, int,
+ (int fd, struct sockaddr *addr, socklen_t *addrlen));
+_GL_CXXALIAS_RPL (accept, int,
+ (int fd, struct sockaddr *addr, socklen_t *addrlen));
+# else
+/* Need to cast, because on Solaris 10 systems, the third parameter is
+ void *addrlen. */
+_GL_CXXALIAS_SYS_CAST (accept, int,
+ (int fd, struct sockaddr *addr, socklen_t *addrlen));
+# endif
+_GL_CXXALIASWARN (accept);
+#elif @HAVE_WINSOCK2_H@
+# undef accept
+# define accept accept_used_without_requesting_gnulib_module_accept
+#elif defined GNULIB_POSIXCHECK
+# undef accept
+# if HAVE_RAW_DECL_ACCEPT
+_GL_WARN_ON_USE (accept, "accept is not always POSIX compliant - "
+ "use gnulib module accept for portability");
+# endif
+#endif
+
+#if @GNULIB_BIND@
+# if @HAVE_WINSOCK2_H@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef bind
+# define bind rpl_bind
+# endif
+_GL_FUNCDECL_RPL (bind, int,
+ (int fd, const struct sockaddr *addr, socklen_t addrlen)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (bind, int,
+ (int fd, const struct sockaddr *addr, socklen_t addrlen));
+# else
+/* Need to cast, because on NonStop Kernel, the third parameter is
+ size_t addrlen. */
+_GL_CXXALIAS_SYS_CAST (bind, int,
+ (int fd,
+ const struct sockaddr *addr, socklen_t addrlen));
+# endif
+_GL_CXXALIASWARN (bind);
+#elif @HAVE_WINSOCK2_H@
+# undef bind
+# define bind bind_used_without_requesting_gnulib_module_bind
+#elif defined GNULIB_POSIXCHECK
+# undef bind
+# if HAVE_RAW_DECL_BIND
+_GL_WARN_ON_USE (bind, "bind is not always POSIX compliant - "
+ "use gnulib module bind for portability");
+# endif
+#endif
+
+#if @GNULIB_GETPEERNAME@
+# if @HAVE_WINSOCK2_H@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef getpeername
+# define getpeername rpl_getpeername
+# endif
+_GL_FUNCDECL_RPL (getpeername, int,
+ (int fd, struct sockaddr *addr, socklen_t *addrlen)
+ _GL_ARG_NONNULL ((2, 3)));
+_GL_CXXALIAS_RPL (getpeername, int,
+ (int fd, struct sockaddr *addr, socklen_t *addrlen));
+# else
+/* Need to cast, because on Solaris 10 systems, the third parameter is
+ void *addrlen. */
+_GL_CXXALIAS_SYS_CAST (getpeername, int,
+ (int fd, struct sockaddr *addr, socklen_t *addrlen));
+# endif
+_GL_CXXALIASWARN (getpeername);
+#elif @HAVE_WINSOCK2_H@
+# undef getpeername
+# define getpeername getpeername_used_without_requesting_gnulib_module_getpeername
+#elif defined GNULIB_POSIXCHECK
+# undef getpeername
+# if HAVE_RAW_DECL_GETPEERNAME
+_GL_WARN_ON_USE (getpeername, "getpeername is not always POSIX compliant - "
+ "use gnulib module getpeername for portability");
+# endif
+#endif
+
+#if @GNULIB_GETSOCKNAME@
+# if @HAVE_WINSOCK2_H@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef getsockname
+# define getsockname rpl_getsockname
+# endif
+_GL_FUNCDECL_RPL (getsockname, int,
+ (int fd, struct sockaddr *addr, socklen_t *addrlen)
+ _GL_ARG_NONNULL ((2, 3)));
+_GL_CXXALIAS_RPL (getsockname, int,
+ (int fd, struct sockaddr *addr, socklen_t *addrlen));
+# else
+/* Need to cast, because on Solaris 10 systems, the third parameter is
+ void *addrlen. */
+_GL_CXXALIAS_SYS_CAST (getsockname, int,
+ (int fd, struct sockaddr *addr, socklen_t *addrlen));
+# endif
+_GL_CXXALIASWARN (getsockname);
+#elif @HAVE_WINSOCK2_H@
+# undef getsockname
+# define getsockname getsockname_used_without_requesting_gnulib_module_getsockname
+#elif defined GNULIB_POSIXCHECK
+# undef getsockname
+# if HAVE_RAW_DECL_GETSOCKNAME
+_GL_WARN_ON_USE (getsockname, "getsockname is not always POSIX compliant - "
+ "use gnulib module getsockname for portability");
+# endif
+#endif
+
+#if @GNULIB_GETSOCKOPT@
+# if @HAVE_WINSOCK2_H@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef getsockopt
+# define getsockopt rpl_getsockopt
+# endif
+_GL_FUNCDECL_RPL (getsockopt, int, (int fd, int level, int optname,
+ void *optval, socklen_t *optlen)
+ _GL_ARG_NONNULL ((4, 5)));
+_GL_CXXALIAS_RPL (getsockopt, int, (int fd, int level, int optname,
+ void *optval, socklen_t *optlen));
+# else
+/* Need to cast, because on Solaris 10 systems, the fifth parameter is
+ void *optlen. */
+_GL_CXXALIAS_SYS_CAST (getsockopt, int, (int fd, int level, int optname,
+ void *optval, socklen_t *optlen));
+# endif
+_GL_CXXALIASWARN (getsockopt);
+#elif @HAVE_WINSOCK2_H@
+# undef getsockopt
+# define getsockopt getsockopt_used_without_requesting_gnulib_module_getsockopt
+#elif defined GNULIB_POSIXCHECK
+# undef getsockopt
+# if HAVE_RAW_DECL_GETSOCKOPT
+_GL_WARN_ON_USE (getsockopt, "getsockopt is not always POSIX compliant - "
+ "use gnulib module getsockopt for portability");
+# endif
+#endif
+
+#if @GNULIB_LISTEN@
+# if @HAVE_WINSOCK2_H@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef listen
+# define listen rpl_listen
+# endif
+_GL_FUNCDECL_RPL (listen, int, (int fd, int backlog));
+_GL_CXXALIAS_RPL (listen, int, (int fd, int backlog));
+# else
+_GL_CXXALIAS_SYS (listen, int, (int fd, int backlog));
+# endif
+_GL_CXXALIASWARN (listen);
+#elif @HAVE_WINSOCK2_H@
+# undef listen
+# define listen listen_used_without_requesting_gnulib_module_listen
+#elif defined GNULIB_POSIXCHECK
+# undef listen
+# if HAVE_RAW_DECL_LISTEN
+_GL_WARN_ON_USE (listen, "listen is not always POSIX compliant - "
+ "use gnulib module listen for portability");
+# endif
+#endif
+
+#if @GNULIB_RECV@
+# if @HAVE_WINSOCK2_H@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef recv
+# define recv rpl_recv
+# endif
+_GL_FUNCDECL_RPL (recv, ssize_t, (int fd, void *buf, size_t len, int flags)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (recv, ssize_t, (int fd, void *buf, size_t len, int flags));
+# else
+_GL_CXXALIAS_SYS (recv, ssize_t, (int fd, void *buf, size_t len, int flags));
+# endif
+_GL_CXXALIASWARN (recv);
+#elif @HAVE_WINSOCK2_H@
+# undef recv
+# define recv recv_used_without_requesting_gnulib_module_recv
+#elif defined GNULIB_POSIXCHECK
+# undef recv
+# if HAVE_RAW_DECL_RECV
+_GL_WARN_ON_USE (recv, "recv is not always POSIX compliant - "
+ "use gnulib module recv for portability");
+# endif
+#endif
+
+#if @GNULIB_SEND@
+# if @HAVE_WINSOCK2_H@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef send
+# define send rpl_send
+# endif
+_GL_FUNCDECL_RPL (send, ssize_t,
+ (int fd, const void *buf, size_t len, int flags)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (send, ssize_t,
+ (int fd, const void *buf, size_t len, int flags));
+# else
+_GL_CXXALIAS_SYS (send, ssize_t,
+ (int fd, const void *buf, size_t len, int flags));
+# endif
+_GL_CXXALIASWARN (send);
+#elif @HAVE_WINSOCK2_H@
+# undef send
+# define send send_used_without_requesting_gnulib_module_send
+#elif defined GNULIB_POSIXCHECK
+# undef send
+# if HAVE_RAW_DECL_SEND
+_GL_WARN_ON_USE (send, "send is not always POSIX compliant - "
+ "use gnulib module send for portability");
+# endif
+#endif
+
+#if @GNULIB_RECVFROM@
+# if @HAVE_WINSOCK2_H@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef recvfrom
+# define recvfrom rpl_recvfrom
+# endif
+_GL_FUNCDECL_RPL (recvfrom, ssize_t,
+ (int fd, void *buf, size_t len, int flags,
+ struct sockaddr *from, socklen_t *fromlen)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (recvfrom, ssize_t,
+ (int fd, void *buf, size_t len, int flags,
+ struct sockaddr *from, socklen_t *fromlen));
+# else
+/* Need to cast, because on Solaris 10 systems, the sixth parameter is
+ void *fromlen. */
+_GL_CXXALIAS_SYS_CAST (recvfrom, ssize_t,
+ (int fd, void *buf, size_t len, int flags,
+ struct sockaddr *from, socklen_t *fromlen));
+# endif
+_GL_CXXALIASWARN (recvfrom);
+#elif @HAVE_WINSOCK2_H@
+# undef recvfrom
+# define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom
+#elif defined GNULIB_POSIXCHECK
+# undef recvfrom
+# if HAVE_RAW_DECL_RECVFROM
+_GL_WARN_ON_USE (recvfrom, "recvfrom is not always POSIX compliant - "
+ "use gnulib module recvfrom for portability");
+# endif
+#endif
+
+#if @GNULIB_SENDTO@
+# if @HAVE_WINSOCK2_H@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef sendto
+# define sendto rpl_sendto
+# endif
+_GL_FUNCDECL_RPL (sendto, ssize_t,
+ (int fd, const void *buf, size_t len, int flags,
+ const struct sockaddr *to, socklen_t tolen)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (sendto, ssize_t,
+ (int fd, const void *buf, size_t len, int flags,
+ const struct sockaddr *to, socklen_t tolen));
+# else
+/* Need to cast, because on NonStop Kernel, the sixth parameter is
+ size_t tolen. */
+_GL_CXXALIAS_SYS_CAST (sendto, ssize_t,
+ (int fd, const void *buf, size_t len, int flags,
+ const struct sockaddr *to, socklen_t tolen));
+# endif
+_GL_CXXALIASWARN (sendto);
+#elif @HAVE_WINSOCK2_H@
+# undef sendto
+# define sendto sendto_used_without_requesting_gnulib_module_sendto
+#elif defined GNULIB_POSIXCHECK
+# undef sendto
+# if HAVE_RAW_DECL_SENDTO
+_GL_WARN_ON_USE (sendto, "sendto is not always POSIX compliant - "
+ "use gnulib module sendto for portability");
+# endif
+#endif
+
+#if @GNULIB_SETSOCKOPT@
+# if @HAVE_WINSOCK2_H@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef setsockopt
+# define setsockopt rpl_setsockopt
+# endif
+_GL_FUNCDECL_RPL (setsockopt, int, (int fd, int level, int optname,
+ const void * optval, socklen_t optlen)
+ _GL_ARG_NONNULL ((4)));
+_GL_CXXALIAS_RPL (setsockopt, int, (int fd, int level, int optname,
+ const void * optval, socklen_t optlen));
+# else
+/* Need to cast, because on NonStop Kernel, the fifth parameter is
+ size_t optlen. */
+_GL_CXXALIAS_SYS_CAST (setsockopt, int,
+ (int fd, int level, int optname,
+ const void * optval, socklen_t optlen));
+# endif
+_GL_CXXALIASWARN (setsockopt);
+#elif @HAVE_WINSOCK2_H@
+# undef setsockopt
+# define setsockopt setsockopt_used_without_requesting_gnulib_module_setsockopt
+#elif defined GNULIB_POSIXCHECK
+# undef setsockopt
+# if HAVE_RAW_DECL_SETSOCKOPT
+_GL_WARN_ON_USE (setsockopt, "setsockopt is not always POSIX compliant - "
+ "use gnulib module setsockopt for portability");
+# endif
+#endif
+
+#if @GNULIB_SHUTDOWN@
+# if @HAVE_WINSOCK2_H@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef shutdown
+# define shutdown rpl_shutdown
+# endif
+_GL_FUNCDECL_RPL (shutdown, int, (int fd, int how));
+_GL_CXXALIAS_RPL (shutdown, int, (int fd, int how));
+# else
+_GL_CXXALIAS_SYS (shutdown, int, (int fd, int how));
+# endif
+_GL_CXXALIASWARN (shutdown);
+#elif @HAVE_WINSOCK2_H@
+# undef shutdown
+# define shutdown shutdown_used_without_requesting_gnulib_module_shutdown
+#elif defined GNULIB_POSIXCHECK
+# undef shutdown
+# if HAVE_RAW_DECL_SHUTDOWN
+_GL_WARN_ON_USE (shutdown, "shutdown is not always POSIX compliant - "
+ "use gnulib module shutdown for portability");
+# endif
+#endif
+
+#if @GNULIB_ACCEPT4@
+/* Accept a connection on a socket, with specific opening flags.
+ The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
+ and O_TEXT, O_BINARY (defined in "binary-io.h").
+ See also the Linux man page at
+ <https://www.kernel.org/doc/man-pages/online/pages/man2/accept4.2.html>. */
+# if @HAVE_ACCEPT4@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define accept4 rpl_accept4
+# endif
+_GL_FUNCDECL_RPL (accept4, int,
+ (int sockfd, struct sockaddr *addr, socklen_t *addrlen,
+ int flags));
+_GL_CXXALIAS_RPL (accept4, int,
+ (int sockfd, struct sockaddr *addr, socklen_t *addrlen,
+ int flags));
+# else
+_GL_FUNCDECL_SYS (accept4, int,
+ (int sockfd, struct sockaddr *addr, socklen_t *addrlen,
+ int flags));
+_GL_CXXALIAS_SYS (accept4, int,
+ (int sockfd, struct sockaddr *addr, socklen_t *addrlen,
+ int flags));
+# endif
+_GL_CXXALIASWARN (accept4);
+#elif defined GNULIB_POSIXCHECK
+# undef accept4
+# if HAVE_RAW_DECL_ACCEPT4
+_GL_WARN_ON_USE (accept4, "accept4 is unportable - "
+ "use gnulib module accept4 for portability");
+# endif
+#endif
+
+_GL_INLINE_HEADER_END
+
+#endif /* _@GUARD_PREFIX@_SYS_SOCKET_H */
+#endif /* _@GUARD_PREFIX@_SYS_SOCKET_H */
+#endif
diff --git a/gnulib-tests/sys_uio.in.h b/gnulib-tests/sys_uio.in.h
new file mode 100644
index 0000000..0b5790b
--- /dev/null
+++ b/gnulib-tests/sys_uio.in.h
@@ -0,0 +1,63 @@
+/* Substitute for <sys/uio.h>.
+ Copyright (C) 2011-2018 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, 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 <https://www.gnu.org/licenses/>. */
+
+# if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+# endif
+@PRAGMA_COLUMNS@
+
+#ifndef _@GUARD_PREFIX@_SYS_UIO_H
+
+#if @HAVE_SYS_UIO_H@
+
+/* On OpenBSD 4.4, <sys/uio.h> assumes prior inclusion of <sys/types.h>. */
+# include <sys/types.h>
+
+/* The include_next requires a split double-inclusion guard. */
+# @INCLUDE_NEXT@ @NEXT_SYS_UIO_H@
+
+#endif
+
+#ifndef _@GUARD_PREFIX@_SYS_UIO_H
+#define _@GUARD_PREFIX@_SYS_UIO_H
+
+#if !@HAVE_SYS_UIO_H@
+/* A platform that lacks <sys/uio.h>. */
+/* Get 'size_t' and 'ssize_t'. */
+# include <sys/types.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+# if !GNULIB_defined_struct_iovec
+/* All known platforms that lack <sys/uio.h> also lack any declaration
+ of struct iovec in any other header. */
+struct iovec {
+ void *iov_base;
+ size_t iov_len;
+};
+# define GNULIB_defined_struct_iovec 1
+# endif
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
+#endif /* _@GUARD_PREFIX@_SYS_UIO_H */
+#endif /* _@GUARD_PREFIX@_SYS_UIO_H */
diff --git a/gnulib-tests/test-accept.c b/gnulib-tests/test-accept.c
new file mode 100644
index 0000000..10228dc
--- /dev/null
+++ b/gnulib-tests/test-accept.c
@@ -0,0 +1,56 @@
+/* Test accepting a connection to a server socket.
+ Copyright (C) 2011-2018 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 <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <sys/socket.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (accept, int, (int, struct sockaddr *, socklen_t *));
+
+#include <errno.h>
+#include <netinet/in.h>
+#include <unistd.h>
+
+#include "sockets.h"
+#include "macros.h"
+
+int
+main (void)
+{
+ (void) gl_sockets_startup (SOCKETS_1_1);
+
+ /* Test behaviour for invalid file descriptors. */
+ {
+ struct sockaddr_in addr;
+ socklen_t addrlen = sizeof (addr);
+
+ errno = 0;
+ ASSERT (accept (-1, (struct sockaddr *) &addr, &addrlen) == -1);
+ ASSERT (errno == EBADF);
+ }
+ {
+ struct sockaddr_in addr;
+ socklen_t addrlen = sizeof (addr);
+
+ close (99);
+ errno = 0;
+ ASSERT (accept (99, (struct sockaddr *) &addr, &addrlen) == -1);
+ ASSERT (errno == EBADF);
+ }
+
+ return 0;
+}
diff --git a/gnulib-tests/test-alignof.c b/gnulib-tests/test-alignof.c
index 425ae0e..6cd8a56 100644
--- a/gnulib-tests/test-alignof.c
+++ b/gnulib-tests/test-alignof.c
@@ -1,5 +1,5 @@
/* Test of <alignof.h>.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
diff --git a/gnulib-tests/test-alloca-opt.c b/gnulib-tests/test-alloca-opt.c
index 4c5b3bd..c8c82db 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
diff --git a/gnulib-tests/test-arpa_inet.c b/gnulib-tests/test-arpa_inet.c
new file mode 100644
index 0000000..fd93721
--- /dev/null
+++ b/gnulib-tests/test-arpa_inet.c
@@ -0,0 +1,27 @@
+/* Test of <arpa/inet.h> substitute.
+ Copyright (C) 2007, 2009-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <arpa/inet.h>
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gnulib-tests/test-binary-io.c b/gnulib-tests/test-binary-io.c
index f53a1ae..be7cdf3 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2005. */
@@ -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
new file mode 100644
index 0000000..5c2c00b
--- /dev/null
+++ b/gnulib-tests/test-bind.c
@@ -0,0 +1,58 @@
+/* Test binding a server socket to a port.
+ Copyright (C) 2011-2018 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 <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <sys/socket.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (bind, int, (int, const struct sockaddr *, socklen_t));
+
+#include <errno.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <unistd.h>
+
+#include "sockets.h"
+#include "macros.h"
+
+int
+main (void)
+{
+ (void) gl_sockets_startup (SOCKETS_1_1);
+
+ /* Test behaviour for invalid file descriptors. */
+ {
+ struct sockaddr_in addr;
+
+ addr.sin_family = AF_INET;
+ inet_pton (AF_INET, "127.0.0.1", &addr.sin_addr);
+ addr.sin_port = htons (80);
+ {
+ errno = 0;
+ ASSERT (bind (-1, (const struct sockaddr *) &addr, sizeof (addr)) == -1);
+ ASSERT (errno == EBADF);
+ }
+ {
+ close (99);
+ errno = 0;
+ ASSERT (bind (99, (const struct sockaddr *) &addr, sizeof (addr)) == -1);
+ ASSERT (errno == EBADF);
+ }
+ }
+
+ return 0;
+}
diff --git a/gnulib-tests/test-btowc.c b/gnulib-tests/test-btowc.c
index 7d3a7b6..a19a61a 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
diff --git a/gnulib-tests/test-c-ctype.c b/gnulib-tests/test-c-ctype.c
index d978035..735227a 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2005. */
diff --git a/gnulib-tests/test-c-strcasecmp.c b/gnulib-tests/test-c-strcasecmp.c
index 8eb5fd5..bc5494e 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
diff --git a/gnulib-tests/test-c-strncasecmp.c b/gnulib-tests/test-c-strncasecmp.c
index 6aea06c..4677bd4 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
diff --git a/gnulib-tests/test-canonicalize-lgpl.c b/gnulib-tests/test-canonicalize-lgpl.c
index af20a0a..4cec490 100644
--- a/gnulib-tests/test-canonicalize-lgpl.c
+++ b/gnulib-tests/test-canonicalize-lgpl.c
@@ -1,5 +1,5 @@
/* Test of execution of program termination handlers.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
@@ -33,16 +33,12 @@ SIGNATURE_CHECK (canonicalize_file_name, char *, (const char *));
#include "same-inode.h"
#include "ignore-value.h"
+
+#include "null-ptr.h"
#include "macros.h"
#define BASE "t-can-lgpl.tmp"
-static void *
-null_ptr (void)
-{
- return NULL;
-}
-
int
main (void)
{
diff --git a/gnulib-tests/test-chdir.c b/gnulib-tests/test-chdir.c
index 739528b..80e4fca 100644
--- a/gnulib-tests/test-chdir.c
+++ b/gnulib-tests/test-chdir.c
@@ -1,5 +1,5 @@
/* Test changing to a directory.
- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/test-cloexec.c b/gnulib-tests/test-cloexec.c
new file mode 100644
index 0000000..6d91154
--- /dev/null
+++ b/gnulib-tests/test-cloexec.c
@@ -0,0 +1,148 @@
+/* Test duplicating non-inheritable file descriptors.
+ Copyright (C) 2009-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include "cloexec.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Get declarations of the native Windows API functions. */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+/* Get _get_osfhandle. */
+# if GNULIB_MSVC_NOTHROW
+# include "msvc-nothrow.h"
+# else
+# include <io.h>
+# endif
+#endif
+
+#include "binary-io.h"
+#include "macros.h"
+
+/* Return non-zero if FD is open and inheritable across exec/spawn. */
+static int
+is_inheritable (int fd)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* On native Windows, the initial state of unassigned standard file
+ descriptors is that they are open but point to an
+ INVALID_HANDLE_VALUE, and there is no fcntl. */
+ HANDLE h = (HANDLE) _get_osfhandle (fd);
+ DWORD flags;
+ if (h == INVALID_HANDLE_VALUE || GetHandleInformation (h, &flags) == 0)
+ return 0;
+ return (flags & HANDLE_FLAG_INHERIT) != 0;
+#else
+# ifndef F_GETFD
+# error Please port fcntl to your platform
+# endif
+ int i = fcntl (fd, F_GETFD);
+ return 0 <= i && (i & FD_CLOEXEC) == 0;
+#endif
+}
+
+#if !O_BINARY
+# define setmode(f,m) zero ()
+static int zero (void) { return 0; }
+#endif
+
+/* Return non-zero if FD is open in the given MODE, which is either
+ O_TEXT or O_BINARY. */
+static int
+is_mode (int fd, int mode)
+{
+ int value = setmode (fd, O_BINARY);
+ setmode (fd, value);
+ return mode == value;
+}
+
+int
+main (void)
+{
+ const char *file = "test-cloexec.tmp";
+ int fd = creat (file, 0600);
+ int fd2;
+ int bad_fd = getdtablesize ();
+
+ /* Assume std descriptors were provided by invoker. */
+ ASSERT (STDERR_FILENO < fd);
+ ASSERT (is_inheritable (fd));
+
+ /* Normal use of set_cloexec_flag. */
+ ASSERT (set_cloexec_flag (fd, true) == 0);
+#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+ ASSERT (!is_inheritable (fd));
+#endif
+ ASSERT (set_cloexec_flag (fd, false) == 0);
+ ASSERT (is_inheritable (fd));
+
+ /* Normal use of dup_cloexec. */
+ fd2 = dup_cloexec (fd);
+ ASSERT (fd < fd2);
+ ASSERT (!is_inheritable (fd2));
+ ASSERT (close (fd) == 0);
+ ASSERT (dup_cloexec (fd2) == fd);
+ ASSERT (!is_inheritable (fd));
+ ASSERT (close (fd2) == 0);
+
+ /* On systems that distinguish between text and binary mode,
+ dup_cloexec reuses the mode of the source. */
+ setmode (fd, O_BINARY);
+ ASSERT (is_mode (fd, O_BINARY));
+ fd2 = dup_cloexec (fd);
+ ASSERT (fd < fd2);
+ ASSERT (is_mode (fd2, O_BINARY));
+ ASSERT (close (fd2) == 0);
+ setmode (fd, O_TEXT);
+ ASSERT (is_mode (fd, O_TEXT));
+ fd2 = dup_cloexec (fd);
+ ASSERT (fd < fd2);
+ ASSERT (is_mode (fd2, O_TEXT));
+ ASSERT (close (fd2) == 0);
+
+ /* Test error handling. */
+ errno = 0;
+ ASSERT (set_cloexec_flag (-1, false) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (set_cloexec_flag (bad_fd, false) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (set_cloexec_flag (fd2, false) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (dup_cloexec (-1) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (dup_cloexec (bad_fd) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (dup_cloexec (fd2) == -1);
+ ASSERT (errno == EBADF);
+
+ /* Clean up. */
+ ASSERT (close (fd) == 0);
+ ASSERT (unlink (file) == 0);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-close.c b/gnulib-tests/test-close.c
index c8565aa..36b0ef5 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/test-connect.c b/gnulib-tests/test-connect.c
new file mode 100644
index 0000000..644361c
--- /dev/null
+++ b/gnulib-tests/test-connect.c
@@ -0,0 +1,60 @@
+/* Test connecting a client socket.
+ Copyright (C) 2011-2018 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 <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <sys/socket.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (connect, int, (int, const struct sockaddr *, socklen_t));
+
+#include <errno.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <unistd.h>
+
+#include "sockets.h"
+#include "macros.h"
+
+int
+main (void)
+{
+ (void) gl_sockets_startup (SOCKETS_1_1);
+
+ /* Test behaviour for invalid file descriptors. */
+ {
+ struct sockaddr_in addr;
+
+ addr.sin_family = AF_INET;
+ inet_pton (AF_INET, "127.0.0.1", &addr.sin_addr);
+ addr.sin_port = htons (80);
+ {
+ errno = 0;
+ ASSERT (connect (-1, (const struct sockaddr *) &addr, sizeof (addr))
+ == -1);
+ ASSERT (errno == EBADF);
+ }
+ {
+ close (99);
+ errno = 0;
+ ASSERT (connect (99, (const struct sockaddr *) &addr, sizeof (addr))
+ == -1);
+ ASSERT (errno == EBADF);
+ }
+ }
+
+ return 0;
+}
diff --git a/gnulib-tests/test-copy-acl.c b/gnulib-tests/test-copy-acl.c
index 36295c2..9176b56 100644
--- a/gnulib-tests/test-copy-acl.c
+++ b/gnulib-tests/test-copy-acl.c
@@ -1,5 +1,5 @@
/* Test of copying of files.
- Copyright (C) 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
diff --git a/gnulib-tests/test-ctype.c b/gnulib-tests/test-ctype.c
index 66e1026..897e988 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake <ebb9@byu.net>, 2009. */
diff --git a/gnulib-tests/test-dirent.c b/gnulib-tests/test-dirent.c
index 6bb4ca4..030cb49 100644
--- a/gnulib-tests/test-dirent.c
+++ b/gnulib-tests/test-dirent.c
@@ -1,5 +1,5 @@
/* Test of <dirent.h> substitute.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake <ebb9@byu.net>, 2009. */
diff --git a/gnulib-tests/test-dup2.c b/gnulib-tests/test-dup2.c
index 8f7df3a..90fbeb9 100644
--- a/gnulib-tests/test-dup2.c
+++ b/gnulib-tests/test-dup2.c
@@ -1,5 +1,5 @@
/* Test duplicating file descriptors.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake <ebb9@byu.net>, 2009. */
@@ -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 97a268a..9fab110 100644
--- a/gnulib-tests/test-environ.c
+++ b/gnulib-tests/test-environ.c
@@ -1,5 +1,5 @@
/* Test of environ variable.
- Copyright (C) 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
diff --git a/gnulib-tests/test-errno.c b/gnulib-tests/test-errno.c
index 8accfda..581c93c 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
diff --git a/gnulib-tests/test-fcntl-h.c b/gnulib-tests/test-fcntl-h.c
index 4c17fdf..5031866 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
diff --git a/gnulib-tests/test-fcntl.c b/gnulib-tests/test-fcntl.c
new file mode 100644
index 0000000..476231b
--- /dev/null
+++ b/gnulib-tests/test-fcntl.c
@@ -0,0 +1,414 @@
+/* Test of fcntl(2).
+ Copyright (C) 2009-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+/* Specification. */
+#include <fcntl.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fcntl, int, (int, int, ...));
+
+/* Helpers. */
+#include <errno.h>
+#include <stdarg.h>
+#include <stdbool.h>
+#include <unistd.h>
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Get declarations of the native Windows API functions. */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+/* Get _get_osfhandle. */
+# if GNULIB_MSVC_NOTHROW
+# include "msvc-nothrow.h"
+# else
+# include <io.h>
+# endif
+#endif
+
+#include "binary-io.h"
+#include "macros.h"
+
+#if !O_BINARY
+# define setmode(f,m) zero ()
+static int zero (void) { return 0; }
+#endif
+
+/* Return true if FD is open. */
+static bool
+is_open (int fd)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* On native Windows, the initial state of unassigned standard file
+ descriptors is that they are open but point to an
+ INVALID_HANDLE_VALUE, and there is no fcntl. */
+ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
+#else
+# ifndef F_GETFL
+# error Please port fcntl to your platform
+# endif
+ return 0 <= fcntl (fd, F_GETFL);
+#endif
+}
+
+/* Return true if FD is open and inheritable across exec/spawn. */
+static bool
+is_inheritable (int fd)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* On native Windows, the initial state of unassigned standard file
+ descriptors is that they are open but point to an
+ INVALID_HANDLE_VALUE, and there is no fcntl. */
+ HANDLE h = (HANDLE) _get_osfhandle (fd);
+ DWORD flags;
+ if (h == INVALID_HANDLE_VALUE || GetHandleInformation (h, &flags) == 0)
+ return false;
+ return (flags & HANDLE_FLAG_INHERIT) != 0;
+#else
+# ifndef F_GETFD
+# error Please port fcntl to your platform
+# endif
+ int i = fcntl (fd, F_GETFD);
+ return 0 <= i && (i & FD_CLOEXEC) == 0;
+#endif
+}
+
+/* Return non-zero if FD is open in the given MODE, which is either
+ O_TEXT or O_BINARY. */
+static bool
+is_mode (int fd, int mode)
+{
+ int value = setmode (fd, O_BINARY);
+ setmode (fd, value);
+ return mode == value;
+}
+
+/* Since native fcntl can have more supported operations than our
+ replacement is aware of, and since various operations assign
+ different types to the vararg argument, a wrapper around fcntl must
+ be able to pass a vararg of unknown type on through to the original
+ fcntl. Make sure that this works properly: func1 behaves like the
+ original fcntl interpreting the vararg as an int or a pointer to a
+ struct, and func2 behaves like rpl_fcntl that doesn't know what
+ type to forward. */
+struct dummy_struct
+{
+ long filler;
+ int value;
+};
+static int
+func1 (int a, ...)
+{
+ va_list arg;
+ int i;
+ va_start (arg, a);
+ if (a < 4)
+ i = va_arg (arg, int);
+ else
+ {
+ struct dummy_struct *s = va_arg (arg, struct dummy_struct *);
+ i = s->value;
+ }
+ va_end (arg);
+ return i;
+}
+static int
+func2 (int a, ...)
+{
+ va_list arg;
+ void *p;
+ va_start (arg, a);
+ p = va_arg (arg, void *);
+ va_end (arg);
+ return func1 (a, p);
+}
+
+/* Ensure that all supported fcntl actions are distinct, and
+ usable in preprocessor expressions. */
+static void
+check_flags (void)
+{
+ switch (0)
+ {
+ case F_DUPFD:
+#if F_DUPFD
+#endif
+
+ case F_DUPFD_CLOEXEC:
+#if F_DUPFD_CLOEXEC
+#endif
+
+ case F_GETFD:
+#if F_GETFD
+#endif
+
+#ifdef F_SETFD
+ case F_SETFD:
+# if F_SETFD
+# endif
+#endif
+
+#ifdef F_GETFL
+ case F_GETFL:
+# if F_GETFL
+# endif
+#endif
+
+#ifdef F_SETFL
+ case F_SETFL:
+# if F_SETFL
+# endif
+#endif
+
+#ifdef F_GETOWN
+ case F_GETOWN:
+# if F_GETOWN
+# endif
+#endif
+
+#ifdef F_SETOWN
+ case F_SETOWN:
+# if F_SETOWN
+# endif
+#endif
+
+#ifdef F_GETLK
+ case F_GETLK:
+# if F_GETLK
+# endif
+#endif
+
+#ifdef F_SETLK
+ case F_SETLK:
+# if F_SETLK
+# endif
+#endif
+
+#ifdef F_SETLKW
+ case F_SETLKW:
+# if F_SETLKW
+# endif
+#endif
+
+ ;
+ }
+}
+
+int
+main (void)
+{
+ const char *file = "test-fcntl.tmp";
+ int fd;
+ int bad_fd = getdtablesize ();
+
+ /* Sanity check that rpl_fcntl is likely to work. */
+ ASSERT (func2 (1, 2) == 2);
+ ASSERT (func2 (2, -2) == -2);
+ ASSERT (func2 (3, 0x80000000) == 0x80000000);
+ {
+ struct dummy_struct s = { 0L, 4 };
+ ASSERT (func2 (4, &s) == 4);
+ }
+ check_flags ();
+
+ /* Assume std descriptors were provided by invoker, and ignore fds
+ that might have been inherited. */
+ fd = creat (file, 0600);
+ ASSERT (STDERR_FILENO < fd);
+ close (fd + 1);
+ close (fd + 2);
+
+ /* For F_DUPFD*, the source must be valid. */
+ errno = 0;
+ ASSERT (fcntl (-1, F_DUPFD, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (fd + 1, F_DUPFD, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (bad_fd, F_DUPFD, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (-1, F_DUPFD_CLOEXEC, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (fd + 1, F_DUPFD_CLOEXEC, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (bad_fd, F_DUPFD_CLOEXEC, 0) == -1);
+ ASSERT (errno == EBADF);
+
+ /* For F_DUPFD*, the destination must be valid. */
+ errno = 0;
+ ASSERT (fcntl (fd, F_DUPFD, -1) == -1);
+ ASSERT (errno == EINVAL);
+ errno = 0;
+ ASSERT (fcntl (fd, F_DUPFD, bad_fd) == -1);
+ ASSERT (errno == EINVAL);
+ errno = 0;
+ ASSERT (fcntl (fd, F_DUPFD_CLOEXEC, -1) == -1);
+ ASSERT (errno == EINVAL);
+ errno = 0;
+ ASSERT (fcntl (fd, F_DUPFD_CLOEXEC, bad_fd) == -1);
+ ASSERT (errno == EINVAL
+ || errno == EMFILE /* WSL */);
+
+ /* For F_DUPFD*, check for correct inheritance, as well as
+ preservation of text vs. binary. */
+ setmode (fd, O_BINARY);
+ ASSERT (is_open (fd));
+ ASSERT (!is_open (fd + 1));
+ ASSERT (!is_open (fd + 2));
+ ASSERT (is_inheritable (fd));
+ ASSERT (is_mode (fd, O_BINARY));
+
+ ASSERT (fcntl (fd, F_DUPFD, fd) == fd + 1);
+ ASSERT (is_open (fd));
+ ASSERT (is_open (fd + 1));
+ ASSERT (!is_open (fd + 2));
+ ASSERT (is_inheritable (fd + 1));
+ ASSERT (is_mode (fd, O_BINARY));
+ ASSERT (is_mode (fd + 1, O_BINARY));
+ ASSERT (close (fd + 1) == 0);
+
+ ASSERT (fcntl (fd, F_DUPFD_CLOEXEC, fd + 2) == fd + 2);
+ ASSERT (is_open (fd));
+ ASSERT (!is_open (fd + 1));
+ ASSERT (is_open (fd + 2));
+ ASSERT (is_inheritable (fd));
+ ASSERT (!is_inheritable (fd + 2));
+ ASSERT (is_mode (fd, O_BINARY));
+ ASSERT (is_mode (fd + 2, O_BINARY));
+ ASSERT (close (fd) == 0);
+
+ setmode (fd + 2, O_TEXT);
+ ASSERT (fcntl (fd + 2, F_DUPFD, fd + 1) == fd + 1);
+ ASSERT (!is_open (fd));
+ ASSERT (is_open (fd + 1));
+ ASSERT (is_open (fd + 2));
+ ASSERT (is_inheritable (fd + 1));
+ ASSERT (!is_inheritable (fd + 2));
+ ASSERT (is_mode (fd + 1, O_TEXT));
+ ASSERT (is_mode (fd + 2, O_TEXT));
+ ASSERT (close (fd + 1) == 0);
+
+ ASSERT (fcntl (fd + 2, F_DUPFD_CLOEXEC, 0) == fd);
+ ASSERT (is_open (fd));
+ ASSERT (!is_open (fd + 1));
+ ASSERT (is_open (fd + 2));
+ ASSERT (!is_inheritable (fd));
+ ASSERT (!is_inheritable (fd + 2));
+ ASSERT (is_mode (fd, O_TEXT));
+ ASSERT (is_mode (fd + 2, O_TEXT));
+ ASSERT (close (fd + 2) == 0);
+
+ /* Test F_GETFD on invalid file descriptors. */
+ errno = 0;
+ ASSERT (fcntl (-1, F_GETFD) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (fd + 1, F_GETFD) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (bad_fd, F_GETFD) == -1);
+ ASSERT (errno == EBADF);
+
+ /* Test F_GETFD, the FD_CLOEXEC bit. */
+ {
+ int result = fcntl (fd, F_GETFD);
+ ASSERT (0 <= result);
+ ASSERT ((result & FD_CLOEXEC) == FD_CLOEXEC);
+ ASSERT (dup (fd) == fd + 1);
+ result = fcntl (fd + 1, F_GETFD);
+ ASSERT (0 <= result);
+ ASSERT ((result & FD_CLOEXEC) == 0);
+ ASSERT (close (fd + 1) == 0);
+ }
+
+#ifdef F_SETFD
+ /* Test F_SETFD on invalid file descriptors. */
+ errno = 0;
+ ASSERT (fcntl (-1, F_SETFD, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (fd + 1, F_SETFD, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (bad_fd, F_SETFD, 0) == -1);
+ ASSERT (errno == EBADF);
+#endif
+
+#ifdef F_GETFL
+ /* Test F_GETFL on invalid file descriptors. */
+ errno = 0;
+ ASSERT (fcntl (-1, F_GETFL) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (fd + 1, F_GETFL) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (bad_fd, F_GETFL) == -1);
+ ASSERT (errno == EBADF);
+#endif
+
+#ifdef F_SETFL
+ /* Test F_SETFL on invalid file descriptors. */
+ errno = 0;
+ ASSERT (fcntl (-1, F_SETFL, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (fd + 1, F_SETFL, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (bad_fd, F_SETFL, 0) == -1);
+ ASSERT (errno == EBADF);
+#endif
+
+#ifdef F_GETOWN
+ /* Test F_GETOWN on invalid file descriptors. */
+ errno = 0;
+ ASSERT (fcntl (-1, F_GETOWN) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (fd + 1, F_GETOWN) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (bad_fd, F_GETOWN) == -1);
+ ASSERT (errno == EBADF);
+#endif
+
+#ifdef F_SETOWN
+ /* Test F_SETFL on invalid file descriptors. */
+ errno = 0;
+ ASSERT (fcntl (-1, F_SETOWN, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (fd + 1, F_SETOWN, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (bad_fd, F_SETOWN, 0) == -1);
+ ASSERT (errno == EBADF);
+#endif
+
+ /* Cleanup. */
+ ASSERT (close (fd) == 0);
+ ASSERT (unlink (file) == 0);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-fdopen.c b/gnulib-tests/test-fdopen.c
index c4ce344..a1229f1 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/test-fflush.c b/gnulib-tests/test-fflush.c
index a8a06c3..4010557 100644
--- a/gnulib-tests/test-fflush.c
+++ b/gnulib-tests/test-fflush.c
@@ -1,5 +1,5 @@
/* Test of POSIX compatible fflush() function.
- Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake, 2007. */
diff --git a/gnulib-tests/test-fflush2.c b/gnulib-tests/test-fflush2.c
index 2d8d33a..22796c7 100644
--- a/gnulib-tests/test-fflush2.c
+++ b/gnulib-tests/test-fflush2.c
@@ -1,5 +1,5 @@
/* Test of POSIX compatible fflush() function.
- Copyright (C) 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@@ -28,7 +28,7 @@ main (int argc, char **argv)
/* Avoid the well-known bugs of fflush() on streams in O_TEXT mode
on native Windows platforms. */
- SET_BINARY (0);
+ set_binary_mode (0, O_BINARY);
if (argc > 1)
switch (argv[1][0])
@@ -36,7 +36,7 @@ main (int argc, char **argv)
case '1':
/* Check fflush after a backup ungetc() call. This is case 1a in
terms of
- <http://lists.gnu.org/archive/html/bug-gnulib/2008-03/msg00131.html>,
+ <https://lists.gnu.org/r/bug-gnulib/2008-03/msg00131.html>,
according to the Austin Group's resolution on 2009-01-08. */
c = fgetc (stdin);
@@ -65,7 +65,7 @@ main (int argc, char **argv)
case '2':
/* Check fflush after a non-backup ungetc() call. This is case 2a in
terms of
- <http://lists.gnu.org/archive/html/bug-gnulib/2008-03/msg00131.html>,
+ <https://lists.gnu.org/r/bug-gnulib/2008-03/msg00131.html>,
according to the Austin Group's resolution on 2009-01-08. */
/* Check that fflush after a non-backup ungetc() call discards the
ungetc buffer. This is mandated by POSIX
diff --git a/gnulib-tests/test-fgetc.c b/gnulib-tests/test-fgetc.c
index f1a3188..f54599c 100644
--- a/gnulib-tests/test-fgetc.c
+++ b/gnulib-tests/test-fgetc.c
@@ -1,5 +1,5 @@
/* Test of fgetc() function.
- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@@ -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-file-has-acl.c b/gnulib-tests/test-file-has-acl.c
index 0f1d339..3c11c55 100644
--- a/gnulib-tests/test-file-has-acl.c
+++ b/gnulib-tests/test-file-has-acl.c
@@ -1,5 +1,5 @@
/* Test for presence of ACL.
- Copyright (C) 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
diff --git a/gnulib-tests/test-fpending.c b/gnulib-tests/test-fpending.c
index 658482f..fbe6c10 100644
--- a/gnulib-tests/test-fpending.c
+++ b/gnulib-tests/test-fpending.c
@@ -1,6 +1,6 @@
/* Ensure that __fpending works.
- Copyright (C) 2004, 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2007-2018 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
@@ -13,7 +13,7 @@
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/>.
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
Written by Jim Meyering. */
diff --git a/gnulib-tests/test-fpurge.c b/gnulib-tests/test-fpurge.c
index bdf70c1..b100c3a 100644
--- a/gnulib-tests/test-fpurge.c
+++ b/gnulib-tests/test-fpurge.c
@@ -1,5 +1,5 @@
/* Test of fpurge() function.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
diff --git a/gnulib-tests/test-fputc.c b/gnulib-tests/test-fputc.c
index dd6993e..788877b 100644
--- a/gnulib-tests/test-fputc.c
+++ b/gnulib-tests/test-fputc.c
@@ -1,5 +1,5 @@
/* Test of fputc() function.
- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@@ -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 1b7c42a..4fe20f8 100644
--- a/gnulib-tests/test-fread.c
+++ b/gnulib-tests/test-fread.c
@@ -1,5 +1,5 @@
/* Test of fread() function.
- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@@ -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-freading.c b/gnulib-tests/test-freading.c
index 12e9fdc..1658b10 100644
--- a/gnulib-tests/test-freading.c
+++ b/gnulib-tests/test-freading.c
@@ -1,5 +1,5 @@
/* Test of freading() function.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
diff --git a/gnulib-tests/test-fseek.c b/gnulib-tests/test-fseek.c
index 5db2d62..c8191bd 100644
--- a/gnulib-tests/test-fseek.c
+++ b/gnulib-tests/test-fseek.c
@@ -1,5 +1,5 @@
/* Test of fseek() function.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
diff --git a/gnulib-tests/test-fseeko.c b/gnulib-tests/test-fseeko.c
index 577e360..f412789 100644
--- a/gnulib-tests/test-fseeko.c
+++ b/gnulib-tests/test-fseeko.c
@@ -1,5 +1,5 @@
/* Test of fseeko() function.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
diff --git a/gnulib-tests/test-fseeko3.c b/gnulib-tests/test-fseeko3.c
index 7c557ea..31fce62 100644
--- a/gnulib-tests/test-fseeko3.c
+++ b/gnulib-tests/test-fseeko3.c
@@ -1,5 +1,5 @@
/* Test of fseeko() function.
- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake <eblake@redhat.com>, 2011. */
diff --git a/gnulib-tests/test-fseeko4.c b/gnulib-tests/test-fseeko4.c
index 5a46b02..bd2c64c 100644
--- a/gnulib-tests/test-fseeko4.c
+++ b/gnulib-tests/test-fseeko4.c
@@ -1,5 +1,5 @@
/* Test of fseeko() function.
- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/test-fstat.c b/gnulib-tests/test-fstat.c
index 35479fa..16d8406 100644
--- a/gnulib-tests/test-fstat.c
+++ b/gnulib-tests/test-fstat.c
@@ -1,5 +1,5 @@
/* Tests of fstat() function.
- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/test-ftell.c b/gnulib-tests/test-ftell.c
index 7df08fd..1bfab20 100644
--- a/gnulib-tests/test-ftell.c
+++ b/gnulib-tests/test-ftell.c
@@ -1,5 +1,5 @@
/* Test of ftell() function.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
@@ -45,7 +45,7 @@ main (int argc, char **argv)
}
/* mingw ftell is unreliable on text mode input. */
- SET_BINARY (0);
+ set_binary_mode (0, O_BINARY);
/* Simple tests. */
ASSERT (ftell (stdin) == 0);
diff --git a/gnulib-tests/test-ftell3.c b/gnulib-tests/test-ftell3.c
index ef34113..d0f4f10 100644
--- a/gnulib-tests/test-ftell3.c
+++ b/gnulib-tests/test-ftell3.c
@@ -1,5 +1,5 @@
/* Test of ftell() function.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/test-ftello.c b/gnulib-tests/test-ftello.c
index 9ea9240..f33ccde 100644
--- a/gnulib-tests/test-ftello.c
+++ b/gnulib-tests/test-ftello.c
@@ -1,5 +1,5 @@
/* Test of ftello() function.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
@@ -46,7 +46,7 @@ main (int argc, char **argv _GL_UNUSED)
}
/* mingw ftell is unreliable on text mode input. */
- SET_BINARY (0);
+ set_binary_mode (0, O_BINARY);
/* Simple tests. For each test, make sure ftell and ftello agree. */
ASSERT (ftell (stdin) == 0);
diff --git a/gnulib-tests/test-ftello3.c b/gnulib-tests/test-ftello3.c
index 60b2c7c..77eae43 100644
--- a/gnulib-tests/test-ftello3.c
+++ b/gnulib-tests/test-ftello3.c
@@ -1,5 +1,5 @@
/* Test of ftello() function.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/test-ftello4.c b/gnulib-tests/test-ftello4.c
index 9d5059a..07e11f1 100644
--- a/gnulib-tests/test-ftello4.c
+++ b/gnulib-tests/test-ftello4.c
@@ -1,5 +1,5 @@
/* Test of ftello() function.
- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/test-ftruncate.c b/gnulib-tests/test-ftruncate.c
new file mode 100644
index 0000000..6f597fb
--- /dev/null
+++ b/gnulib-tests/test-ftruncate.c
@@ -0,0 +1,60 @@
+/* Test truncating a file.
+ Copyright (C) 2011-2018 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 <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (ftruncate, int, (int, off_t));
+
+#include <errno.h>
+#include <fcntl.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ const char *filename = argv[1];
+
+ /* Test behaviour for invalid file descriptors. */
+ {
+ errno = 0;
+ ASSERT (ftruncate (-1, 0) == -1);
+ ASSERT (errno == EBADF);
+ }
+ {
+ close (99);
+ errno = 0;
+ ASSERT (ftruncate (99, 0) == -1);
+ ASSERT (errno == EBADF);
+ }
+
+ /* Test behaviour for read-only file descriptors. */
+ {
+ int fd = open (filename, O_RDONLY);
+ ASSERT (fd >= 0);
+ errno = 0;
+ ASSERT (ftruncate (fd, 0) == -1);
+ ASSERT (errno == EBADF || errno == EINVAL
+ || errno == EACCES /* seen on mingw */
+ );
+ close (fd);
+ }
+
+ return 0;
+}
diff --git a/gnulib-tests/test-ftruncate.sh b/gnulib-tests/test-ftruncate.sh
new file mode 100755
index 0000000..d7394d2
--- /dev/null
+++ b/gnulib-tests/test-ftruncate.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec ./test-ftruncate${EXEEXT} "$srcdir/test-ftruncate.sh"
diff --git a/gnulib-tests/test-fwrite.c b/gnulib-tests/test-fwrite.c
index f50bbfc..12012db 100644
--- a/gnulib-tests/test-fwrite.c
+++ b/gnulib-tests/test-fwrite.c
@@ -1,5 +1,5 @@
/* Test of fwrite() function.
- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@@ -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-fwriting.c b/gnulib-tests/test-fwriting.c
index 1c85a88..c23068b 100644
--- a/gnulib-tests/test-fwriting.c
+++ b/gnulib-tests/test-fwriting.c
@@ -1,5 +1,5 @@
/* Test of fwriting() function.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
diff --git a/gnulib-tests/test-getcwd-lgpl.c b/gnulib-tests/test-getcwd-lgpl.c
index 7c0688c..3912c19 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/test-getdelim.c b/gnulib-tests/test-getdelim.c
index 3e190d9..8144c84 100644
--- a/gnulib-tests/test-getdelim.c
+++ b/gnulib-tests/test-getdelim.c
@@ -1,5 +1,5 @@
/* Test of getdelim() function.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake <ebb9@byu.net>, 2007. */
diff --git a/gnulib-tests/test-getdtablesize.c b/gnulib-tests/test-getdtablesize.c
index 885010f..2bfcaeb 100644
--- a/gnulib-tests/test-getdtablesize.c
+++ b/gnulib-tests/test-getdtablesize.c
@@ -1,5 +1,5 @@
/* Test of getdtablesize() function.
- Copyright (C) 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
diff --git a/gnulib-tests/test-getopt-gnu.c b/gnulib-tests/test-getopt-gnu.c
index c26e7f1..1176d7b 100644
--- a/gnulib-tests/test-getopt-gnu.c
+++ b/gnulib-tests/test-getopt-gnu.c
@@ -1,5 +1,5 @@
/* Test of command line argument processing.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
diff --git a/gnulib-tests/test-getopt-main.h b/gnulib-tests/test-getopt-main.h
index 4e3cd2d..c9c97bd 100644
--- a/gnulib-tests/test-getopt-main.h
+++ b/gnulib-tests/test-getopt-main.h
@@ -1,5 +1,5 @@
/* Test of command line argument processing.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
diff --git a/gnulib-tests/test-getopt-posix.c b/gnulib-tests/test-getopt-posix.c
index 216912d..b13f987 100644
--- a/gnulib-tests/test-getopt-posix.c
+++ b/gnulib-tests/test-getopt-posix.c
@@ -1,5 +1,5 @@
/* Test of command line argument processing.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
diff --git a/gnulib-tests/test-getopt.h b/gnulib-tests/test-getopt.h
index ce470c8..98ea389 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
@@ -66,7 +66,7 @@ getopt_loop (int argc, const char **argv,
ASSERT (options[0] == ':'
|| ((options[0] == '-' || options[0] == '+')
&& options[1] == ':'));
- /* fall through */
+ FALLTHROUGH;
case '?':
*unrecognized = optopt;
break;
@@ -1367,7 +1367,7 @@ test_getopt (void)
}
/* Check that 'W' does not dump core:
- http://sourceware.org/bugzilla/show_bug.cgi?id=12922
+ https://sourceware.org/bugzilla/show_bug.cgi?id=12922
Technically, POSIX says the presence of ';' in the opt-string
gives unspecified behavior, so we only test this when GNU compliance
is desired. */
diff --git a/gnulib-tests/test-getopt_long.h b/gnulib-tests/test-getopt_long.h
index 670ef9c..4c22d8d 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
@@ -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;
@@ -315,7 +315,7 @@ test_getopt_long (void)
}
/* Test that 'W' does not dump core:
- http://sourceware.org/bugzilla/show_bug.cgi?id=12922 */
+ https://sourceware.org/bugzilla/show_bug.cgi?id=12922 */
{
int argc = 0;
const char *argv[10];
@@ -1815,7 +1815,7 @@ test_getopt_long (void)
/* Test behavior of getopt_long when POSIXLY_CORRECT is set in the
environment. Options with optional arguments should not change
behavior just because of an environment variable.
- http://lists.gnu.org/archive/html/bug-m4/2006-09/msg00028.html */
+ https://lists.gnu.org/r/bug-m4/2006-09/msg00028.html */
static void
test_getopt_long_posix (void)
{
diff --git a/gnulib-tests/test-getprogname.c b/gnulib-tests/test-getprogname.c
index 299ca3d..7e219f4 100644
--- a/gnulib-tests/test-getprogname.c
+++ b/gnulib-tests/test-getprogname.c
@@ -1,5 +1,5 @@
/* Test the gnulib getprogname module.
- Copyright (C) 2016-2017 Free Software Foundation, Inc.
+ Copyright (C) 2016-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/test-gettimeofday.c b/gnulib-tests/test-gettimeofday.c
index 124d991..322e7bd 100644
--- a/gnulib-tests/test-gettimeofday.c
+++ b/gnulib-tests/test-gettimeofday.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2007, 2009-2017 Free Software Foundation, Inc.
+ * Copyright (C) 2005, 2007, 2009-2018 Free Software Foundation, Inc.
* Written by Jim Meyering.
*
* This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
* 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/>. */
+ * along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/test-ignore-value.c b/gnulib-tests/test-ignore-value.c
index ca77294..d7b6308 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake. */
diff --git a/gnulib-tests/test-inet_pton.c b/gnulib-tests/test-inet_pton.c
new file mode 100644
index 0000000..7dc91c1
--- /dev/null
+++ b/gnulib-tests/test-inet_pton.c
@@ -0,0 +1,58 @@
+/* Test of inet_pton function.
+ Copyright (C) 2009-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
+
+#include <config.h>
+
+#include <arpa/inet.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (inet_pton, int, (int, const char *, void *));
+
+#include <netinet/in.h>
+#include <sys/socket.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+#if defined AF_INET /* HAVE_IPV4 */
+ {
+ /* This machine was for a long time known as
+ ma2s2.mathematik.uni-karlsruhe.de. */
+ const char printable[] = "129.13.115.2";
+ struct in_addr internal;
+ int ret;
+
+ ret = inet_pton (AF_INET, printable, &internal);
+ ASSERT (ret == 1);
+ /* Verify that internal is filled in network byte order. */
+ ASSERT (((unsigned char *) &internal)[0] == 0x81);
+ ASSERT (((unsigned char *) &internal)[1] == 0x0D);
+ ASSERT (((unsigned char *) &internal)[2] == 0x73);
+ ASSERT (((unsigned char *) &internal)[3] == 0x02);
+# ifdef WORDS_BIGENDIAN
+ ASSERT (internal.s_addr == 0x810D7302);
+# else
+ ASSERT (internal.s_addr == 0x02730D81);
+# endif
+ }
+#endif
+
+ return 0;
+}
diff --git a/gnulib-tests/test-init.sh b/gnulib-tests/test-init.sh
index 98fe2c0..1cf0cb9 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-2017 Free Software Foundation, Inc.
+# Copyright (C) 2011-2018 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
@@ -14,7 +14,7 @@
# 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/>. */
+# along with this program. If not, see <https://www.gnu.org/licenses/>. */
: ${srcdir=.}
. "$srcdir/init.sh"; path_prepend_ .
diff --git a/gnulib-tests/test-intprops.c b/gnulib-tests/test-intprops.c
index b7740dd..78c6975 100644
--- a/gnulib-tests/test-intprops.c
+++ b/gnulib-tests/test-intprops.c
@@ -1,5 +1,5 @@
/* Test intprops.h.
- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Paul Eggert. */
@@ -43,7 +43,7 @@
and falls back on a dynamic assertion for other compilers.
These tests should be checkable via 'verify' rather than 'ASSERT', but
using 'verify' would run into a bug with HP-UX 11.23 cc; see
- <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00401.html>. */
+ <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00401.html>. */
#if __GNUC__ || __SUNPRO_C
# define VERIFY(x) do { verify (x); } while (0)
#else
@@ -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-inttypes.c b/gnulib-tests/test-inttypes.c
index d6524c7..eb19655 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
diff --git a/gnulib-tests/test-ioctl.c b/gnulib-tests/test-ioctl.c
new file mode 100644
index 0000000..97dec4c
--- /dev/null
+++ b/gnulib-tests/test-ioctl.c
@@ -0,0 +1,51 @@
+/* Test of ioctl() function.
+ Copyright (C) 2011-2018 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 <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <sys/ioctl.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (ioctl, int, (int, int, ...));
+
+#include <errno.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+#ifdef FIONREAD
+ /* Test behaviour for invalid file descriptors. */
+ {
+ int value;
+ errno = 0;
+ ASSERT (ioctl (-1, FIONREAD, &value) == -1);
+ ASSERT (errno == EBADF);
+ }
+ {
+ int value;
+ close (99);
+ errno = 0;
+ ASSERT (ioctl (99, FIONREAD, &value) == -1);
+ ASSERT (errno == EBADF);
+ }
+#endif
+
+ return 0;
+}
diff --git a/gnulib-tests/test-isblank.c b/gnulib-tests/test-isblank.c
index 54769dd..5df1628 100644
--- a/gnulib-tests/test-isblank.c
+++ b/gnulib-tests/test-isblank.c
@@ -1,5 +1,5 @@
/* Test of isblank() function.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
diff --git a/gnulib-tests/test-langinfo.c b/gnulib-tests/test-langinfo.c
index f1c9429..ba5fa86 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
diff --git a/gnulib-tests/test-limits-h.c b/gnulib-tests/test-limits-h.c
index 15a291f..29b5127 100644
--- a/gnulib-tests/test-limits-h.c
+++ b/gnulib-tests/test-limits-h.c
@@ -1,5 +1,5 @@
/* Test of <limits.h> substitute.
- Copyright 2016-2017 Free Software Foundation, Inc.
+ Copyright 2016-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Paul Eggert. */
diff --git a/gnulib-tests/test-link.c b/gnulib-tests/test-link.c
index 00e093b..3b0fbc1 100644
--- a/gnulib-tests/test-link.c
+++ b/gnulib-tests/test-link.c
@@ -1,5 +1,5 @@
/* Test of link() function.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/test-link.h b/gnulib-tests/test-link.h
index 24d7604..4d8cf0e 100644
--- a/gnulib-tests/test-link.h
+++ b/gnulib-tests/test-link.h
@@ -1,5 +1,5 @@
/* Test of link() function.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* This file is designed to test both link(a,b) and
linkat(AT_FDCWD,a,AT_FDCWD,b,0). FUNC is the function to test.
diff --git a/gnulib-tests/test-listen.c b/gnulib-tests/test-listen.c
new file mode 100644
index 0000000..121ef74
--- /dev/null
+++ b/gnulib-tests/test-listen.c
@@ -0,0 +1,49 @@
+/* Test listen() function.
+ Copyright (C) 2011-2018 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 <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <sys/socket.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (listen, int, (int, int));
+
+#include <errno.h>
+#include <unistd.h>
+
+#include "sockets.h"
+#include "macros.h"
+
+int
+main (void)
+{
+ (void) gl_sockets_startup (SOCKETS_1_1);
+
+ /* Test behaviour for invalid file descriptors. */
+ {
+ errno = 0;
+ ASSERT (listen (-1, 1) == -1);
+ ASSERT (errno == EBADF);
+ }
+ {
+ close (99);
+ errno = 0;
+ ASSERT (listen (99 ,1) == -1);
+ ASSERT (errno == EBADF);
+ }
+
+ return 0;
+}
diff --git a/gnulib-tests/test-locale.c b/gnulib-tests/test-locale.c
index 749adf3..c09ae9a 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
diff --git a/gnulib-tests/test-localeconv.c b/gnulib-tests/test-localeconv.c
index 8ed987a..65e364d 100644
--- a/gnulib-tests/test-localeconv.c
+++ b/gnulib-tests/test-localeconv.c
@@ -1,5 +1,5 @@
/* Test of localeconv() function.
- Copyright (C) 2012-2017 Free Software Foundation, Inc.
+ Copyright (C) 2012-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2012. */
@@ -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-localename.c b/gnulib-tests/test-localename.c
index 994192c..c0952a1 100644
--- a/gnulib-tests/test-localename.c
+++ b/gnulib-tests/test-localename.c
@@ -1,5 +1,5 @@
/* Test of gl_locale_name function and its variants.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
diff --git a/gnulib-tests/test-lseek.c b/gnulib-tests/test-lseek.c
index f772497..146f5ce 100644
--- a/gnulib-tests/test-lseek.c
+++ b/gnulib-tests/test-lseek.c
@@ -1,5 +1,5 @@
/* Test of lseek() function.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake, 2007. */
diff --git a/gnulib-tests/test-lstat.c b/gnulib-tests/test-lstat.c
index 20e83a6..9ef2fcd 100644
--- a/gnulib-tests/test-lstat.c
+++ b/gnulib-tests/test-lstat.c
@@ -1,5 +1,5 @@
/* Test of lstat() function.
- Copyright (C) 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Simon Josefsson, 2008; and Eric Blake, 2009. */
diff --git a/gnulib-tests/test-lstat.h b/gnulib-tests/test-lstat.h
index b5815f6..248e7df 100644
--- a/gnulib-tests/test-lstat.h
+++ b/gnulib-tests/test-lstat.h
@@ -1,5 +1,5 @@
/* Test of lstat() function.
- Copyright (C) 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Simon Josefsson, 2008; and Eric Blake, 2009. */
diff --git a/gnulib-tests/test-malloca.c b/gnulib-tests/test-malloca.c
index 11f0f79..a07667b 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2005. */
diff --git a/gnulib-tests/test-mbrtowc-w32.c b/gnulib-tests/test-mbrtowc-w32.c
index 4dc30b0..2f83386 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@@ -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 ddbe243..44da295 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
@@ -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 '*':
@@ -103,7 +103,15 @@ main (int argc, char *argv[])
wc = (wchar_t) 0xBADFACE;
ret = mbrtowc (&wc, buf, 1, &state);
ASSERT (ret == 1);
- ASSERT (wc == c);
+ if (c < 0x80)
+ /* c is an ASCII character. */
+ ASSERT (wc == c);
+ else
+ /* argv[1] starts with '5', that is, we are testing the C or POSIX
+ locale.
+ On most platforms, the bytes 0x80..0xFF map to U+0080..U+00FF.
+ But on musl libc, the bytes 0x80..0xFF map to U+DF80..U+DFFF. */
+ ASSERT (wc == (btowc (c) == WEOF ? c : btowc (c)));
ASSERT (mbsinit (&state));
ret = mbrtowc (NULL, buf, 1, &state);
ASSERT (ret == 1);
diff --git a/gnulib-tests/test-mbsinit.c b/gnulib-tests/test-mbsinit.c
index 315937c..3b2d418 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
diff --git a/gnulib-tests/test-memchr.c b/gnulib-tests/test-memchr.c
index f31bf8c..f191587 100644
--- a/gnulib-tests/test-memchr.c
+++ b/gnulib-tests/test-memchr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2017 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2018 Free Software Foundation, Inc.
* Written by Eric Blake and Bruno Haible
*
* This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
* 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/>. */
+ * along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/test-memrchr.c b/gnulib-tests/test-memrchr.c
index 7c7589d..0a35812 100644
--- a/gnulib-tests/test-memrchr.c
+++ b/gnulib-tests/test-memrchr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2017 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2018 Free Software Foundation, Inc.
* Written by Eric Blake and Bruno Haible
*
* This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
* 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/>. */
+ * along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/test-nanosleep.c b/gnulib-tests/test-nanosleep.c
new file mode 100644
index 0000000..65e261f
--- /dev/null
+++ b/gnulib-tests/test-nanosleep.c
@@ -0,0 +1,83 @@
+/* Test of nanosleep() function.
+ Copyright (C) 2009-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <time.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (nanosleep, int, (struct timespec const *, struct timespec *));
+
+#include <errno.h>
+#include <signal.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+#if HAVE_DECL_ALARM
+static void
+handle_alarm (int sig)
+{
+ if (sig != SIGALRM)
+ _exit (1);
+}
+#endif
+
+int
+main (void)
+{
+ struct timespec ts;
+
+ ts.tv_sec = 1000;
+ ts.tv_nsec = -1;
+ errno = 0;
+ ASSERT (nanosleep (&ts, NULL) == -1);
+ ASSERT (errno == EINVAL);
+ ts.tv_nsec = 1000000000;
+ errno = 0;
+ ASSERT (nanosleep (&ts, NULL) == -1);
+ ASSERT (errno == EINVAL);
+
+ ts.tv_sec = 0;
+ ts.tv_nsec = 1;
+ ASSERT (nanosleep (&ts, &ts) == 0);
+ /* Remaining time is only defined on EINTR failure; but on success,
+ it is typically either 0 or unchanged from input. At any rate,
+ it shouldn't be randomly changed to unrelated values. */
+ ASSERT (ts.tv_sec == 0);
+ ASSERT (ts.tv_nsec == 0 || ts.tv_nsec == 1);
+ ts.tv_nsec = 0;
+ ASSERT (nanosleep (&ts, NULL) == 0);
+
+#if HAVE_DECL_ALARM
+ {
+ const time_t pentecost = 50 * 24 * 60 * 60; /* 50 days. */
+ signal (SIGALRM, handle_alarm);
+ alarm (1);
+ ts.tv_sec = pentecost;
+ ts.tv_nsec = 999999999;
+ errno = 0;
+ ASSERT (nanosleep (&ts, &ts) == -1);
+ ASSERT (errno == EINTR);
+ ASSERT (pentecost - 10 < ts.tv_sec && ts.tv_sec <= pentecost);
+ ASSERT (0 <= ts.tv_nsec && ts.tv_nsec <= 999999999);
+ }
+#endif
+
+ return 0;
+}
diff --git a/gnulib-tests/test-netinet_in.c b/gnulib-tests/test-netinet_in.c
new file mode 100644
index 0000000..692878c
--- /dev/null
+++ b/gnulib-tests/test-netinet_in.c
@@ -0,0 +1,27 @@
+/* Test of <netinet/in.h> substitute.
+ Copyright (C) 2007, 2009-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <netinet/in.h>
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gnulib-tests/test-nl_langinfo.c b/gnulib-tests/test-nl_langinfo.c
index 69a0885..a13fb71 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
@@ -92,6 +92,32 @@ main (int argc, char *argv[])
ASSERT (strlen (nl_langinfo (MON_10)) > 0);
ASSERT (strlen (nl_langinfo (MON_11)) > 0);
ASSERT (strlen (nl_langinfo (MON_12)) > 0);
+ ASSERT (strlen (nl_langinfo (ALTMON_1)) > 0);
+ ASSERT (strlen (nl_langinfo (ALTMON_2)) > 0);
+ ASSERT (strlen (nl_langinfo (ALTMON_3)) > 0);
+ ASSERT (strlen (nl_langinfo (ALTMON_4)) > 0);
+ ASSERT (strlen (nl_langinfo (ALTMON_5)) > 0);
+ ASSERT (strlen (nl_langinfo (ALTMON_6)) > 0);
+ ASSERT (strlen (nl_langinfo (ALTMON_7)) > 0);
+ ASSERT (strlen (nl_langinfo (ALTMON_8)) > 0);
+ ASSERT (strlen (nl_langinfo (ALTMON_9)) > 0);
+ ASSERT (strlen (nl_langinfo (ALTMON_10)) > 0);
+ ASSERT (strlen (nl_langinfo (ALTMON_11)) > 0);
+ ASSERT (strlen (nl_langinfo (ALTMON_12)) > 0);
+ /* In the tested locales, alternate month names and month names ought to be
+ the same. */
+ ASSERT (strcmp (nl_langinfo (ALTMON_1), nl_langinfo (MON_1)) == 0);
+ ASSERT (strcmp (nl_langinfo (ALTMON_2), nl_langinfo (MON_2)) == 0);
+ ASSERT (strcmp (nl_langinfo (ALTMON_3), nl_langinfo (MON_3)) == 0);
+ ASSERT (strcmp (nl_langinfo (ALTMON_4), nl_langinfo (MON_4)) == 0);
+ ASSERT (strcmp (nl_langinfo (ALTMON_5), nl_langinfo (MON_5)) == 0);
+ ASSERT (strcmp (nl_langinfo (ALTMON_6), nl_langinfo (MON_6)) == 0);
+ ASSERT (strcmp (nl_langinfo (ALTMON_7), nl_langinfo (MON_7)) == 0);
+ ASSERT (strcmp (nl_langinfo (ALTMON_8), nl_langinfo (MON_8)) == 0);
+ ASSERT (strcmp (nl_langinfo (ALTMON_9), nl_langinfo (MON_9)) == 0);
+ ASSERT (strcmp (nl_langinfo (ALTMON_10), nl_langinfo (MON_10)) == 0);
+ ASSERT (strcmp (nl_langinfo (ALTMON_11), nl_langinfo (MON_11)) == 0);
+ ASSERT (strcmp (nl_langinfo (ALTMON_12), nl_langinfo (MON_12)) == 0);
ASSERT (strlen (nl_langinfo (ABMON_1)) > 0);
ASSERT (strlen (nl_langinfo (ABMON_2)) > 0);
ASSERT (strlen (nl_langinfo (ABMON_3)) > 0);
diff --git a/gnulib-tests/test-open.c b/gnulib-tests/test-open.c
index cfcad6a..125950e 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
diff --git a/gnulib-tests/test-open.h b/gnulib-tests/test-open.h
index 6d01dd9..8996c09 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
diff --git a/gnulib-tests/test-pathmax.c b/gnulib-tests/test-pathmax.c
index 7b3510c..aa55be8 100644
--- a/gnulib-tests/test-pathmax.c
+++ b/gnulib-tests/test-pathmax.c
@@ -1,5 +1,5 @@
/* Test of "pathmax.h".
- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2011. */
diff --git a/gnulib-tests/test-perror.c b/gnulib-tests/test-perror.c
new file mode 100644
index 0000000..eacadec
--- /dev/null
+++ b/gnulib-tests/test-perror.c
@@ -0,0 +1,36 @@
+/* Test of perror() function.
+ Copyright (C) 2008-2018 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, 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 <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (perror, void, (char const *));
+
+#include <errno.h>
+
+int
+main (int argc, char **argv)
+{
+ const char *prefix = (argc > 1 ? argv[1] : NULL);
+
+ errno = EACCES; perror (prefix);
+ errno = ETIMEDOUT; perror (prefix);
+ errno = EOVERFLOW; perror (prefix);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-perror.sh b/gnulib-tests/test-perror.sh
new file mode 100755
index 0000000..40a3034
--- /dev/null
+++ b/gnulib-tests/test-perror.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+: ${srcdir=.}
+. "$srcdir/init.sh"; path_prepend_ .
+
+# 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 -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.
+test-perror '' 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror1.tmp
+diff t-perror.tmp t-perror1.tmp \
+ || fail_ "empty prefix should behave like NULL argument"
+
+# Test non-empty prefix.
+test-perror foo 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror3.tmp
+sed -e 's/^/foo: /' < t-perror.tmp > t-perror2.tmp
+diff t-perror2.tmp t-perror3.tmp || fail_ "prefix applied incorrectly"
+
+# Test exit status.
+test-perror >out 2>/dev/null || fail_ "unexpected exit status"
+test -s out && fail_ "unexpected output"
+
+Exit 0
diff --git a/gnulib-tests/test-perror2.c b/gnulib-tests/test-perror2.c
new file mode 100644
index 0000000..8e6adb4
--- /dev/null
+++ b/gnulib-tests/test-perror2.c
@@ -0,0 +1,136 @@
+/* Test of perror() function.
+ Copyright (C) 2011-2018 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, 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 <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include <errno.h>
+#include <string.h>
+#include <unistd.h>
+
+/* This test intentionally parses stderr. So, we arrange to have fd 10
+ (outside the range of interesting fd's during the test) set up to
+ duplicate the original stderr. */
+#define BACKUP_STDERR_FILENO 10
+#define ASSERT_STREAM myerr
+#include "macros.h"
+
+static FILE *myerr;
+
+#define BASE "test-perror2"
+
+int
+main (void)
+{
+ /* We change fd 2 later, so save it in fd 10. */
+ if (dup2 (STDERR_FILENO, BACKUP_STDERR_FILENO) != BACKUP_STDERR_FILENO
+ || (myerr = fdopen (BACKUP_STDERR_FILENO, "w")) == NULL)
+ return 2;
+
+ ASSERT (freopen (BASE ".tmp", "w+", stderr) == stderr);
+
+ /* Test that perror does not clobber strerror buffer. */
+ {
+ const char *msg1;
+ const char *msg2;
+ const char *msg3;
+ const char *msg4;
+ char *str1;
+ char *str2;
+ char *str3;
+ char *str4;
+
+ msg1 = strerror (ENOENT);
+ ASSERT (msg1);
+ str1 = strdup (msg1);
+ ASSERT (str1);
+
+ msg2 = strerror (ERANGE);
+ ASSERT (msg2);
+ str2 = strdup (msg2);
+ ASSERT (str2);
+
+ msg3 = strerror (-4);
+ ASSERT (msg3);
+ str3 = strdup (msg3);
+ ASSERT (str3);
+
+ msg4 = strerror (1729576);
+ ASSERT (msg4);
+ str4 = strdup (msg4);
+ ASSERT (str4);
+
+ errno = EACCES;
+ perror ("");
+ errno = -5;
+ perror ("");
+ ASSERT (!ferror (stderr));
+ ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1));
+ ASSERT (msg2 == msg4 || STREQ (msg2, str2));
+ ASSERT (msg3 == msg4 || STREQ (msg3, str3));
+ ASSERT (STREQ (msg4, str4));
+
+ free (str1);
+ free (str2);
+ free (str3);
+ free (str4);
+ }
+
+ /* Test that perror uses the same message as strerror. */
+ {
+ int errs[] = { EACCES, 0, -3, };
+ int i;
+ for (i = 0; i < SIZEOF (errs); i++)
+ {
+ char buf[256];
+ char *err = strerror (errs[i]);
+
+ ASSERT (err);
+ ASSERT (strlen (err) < sizeof buf);
+ rewind (stderr);
+ ASSERT (ftruncate (fileno (stderr), 0) == 0);
+ errno = errs[i];
+ perror (NULL);
+ ASSERT (!ferror (stderr));
+ rewind (stderr);
+ ASSERT (fgets (buf, sizeof buf, stderr) == buf);
+ ASSERT (strstr (buf, err));
+ }
+ }
+
+ /* Test that perror reports write failure. */
+ {
+ ASSERT (freopen (BASE ".tmp", "r", stderr) == stderr);
+ ASSERT (setvbuf (stderr, NULL, _IONBF, BUFSIZ) == 0);
+ errno = -1;
+ ASSERT (!ferror (stderr));
+ perror (NULL);
+#if 0
+ /* Commented out until cygwin behaves:
+ https://sourceware.org/ml/newlib/2011/msg00228.html */
+ ASSERT (errno > 0);
+ /* Commented out until glibc behaves:
+ https://sourceware.org/bugzilla/show_bug.cgi?id=12792 */
+ ASSERT (ferror (stderr));
+#endif
+ }
+
+ ASSERT (fclose (stderr) == 0);
+ ASSERT (remove (BASE ".tmp") == 0);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-pipe.c b/gnulib-tests/test-pipe.c
new file mode 100644
index 0000000..b39af7f
--- /dev/null
+++ b/gnulib-tests/test-pipe.c
@@ -0,0 +1,108 @@
+/* Test of pipe.
+ Copyright (C) 2009-2018 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, 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 <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (pipe, int, (int[2]));
+
+#include <fcntl.h>
+#include <stdbool.h>
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Get declarations of the native Windows API functions. */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+/* Get _get_osfhandle. */
+# if GNULIB_MSVC_NOTHROW
+# include "msvc-nothrow.h"
+# else
+# include <io.h>
+# endif
+#endif
+
+#include "binary-io.h"
+#include "macros.h"
+
+/* Return true if FD is open. */
+static bool
+is_open (int fd)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* On native Windows, the initial state of unassigned standard file
+ descriptors is that they are open but point to an
+ INVALID_HANDLE_VALUE, and there is no fcntl. */
+ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
+#else
+# ifndef F_GETFL
+# error Please port fcntl to your platform
+# endif
+ return 0 <= fcntl (fd, F_GETFL);
+#endif
+}
+
+/* Return true if FD is not inherited to child processes. */
+static bool
+is_cloexec (int fd)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ HANDLE h = (HANDLE) _get_osfhandle (fd);
+ DWORD flags;
+ ASSERT (GetHandleInformation (h, &flags));
+ return (flags & HANDLE_FLAG_INHERIT) == 0;
+#else
+ int flags;
+ ASSERT ((flags = fcntl (fd, F_GETFD)) >= 0);
+ return (flags & FD_CLOEXEC) != 0;
+#endif
+}
+
+/* Return true if FD is in non-blocking mode. */
+static bool
+is_nonblocking (int fd)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* We don't use the non-blocking mode for sockets here. */
+ return 0;
+#else
+ int flags;
+ ASSERT ((flags = fcntl (fd, F_GETFL)) >= 0);
+ return (flags & O_NONBLOCK) != 0;
+#endif
+}
+
+int
+main ()
+{
+ int fd[2];
+
+ fd[0] = -1;
+ fd[1] = -1;
+ ASSERT (pipe (fd) >= 0);
+ ASSERT (fd[0] >= 0);
+ ASSERT (fd[1] >= 0);
+ ASSERT (fd[0] != fd[1]);
+ ASSERT (is_open (fd[0]));
+ ASSERT (is_open (fd[1]));
+ ASSERT (!is_cloexec (fd[0]));
+ ASSERT (!is_cloexec (fd[1]));
+ ASSERT (!is_nonblocking (fd[0]));
+ ASSERT (!is_nonblocking (fd[1]));
+
+ return 0;
+}
diff --git a/gnulib-tests/test-quotearg-simple.c b/gnulib-tests/test-quotearg-simple.c
index 4bd2312..b350141 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake <ebb9@byu.net>, 2008. */
diff --git a/gnulib-tests/test-quotearg.h b/gnulib-tests/test-quotearg.h
index 5aee789..177d2bc 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake <ebb9@byu.net>, 2008. */
diff --git a/gnulib-tests/test-raise.c b/gnulib-tests/test-raise.c
new file mode 100644
index 0000000..1210ced
--- /dev/null
+++ b/gnulib-tests/test-raise.c
@@ -0,0 +1,50 @@
+/* Test raising a signal.
+ Copyright (C) 2011-2018 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 <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <signal.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (raise, int, (int));
+
+#include <stdlib.h>
+
+#include "macros.h"
+
+/* It is safe to use _Noreturn here: exit() never returns, and GCC knows that
+ exit() is a non-returning function, even on platforms where its declaration
+ in <stdlib.h> does not have the 'noreturn' attribute. */
+static _Noreturn void
+handler (int sig)
+{
+ exit (0);
+}
+
+int
+main (void)
+{
+ /* Test behaviour for invalid argument. */
+ ASSERT (raise (-1) != 0);
+
+ /* Test behaviour for SIGINT. */
+ ASSERT (signal (SIGINT, handler) != SIG_ERR);
+
+ raise (SIGINT);
+
+ /* We should not get here, because the handler takes away the control. */
+ exit (1);
+}
diff --git a/gnulib-tests/test-read-file.c b/gnulib-tests/test-read-file.c
index 5e7f2e0..aa0cd60 100644
--- a/gnulib-tests/test-read-file.c
+++ b/gnulib-tests/test-read-file.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006-2007, 2010-2017 Free Software Foundation, Inc.
+ * Copyright (C) 2006-2007, 2010-2018 Free Software Foundation, Inc.
* Written by Simon Josefsson
*
* This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
* 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/>. */
+ * along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/test-readlink.c b/gnulib-tests/test-readlink.c
index 7911cf4..176b9be 100644
--- a/gnulib-tests/test-readlink.c
+++ b/gnulib-tests/test-readlink.c
@@ -1,5 +1,5 @@
/* Tests of readlink.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake <ebb9@byu.net>, 2009. */
diff --git a/gnulib-tests/test-readlink.h b/gnulib-tests/test-readlink.h
index 674aef8..19f92c8 100644
--- a/gnulib-tests/test-readlink.h
+++ b/gnulib-tests/test-readlink.h
@@ -1,5 +1,5 @@
/* Tests of readlink.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake <ebb9@byu.net>, 2009. */
diff --git a/gnulib-tests/test-regex.c b/gnulib-tests/test-regex.c
index 9173fe8..0a009b8 100644
--- a/gnulib-tests/test-regex.c
+++ b/gnulib-tests/test-regex.c
@@ -1,5 +1,5 @@
/* Test regular expressions
- Copyright 1996-2001, 2003-2017 Free Software Foundation, Inc.
+ Copyright 1996-2001, 2003-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@@ -48,7 +48,7 @@ main (void)
if (setlocale (LC_ALL, "en_US.UTF-8"))
{
{
- /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
+ /* https://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
This test needs valgrind to catch the bug on Debian
GNU/Linux 3.1 x86, but it might catch the bug better
on other platforms and it shouldn't hurt to try the
@@ -83,7 +83,7 @@ main (void)
{
/* This test is from glibc bug 15078.
The test case is from Andreas Schwab in
- <http://www.sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
+ <https://sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
*/
static char const pat[] = "[^x]x";
static char const data[] =
@@ -220,7 +220,7 @@ main (void)
}
/* Catch a bug reported by Vin Shelton in
- http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
+ https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html
*/
re_set_syntax (RE_SYNTAX_POSIX_BASIC
& ~RE_CONTEXT_INVALID_DUP
diff --git a/gnulib-tests/test-rename.c b/gnulib-tests/test-rename.c
index edbb486..7be4d79 100644
--- a/gnulib-tests/test-rename.c
+++ b/gnulib-tests/test-rename.c
@@ -1,5 +1,5 @@
/* Test of rename() function.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/test-rename.h b/gnulib-tests/test-rename.h
index 93a1041..0548c6c 100644
--- a/gnulib-tests/test-rename.h
+++ b/gnulib-tests/test-rename.h
@@ -1,5 +1,5 @@
/* Test of rename() function.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* This file is designed to test both rename(a,b) and
renameat(AT_FDCWD,a,AT_FDCWD,b). FUNC is the function to test.
@@ -339,12 +339,14 @@ test_rename (int (*func) (char const *, char const *), bool print)
errno = 0;
ASSERT (func (BASE "dir2", BASE "dir/.") == -1);
ASSERT (errno == EINVAL || errno == EBUSY || errno == EISDIR
- || errno == ENOTEMPTY || errno == EEXIST);
+ || errno == ENOTEMPTY || errno == EEXIST
+ || errno == ENOENT /* WSL */);
}
{
errno = 0;
ASSERT (func (BASE "dir2/.", BASE "dir") == -1);
- ASSERT (errno == EINVAL || errno == EBUSY || errno == EEXIST);
+ ASSERT (errno == EINVAL || errno == EBUSY || errno == EEXIST
+ || errno == ENOENT /* WSL */);
}
ASSERT (rmdir (BASE "dir") == 0);
/* Files present here:
@@ -366,12 +368,14 @@ test_rename (int (*func) (char const *, char const *), bool print)
errno = 0;
ASSERT (func (BASE "dir2", BASE "dir/.//") == -1);
ASSERT (errno == EINVAL || errno == EBUSY || errno == EISDIR
- || errno == ENOTEMPTY || errno == EEXIST);
+ || errno == ENOTEMPTY || errno == EEXIST
+ || errno == ENOENT /* WSL */);
}
{
errno = 0;
ASSERT (func (BASE "dir2/.//", BASE "dir") == -1);
- ASSERT (errno == EINVAL || errno == EBUSY || errno == EEXIST);
+ ASSERT (errno == EINVAL || errno == EBUSY || errno == EEXIST
+ || errno == ENOENT /* WSL */);
}
ASSERT (rmdir (BASE "dir2") == 0);
/* Files present here:
@@ -522,7 +526,13 @@ test_rename (int (*func) (char const *, char const *), bool print)
{ /* File onto hard link. */
ASSERT (func (BASE "file", BASE "file2") == 0);
memset (&st, 0, sizeof st);
- ASSERT (stat (BASE "file", &st) == 0);
+ if (stat (BASE "file", &st) != 0)
+ {
+ /* This can happen on NetBSD. */
+ ASSERT (errno == ENOENT);
+ ASSERT (link (BASE "file2", BASE "file") == 0);
+ ASSERT (stat (BASE "file", &st) == 0);
+ }
ASSERT (st.st_size == 2);
memset (&st, 0, sizeof st);
ASSERT (stat (BASE "file2", &st) == 0);
diff --git a/gnulib-tests/test-rmdir.c b/gnulib-tests/test-rmdir.c
index f04c735..29c299d 100644
--- a/gnulib-tests/test-rmdir.c
+++ b/gnulib-tests/test-rmdir.c
@@ -1,5 +1,5 @@
/* Tests of rmdir.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake <ebb9@byu.net>, 2009. */
diff --git a/gnulib-tests/test-rmdir.h b/gnulib-tests/test-rmdir.h
index d33e8bf..3b200ee 100644
--- a/gnulib-tests/test-rmdir.h
+++ b/gnulib-tests/test-rmdir.h
@@ -1,5 +1,5 @@
/* Tests of rmdir.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake <ebb9@byu.net>, 2009. */
diff --git a/gnulib-tests/test-sameacls.c b/gnulib-tests/test-sameacls.c
index 6de5272..51196e3 100644
--- a/gnulib-tests/test-sameacls.c
+++ b/gnulib-tests/test-sameacls.c
@@ -1,5 +1,5 @@
/* Test whether two files have the same ACLs.
- Copyright (C) 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
diff --git a/gnulib-tests/test-select-fd.c b/gnulib-tests/test-select-fd.c
new file mode 100644
index 0000000..3c1cb98
--- /dev/null
+++ b/gnulib-tests/test-select-fd.c
@@ -0,0 +1,72 @@
+/* Test of select() substitute, reading or writing from a given file descriptor.
+ Copyright (C) 2008-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/select.h>
+
+int
+main (int argc, char *argv[])
+{
+ if (argc == 4)
+ {
+ char mode = argv[1][0];
+
+ if (mode == 'r' || mode == 'w')
+ {
+ int fd = atoi (argv[2]);
+
+ if (fd >= 0)
+ {
+ const char *result_file_name = argv[3];
+ FILE *result_file = fopen (result_file_name, "wb");
+
+ if (result_file != NULL)
+ {
+ fd_set fds;
+ struct timeval timeout;
+ int ret;
+
+ FD_ZERO (&fds);
+ FD_SET (fd, &fds);
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 10000;
+ ret = (mode == 'r'
+ ? select (fd + 1, &fds, NULL, NULL, &timeout)
+ : select (fd + 1, NULL, &fds, NULL, &timeout));
+ if (ret < 0)
+ {
+ perror ("select failed");
+ exit (1);
+ }
+ if ((ret == 0) != ! FD_ISSET (fd, &fds))
+ {
+ fprintf (stderr, "incorrect return value\n");
+ exit (1);
+ }
+ fprintf (result_file, "%d\n", ret);
+ exit (0);
+ }
+ }
+ }
+ }
+ fprintf (stderr, "Usage: test-select-fd mode fd result-file-name\n");
+ exit (1);
+}
diff --git a/gnulib-tests/test-select-in.sh b/gnulib-tests/test-select-in.sh
new file mode 100755
index 0000000..44f5dbb
--- /dev/null
+++ b/gnulib-tests/test-select-in.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+# Test select() on file descriptors opened for reading.
+
+# This test is known to fail on Solaris 2.6 and older, due to its handling
+# of /dev/null.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles t-select-in.tmp"
+
+# Regular files.
+
+rm -f t-select-in.tmp
+./test-select-fd${EXEEXT} r 0 t-select-in.tmp < ./test-select-fd${EXEEXT}
+test `cat t-select-in.tmp` = "1" || exit 1
+
+# Pipes.
+
+rm -f t-select-in.tmp
+{ sleep 1; echo abc; } | \
+ { ./test-select-fd${EXEEXT} r 0 t-select-in.tmp; cat > /dev/null; }
+test `cat t-select-in.tmp` = "0" || exit 1
+
+rm -f t-select-in.tmp
+echo abc | { sleep 1; ./test-select-fd${EXEEXT} r 0 t-select-in.tmp; }
+test `cat t-select-in.tmp` = "1" || exit 1
+
+# Special files.
+# This part of the test is known to fail on Solaris 2.6 and older.
+
+rm -f t-select-in.tmp
+./test-select-fd${EXEEXT} r 0 t-select-in.tmp < /dev/null
+test `cat t-select-in.tmp` = "1" || exit 1
+
+rm -fr $tmpfiles
+
+exit 0
diff --git a/gnulib-tests/test-select-out.sh b/gnulib-tests/test-select-out.sh
new file mode 100755
index 0000000..c5fd861
--- /dev/null
+++ b/gnulib-tests/test-select-out.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+# Test select() on file descriptors opened for writing.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles t-select-out.out t-select-out.tmp"
+
+# Regular files.
+
+rm -f t-select-out.tmp
+./test-select-fd${EXEEXT} w 1 t-select-out.tmp > t-select-out.out
+test `cat t-select-out.tmp` = "1" || exit 1
+
+# Pipes.
+
+if false; then # This test fails on some platforms.
+ rm -f t-select-out.tmp
+ ( { echo abc; ./test-select-fd${EXEEXT} w 1 t-select-out.tmp; } | { sleep 1; cat; } ) > /dev/null
+ test `cat t-select-out.tmp` = "0" || exit 1
+fi
+
+rm -f t-select-out.tmp
+( { sleep 1; echo abc; ./test-select-fd${EXEEXT} w 1 t-select-out.tmp; } | cat) > /dev/null
+test `cat t-select-out.tmp` = "1" || exit 1
+
+# Special files.
+
+rm -f t-select-out.tmp
+./test-select-fd${EXEEXT} w 1 t-select-out.tmp > /dev/null
+test `cat t-select-out.tmp` = "1" || exit 1
+
+rm -fr $tmpfiles
+
+exit 0
diff --git a/gnulib-tests/test-select-stdin.c b/gnulib-tests/test-select-stdin.c
new file mode 100644
index 0000000..f8d7617
--- /dev/null
+++ b/gnulib-tests/test-select-stdin.c
@@ -0,0 +1,83 @@
+/* Test of select() substitute, reading from stdin.
+ Copyright (C) 2008-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/select.h>
+#include <sys/time.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+ printf ("Applying select() from standard input. Press Ctrl-C to abort.\n");
+ for (;;)
+ {
+ struct timeval before;
+ struct timeval after;
+ unsigned long spent_usec;
+ fd_set readfds;
+ struct timeval timeout;
+ int ret;
+
+ gettimeofday (&before, NULL);
+
+ FD_ZERO (&readfds);
+ FD_SET (0, &readfds);
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 500000;
+ ret = select (1, &readfds, NULL, NULL, &timeout);
+
+ gettimeofday (&after, NULL);
+ spent_usec = (after.tv_sec - before.tv_sec) * 1000000
+ + after.tv_usec - before.tv_usec;
+
+ if (ret < 0)
+ {
+ perror ("select failed");
+ exit (1);
+ }
+ if ((ret == 0) != ! FD_ISSET (0, &readfds))
+ {
+ fprintf (stderr, "incorrect return value\n");
+ exit (1);
+ }
+ if (ret == 0)
+ {
+ if (spent_usec < 250000)
+ {
+ fprintf (stderr, "returned too early\n");
+ exit (1);
+ }
+ /* Timeout */
+ printf (".");
+ ASSERT (fflush (stdout) == 0);
+ }
+ else
+ {
+ char c;
+
+ printf ("Input available! Trying to read 1 byte...\n");
+ ASSERT (read (0, &c, 1) == 1);
+ }
+ }
+}
diff --git a/gnulib-tests/test-select.c b/gnulib-tests/test-select.c
new file mode 100644
index 0000000..00e4fb6
--- /dev/null
+++ b/gnulib-tests/test-select.c
@@ -0,0 +1,34 @@
+/* Test of select() substitute.
+ Copyright (C) 2008-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Paolo Bonzini, 2008. */
+
+#include <config.h>
+
+#include <sys/select.h>
+
+#include "signature.h"
+
+SIGNATURE_CHECK (select, int, (int, fd_set *, fd_set *, fd_set *,
+ struct timeval *));
+
+#include "test-select.h"
+
+int
+main (void)
+{
+ return test_function (select);
+}
diff --git a/gnulib-tests/test-select.h b/gnulib-tests/test-select.h
new file mode 100644
index 0000000..d751e42
--- /dev/null
+++ b/gnulib-tests/test-select.h
@@ -0,0 +1,462 @@
+/* Test of select() substitute.
+ Copyright (C) 2008-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Paolo Bonzini, 2008. */
+
+#include <stdio.h>
+#include <string.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <sys/ioctl.h>
+#include <errno.h>
+
+#include "macros.h"
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# define WINDOWS_NATIVE
+#endif
+
+#ifdef HAVE_SYS_WAIT_H
+# include <sys/wait.h>
+#endif
+
+#ifndef SO_REUSEPORT
+# define SO_REUSEPORT SO_REUSEADDR
+#endif
+
+#define TEST_PORT 12345
+
+
+typedef int (*select_fn) (int, fd_set *, fd_set *, fd_set *, struct timeval *);
+
+
+/* Minimal testing infrastructure. */
+
+static int failures;
+
+static void
+failed (const char *reason)
+{
+ if (++failures > 1)
+ printf (" ");
+ printf ("failed (%s)\n", reason);
+}
+
+static int
+test (void (*fn) (select_fn), select_fn my_select, const char *msg)
+{
+ failures = 0;
+ printf ("%s... ", msg);
+ fflush (stdout);
+ fn (my_select);
+
+ if (!failures)
+ printf ("passed\n");
+
+ return failures;
+}
+
+
+/* Funny socket code. */
+
+static int
+open_server_socket (void)
+{
+ int s, x;
+ struct sockaddr_in ia;
+
+ s = socket (AF_INET, SOCK_STREAM, 0);
+
+ x = 1;
+ setsockopt (s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof (x));
+
+ memset (&ia, 0, sizeof (ia));
+ ia.sin_family = AF_INET;
+ inet_pton (AF_INET, "127.0.0.1", &ia.sin_addr);
+ ia.sin_port = htons (TEST_PORT);
+ if (bind (s, (struct sockaddr *) &ia, sizeof (ia)) < 0)
+ {
+ perror ("bind");
+ exit (77);
+ }
+
+ if (listen (s, 1) < 0)
+ {
+ perror ("listen");
+ exit (77);
+ }
+
+ return s;
+}
+
+static int
+connect_to_socket (bool blocking)
+{
+ int s;
+ struct sockaddr_in ia;
+
+ s = socket (AF_INET, SOCK_STREAM, 0);
+
+ memset (&ia, 0, sizeof (ia));
+ ia.sin_family = AF_INET;
+ inet_pton (AF_INET, "127.0.0.1", &ia.sin_addr);
+ ia.sin_port = htons (TEST_PORT);
+
+ if (!blocking)
+ {
+#ifdef WINDOWS_NATIVE
+ unsigned long iMode = 1;
+ ioctl (s, FIONBIO, (char *) &iMode);
+
+#elif defined F_GETFL
+ int oldflags = fcntl (s, F_GETFL, NULL);
+
+ if (!(oldflags & O_NONBLOCK))
+ fcntl (s, F_SETFL, oldflags | O_NONBLOCK);
+#endif
+ }
+
+ if (connect (s, (struct sockaddr *) &ia, sizeof (ia)) < 0
+ && (blocking || errno != EINPROGRESS))
+ {
+ perror ("connect");
+ exit (77);
+ }
+
+ return s;
+}
+
+
+/* A slightly more convenient interface to select(2).
+ Waits until a specific event occurs on a file descriptor FD.
+ EV is a bit mask of events to look for:
+ SEL_IN - input can be polled without blocking,
+ SEL_OUT - output can be provided without blocking,
+ SEL_EXC - an exception occurred,
+ A maximum wait time is specified by TIMEOUT.
+ *TIMEOUT = { 0, 0 } means to return immediately,
+ TIMEOUT = NULL means to wait indefinitely. */
+
+enum { SEL_IN = 1, SEL_OUT = 2, SEL_EXC = 4 };
+
+static int
+do_select (int fd, int ev, struct timeval *timeout, select_fn my_select)
+{
+ fd_set rfds, wfds, xfds;
+ int r, rev;
+
+ FD_ZERO (&rfds);
+ FD_ZERO (&wfds);
+ FD_ZERO (&xfds);
+ if (ev & SEL_IN)
+ FD_SET (fd, &rfds);
+ if (ev & SEL_OUT)
+ FD_SET (fd, &wfds);
+ if (ev & SEL_EXC)
+ FD_SET (fd, &xfds);
+ r = my_select (fd + 1, &rfds, &wfds, &xfds, timeout);
+ if (r < 0)
+ return r;
+
+ rev = 0;
+ if (FD_ISSET (fd, &rfds))
+ rev |= SEL_IN;
+ if (FD_ISSET (fd, &wfds))
+ rev |= SEL_OUT;
+ if (FD_ISSET (fd, &xfds))
+ rev |= SEL_EXC;
+ if (rev && r == 0)
+ failed ("select returned 0");
+ if (rev & ~ev)
+ failed ("select returned unrequested events");
+
+ return rev;
+}
+
+static int
+do_select_nowait (int fd, int ev, select_fn my_select)
+{
+ struct timeval tv0;
+ tv0.tv_sec = 0;
+ tv0.tv_usec = 0;
+ return do_select (fd, ev, &tv0, my_select);
+}
+
+static int
+do_select_wait (int fd, int ev, select_fn my_select)
+{
+ return do_select (fd, ev, NULL, my_select);
+}
+
+
+/* Test select(2) for TTYs. */
+
+#ifdef INTERACTIVE
+static void
+test_tty (select_fn my_select)
+{
+ if (do_select_nowait (0, SEL_IN, my_select) != 0)
+ failed ("can read");
+ if (do_select_nowait (0, SEL_OUT, my_select) == 0)
+ failed ("cannot write");
+
+ if (do_select_wait (0, SEL_IN, my_select) == 0)
+ failed ("return with infinite timeout");
+
+ getchar ();
+ if (do_select_nowait (0, SEL_IN, my_select) != 0)
+ failed ("can read after getc");
+}
+#endif
+
+
+static int
+do_select_bad_nfd_nowait (int nfd, select_fn my_select)
+{
+ struct timeval tv0;
+ tv0.tv_sec = 0;
+ tv0.tv_usec = 0;
+ errno = 0;
+ return my_select (nfd, NULL, NULL, NULL, &tv0);
+}
+
+static void
+test_bad_nfd (select_fn my_select)
+{
+ if (do_select_bad_nfd_nowait (-1, my_select) != -1 || errno != EINVAL)
+ failed ("invalid errno after negative nfds");
+ /* Can't test FD_SETSIZE + 1 for EINVAL, since some systems allow
+ dynamically larger set size by redefining FD_SETSIZE anywhere up
+ to the actual maximum fd. */
+ /* if (do_select_bad_nfd_nowait (FD_SETSIZE + 1, my_select) != -1 */
+ /* || errno != EINVAL) */
+ /* failed ("invalid errno after bogus nfds"); */
+}
+
+/* Test select(2) on invalid file descriptors. */
+
+static int
+do_select_bad_fd (int fd, int ev, struct timeval *timeout, select_fn my_select)
+{
+ fd_set rfds, wfds, xfds;
+
+ FD_ZERO (&rfds);
+ FD_ZERO (&wfds);
+ FD_ZERO (&xfds);
+ if (ev & SEL_IN)
+ FD_SET (fd, &rfds);
+ if (ev & SEL_OUT)
+ FD_SET (fd, &wfds);
+ if (ev & SEL_EXC)
+ FD_SET (fd, &xfds);
+ errno = 0;
+ return my_select (fd + 1, &rfds, &wfds, &xfds, timeout);
+ /* In this case, when fd is invalid, on some platforms, the bit for fd
+ is left alone in the fd_set, whereas on other platforms it is cleared.
+ So, don't check the bit for fd here. */
+}
+
+static int
+do_select_bad_fd_nowait (int fd, int ev, select_fn my_select)
+{
+ struct timeval tv0;
+ tv0.tv_sec = 0;
+ tv0.tv_usec = 0;
+ return do_select_bad_fd (fd, ev, &tv0, my_select);
+}
+
+static void
+test_bad_fd (select_fn my_select)
+{
+ /* This tests fails on OSF/1 and native Windows, even with fd = 16. */
+#if !(defined __osf__ || defined WINDOWS_NATIVE)
+ int fd;
+
+ /* 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 __DragonFly__) || defined __OpenBSD__ || defined __NetBSD__
+ fd = 14;
+# else
+ fd = 99;
+# endif
+ close (fd);
+
+ if (do_select_bad_fd_nowait (fd, SEL_IN, my_select) == 0 || errno != EBADF)
+ failed ("invalid fd among rfds");
+ if (do_select_bad_fd_nowait (fd, SEL_OUT, my_select) == 0 || errno != EBADF)
+ failed ("invalid fd among wfds");
+ if (do_select_bad_fd_nowait (fd, SEL_EXC, my_select) == 0 || errno != EBADF)
+ failed ("invalid fd among xfds");
+#endif
+}
+
+
+/* Test select(2) for unconnected nonblocking sockets. */
+
+static void
+test_connect_first (select_fn my_select)
+{
+ int s = open_server_socket ();
+ struct sockaddr_in ia;
+ socklen_t addrlen;
+
+ int c1, c2;
+
+ if (do_select_nowait (s, SEL_IN | SEL_EXC, my_select) != 0)
+ failed ("can read, socket not connected");
+
+ c1 = connect_to_socket (false);
+
+ if (do_select_wait (s, SEL_IN | SEL_EXC, my_select) != SEL_IN)
+ failed ("expecting readability on passive socket");
+ if (do_select_nowait (s, SEL_IN | SEL_EXC, my_select) != SEL_IN)
+ failed ("expecting readability on passive socket");
+
+ addrlen = sizeof (ia);
+ c2 = accept (s, (struct sockaddr *) &ia, &addrlen);
+ ASSERT (close (s) == 0);
+ ASSERT (close (c1) == 0);
+ ASSERT (close (c2) == 0);
+}
+
+
+/* Test select(2) for unconnected blocking sockets. */
+
+static void
+test_accept_first (select_fn my_select)
+{
+#ifndef WINDOWS_NATIVE
+ int s = open_server_socket ();
+ struct sockaddr_in ia;
+ socklen_t addrlen;
+ char buf[3];
+ int c, pid;
+
+ pid = fork ();
+ if (pid < 0)
+ return;
+
+ if (pid == 0)
+ {
+ addrlen = sizeof (ia);
+ c = accept (s, (struct sockaddr *) &ia, &addrlen);
+ ASSERT (close (s) == 0);
+ ASSERT (write (c, "foo", 3) == 3);
+ ASSERT (read (c, buf, 3) == 3);
+ shutdown (c, SHUT_RD);
+ ASSERT (close (c) == 0);
+ exit (0);
+ }
+ else
+ {
+ ASSERT (close (s) == 0);
+ c = connect_to_socket (true);
+ if (do_select_nowait (c, SEL_OUT, my_select) != SEL_OUT)
+ failed ("cannot write after blocking connect");
+ ASSERT (write (c, "foo", 3) == 3);
+ wait (&pid);
+ if (do_select_wait (c, SEL_IN, my_select) != SEL_IN)
+ failed ("cannot read data left in the socket by closed process");
+ ASSERT (read (c, buf, 3) == 3);
+ ASSERT (write (c, "foo", 3) == 3);
+ (void) close (c); /* may fail with errno = ECONNRESET */
+ }
+#endif
+}
+
+
+/* Common code for pipes and connected sockets. */
+
+static void
+test_pair (int rd, int wd, select_fn my_select)
+{
+ char buf[3];
+ if (do_select_wait (wd, SEL_IN | SEL_OUT | SEL_EXC, my_select) != SEL_OUT)
+ failed ("expecting writability before writing");
+ if (do_select_nowait (wd, SEL_IN | SEL_OUT | SEL_EXC, my_select) != SEL_OUT)
+ failed ("expecting writability before writing");
+
+ ASSERT (write (wd, "foo", 3) == 3);
+ if (do_select_wait (rd, SEL_IN, my_select) != SEL_IN)
+ failed ("expecting readability after writing");
+ if (do_select_nowait (rd, SEL_IN, my_select) != SEL_IN)
+ failed ("expecting readability after writing");
+
+ ASSERT (read (rd, buf, 3) == 3);
+}
+
+
+/* Test select(2) on connected sockets. */
+
+static void
+test_socket_pair (select_fn my_select)
+{
+ struct sockaddr_in ia;
+
+ socklen_t addrlen = sizeof (ia);
+ int s = open_server_socket ();
+ int c1 = connect_to_socket (false);
+ int c2 = accept (s, (struct sockaddr *) &ia, &addrlen);
+
+ ASSERT (close (s) == 0);
+
+ test_pair (c1, c2, my_select);
+ ASSERT (close (c1) == 0);
+ ASSERT (write (c2, "foo", 3) == 3);
+ (void) close (c2); /* may fail with errno = ECONNRESET */
+}
+
+
+/* Test select(2) on pipes. */
+
+static void
+test_pipe (select_fn my_select)
+{
+ int fd[2];
+
+ ASSERT (pipe (fd) == 0);
+ test_pair (fd[0], fd[1], my_select);
+ ASSERT (close (fd[0]) == 0);
+ ASSERT (close (fd[1]) == 0);
+}
+
+
+/* Do them all. */
+
+static int
+test_function (select_fn my_select)
+{
+ int result = 0;
+
+#ifdef INTERACTIVE
+ printf ("Please press Enter\n");
+ test (test_tty, "TTY", my_select);
+#endif
+
+ result += test (test_bad_nfd, my_select, "Invalid nfd test");
+ result += test (test_bad_fd, my_select, "Invalid fd test");
+ result += test (test_connect_first, my_select, "Unconnected socket test");
+ result += test (test_socket_pair, my_select, "Connected sockets test");
+ result += test (test_accept_first, my_select, "General socket test with fork");
+ result += test (test_pipe, my_select, "Pipe test");
+
+ return result;
+}
diff --git a/gnulib-tests/test-set-mode-acl.c b/gnulib-tests/test-set-mode-acl.c
index 7e91d2e..13eb601 100644
--- a/gnulib-tests/test-set-mode-acl.c
+++ b/gnulib-tests/test-set-mode-acl.c
@@ -1,5 +1,5 @@
/* Test of setting an ACL equivalent to a mode.
- Copyright (C) 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
diff --git a/gnulib-tests/test-setenv.c b/gnulib-tests/test-setenv.c
index d5e628f..ded124d 100644
--- a/gnulib-tests/test-setenv.c
+++ b/gnulib-tests/test-setenv.c
@@ -1,5 +1,5 @@
/* Tests of setenv.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake <ebb9@byu.net>, 2009. */
diff --git a/gnulib-tests/test-setlocale1.c b/gnulib-tests/test-setlocale1.c
index 69e17cb..a9bb3a0 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/test-setlocale2.c b/gnulib-tests/test-setlocale2.c
index 32d7bb3..780e1ea 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/test-setlocale2.sh b/gnulib-tests/test-setlocale2.sh
index 904e147..f772cb0 100755
--- a/gnulib-tests/test-setlocale2.sh
+++ b/gnulib-tests/test-setlocale2.sh
@@ -10,7 +10,7 @@ for name in "Arabic_Saudi Arabia.1252" "Arabic_Saudi Arabia.65001" \
French_France.65001 Japanese_Japan.65001 Turkish_Turkey.65001 \
Chinese_Taiwan.65001 Chinese_China.54936 Chinese_China.65001; do
# Here we use 'env' to set the LC_ALL environment variable, because on
- # Solaris 11 2011-11, the /bin/sh refuses to do it for Turkish_Turkey.65001.
+ # Solaris 11.0, the /bin/sh refuses to do it for Turkish_Turkey.65001.
env LC_ALL="$name" ./test-setlocale2${EXEEXT} 1 || exit 1
done
diff --git a/gnulib-tests/test-setsockopt.c b/gnulib-tests/test-setsockopt.c
new file mode 100644
index 0000000..22a444f
--- /dev/null
+++ b/gnulib-tests/test-setsockopt.c
@@ -0,0 +1,55 @@
+/* Test setsockopt() function.
+ Copyright (C) 2011-2018 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 <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <sys/socket.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (setsockopt, int, (int, int, int, const void *, socklen_t));
+
+#include <errno.h>
+#include <unistd.h>
+
+#include "sockets.h"
+#include "macros.h"
+
+int
+main (void)
+{
+ (void) gl_sockets_startup (SOCKETS_1_1);
+
+ /* Test behaviour for invalid file descriptors. */
+ {
+ int value = 1;
+
+ errno = 0;
+ ASSERT (setsockopt (-1, SOL_SOCKET, SO_REUSEADDR, &value, sizeof (value))
+ == -1);
+ ASSERT (errno == EBADF);
+ }
+ {
+ int value = 1;
+
+ close (99);
+ errno = 0;
+ ASSERT (setsockopt (99, SOL_SOCKET, SO_REUSEADDR, &value, sizeof (value))
+ == -1);
+ ASSERT (errno == EBADF);
+ }
+
+ return 0;
+}
diff --git a/gnulib-tests/test-sigaction.c b/gnulib-tests/test-sigaction.c
new file mode 100644
index 0000000..e0ef06c
--- /dev/null
+++ b/gnulib-tests/test-sigaction.c
@@ -0,0 +1,122 @@
+/* Test of sigaction() function.
+ Copyright (C) 2008-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2008. */
+
+#include <config.h>
+
+#include <signal.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (sigaction, int, (int, struct sigaction const *,
+ struct sigaction *));
+
+#include <stddef.h>
+
+#include "macros.h"
+
+#ifndef SA_NOCLDSTOP
+# define SA_NOCLDSTOP 0
+#endif
+#ifndef SA_ONSTACK
+# define SA_ONSTACK 0
+#endif
+#ifndef SA_RESETHAND
+# define SA_RESETHAND 0
+#endif
+#ifndef SA_RESTART
+# define SA_RESTART 0
+#endif
+#ifndef SA_SIGINFO
+# define SA_SIGINFO 0
+#endif
+#ifndef SA_NOCLDWAIT
+# define SA_NOCLDWAIT 0
+#endif
+
+/* Define a mask of flags required by POSIX. Some implementations
+ provide other flags as extensions, such as SA_RESTORER, that we
+ must ignore in this test. */
+#define MASK_SA_FLAGS (SA_NOCLDSTOP | SA_ONSTACK | SA_RESETHAND | SA_RESTART \
+ | SA_SIGINFO | SA_NOCLDWAIT | SA_NODEFER)
+
+/* This test is unsafe in the presence of an asynchronous SIGABRT,
+ because we install a signal-handler that is intentionally not
+ async-safe. Hopefully, this does not lead to too many reports of
+ false failures, since people don't generally use 'kill -s SIGABRT'
+ to end a runaway program. */
+
+static void
+handler (int sig)
+{
+ static int entry_count;
+ struct sigaction sa;
+ ASSERT (sig == SIGABRT);
+ ASSERT (sigaction (SIGABRT, NULL, &sa) == 0);
+ ASSERT ((sa.sa_flags & SA_SIGINFO) == 0);
+ switch (entry_count++)
+ {
+ case 0:
+ ASSERT ((sa.sa_flags & SA_RESETHAND) == 0);
+ ASSERT (sa.sa_handler == handler);
+ break;
+ case 1:
+ /* This assertion fails on glibc-2.3.6 systems with LinuxThreads,
+ when this program is linked with -lpthread, due to the sigaction()
+ override in libpthread.so. */
+#if !(defined __GLIBC__ || defined __UCLIBC__)
+ ASSERT (sa.sa_handler == SIG_DFL);
+#endif
+ break;
+ default:
+ ASSERT (0);
+ }
+}
+
+int
+main (void)
+{
+ struct sigaction sa;
+ struct sigaction old_sa;
+ sa.sa_handler = handler;
+
+ sa.sa_flags = 0;
+ ASSERT (sigemptyset (&sa.sa_mask) == 0);
+ ASSERT (sigaction (SIGABRT, &sa, NULL) == 0);
+ ASSERT (raise (SIGABRT) == 0);
+
+ sa.sa_flags = SA_RESETHAND | SA_NODEFER;
+ ASSERT (sigaction (SIGABRT, &sa, &old_sa) == 0);
+ ASSERT ((old_sa.sa_flags & MASK_SA_FLAGS) == 0);
+ ASSERT (old_sa.sa_handler == handler);
+ ASSERT (raise (SIGABRT) == 0);
+
+ sa.sa_handler = SIG_DFL;
+ ASSERT (sigaction (SIGABRT, &sa, &old_sa) == 0);
+ ASSERT ((old_sa.sa_flags & SA_SIGINFO) == 0);
+#if !(defined __GLIBC__ || defined __UCLIBC__) /* see above */
+ ASSERT (old_sa.sa_handler == SIG_DFL);
+#endif
+
+ sa.sa_handler = SIG_IGN;
+ ASSERT (sigaction (SIGABRT, &sa, NULL) == 0);
+ ASSERT (raise (SIGABRT) == 0);
+ ASSERT (sigaction (SIGABRT, NULL, &old_sa) == 0);
+ ASSERT (old_sa.sa_handler == SIG_IGN);
+ ASSERT (raise (SIGABRT) == 0);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-signal-h.c b/gnulib-tests/test-signal-h.c
new file mode 100644
index 0000000..0ee5146
--- /dev/null
+++ b/gnulib-tests/test-signal-h.c
@@ -0,0 +1,129 @@
+/* Test of <signal.h> substitute.
+ Copyright (C) 2009-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <signal.h>
+
+/* Check for required types. */
+struct
+{
+ size_t a;
+ uid_t b;
+ volatile sig_atomic_t c;
+ sigset_t d;
+ pid_t e;
+#if 0
+ /* Not guaranteed by gnulib. */
+ pthread_t f;
+ struct timespec g;
+#endif
+} s;
+
+/* Check that NSIG is defined. */
+int nsig = NSIG;
+
+int
+main (void)
+{
+ switch (0)
+ {
+ /* The following are guaranteed by C. */
+ case 0:
+ case SIGABRT:
+ case SIGFPE:
+ case SIGILL:
+ case SIGINT:
+ case SIGSEGV:
+ case SIGTERM:
+ /* The following is guaranteed by gnulib. */
+#if GNULIB_SIGPIPE || defined SIGPIPE
+ case SIGPIPE:
+#endif
+ /* Ensure no conflict with other standardized names. */
+#ifdef SIGALRM
+ case SIGALRM:
+#endif
+ /* On Haiku, SIGBUS is mistakenly equal to SIGSEGV. */
+#if defined SIGBUS && SIGBUS != SIGSEGV
+ case SIGBUS:
+#endif
+#ifdef SIGCHLD
+ case SIGCHLD:
+#endif
+#ifdef SIGCONT
+ case SIGCONT:
+#endif
+#ifdef SIGHUP
+ case SIGHUP:
+#endif
+#ifdef SIGKILL
+ case SIGKILL:
+#endif
+#ifdef SIGQUIT
+ case SIGQUIT:
+#endif
+#ifdef SIGSTOP
+ case SIGSTOP:
+#endif
+#ifdef SIGTSTP
+ case SIGTSTP:
+#endif
+#ifdef SIGTTIN
+ case SIGTTIN:
+#endif
+#ifdef SIGTTOU
+ case SIGTTOU:
+#endif
+#ifdef SIGUSR1
+ case SIGUSR1:
+#endif
+#ifdef SIGUSR2
+ case SIGUSR2:
+#endif
+#ifdef SIGSYS
+ case SIGSYS:
+#endif
+#ifdef SIGTRAP
+ case SIGTRAP:
+#endif
+#ifdef SIGURG
+ case SIGURG:
+#endif
+#ifdef SIGVTALRM
+ case SIGVTALRM:
+#endif
+#ifdef SIGXCPU
+ case SIGXCPU:
+#endif
+#ifdef SIGXFSZ
+ case SIGXFSZ:
+#endif
+ /* SIGRTMIN and SIGRTMAX need not be compile-time constants. */
+#if 0
+# ifdef SIGRTMIN
+ case SIGRTMIN:
+# endif
+# ifdef SIGRTMAX
+ case SIGRTMAX:
+# endif
+#endif
+ ;
+ }
+ return s.a + s.b + s.c + s.e;
+}
diff --git a/gnulib-tests/test-sigprocmask.c b/gnulib-tests/test-sigprocmask.c
new file mode 100644
index 0000000..bf8e3a6
--- /dev/null
+++ b/gnulib-tests/test-sigprocmask.c
@@ -0,0 +1,102 @@
+/* Test of sigprocmask.
+ Copyright (C) 2011-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2011. */
+
+#include <config.h>
+
+#include <signal.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (sigprocmask, int, (int, const sigset_t *, sigset_t *));
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__)
+
+static volatile int sigint_occurred;
+
+static void
+sigint_handler (int sig)
+{
+ sigint_occurred++;
+}
+
+int
+main (int argc, char *argv[])
+{
+ sigset_t set;
+ pid_t pid = getpid ();
+ char command[80];
+
+ if (sizeof (int) < sizeof pid && 0x7fffffff < pid)
+ {
+ fputs ("Skipping test: pid too large\n", stderr);
+ return 77;
+ }
+
+ signal (SIGINT, sigint_handler);
+
+ sigemptyset (&set);
+ sigaddset (&set, SIGINT);
+
+ /* Check error handling. */
+ ASSERT (sigprocmask (1729, &set, NULL) == -1);
+ ASSERT (errno == EINVAL);
+
+ /* Block SIGINT. */
+ ASSERT (sigprocmask (SIG_BLOCK, &set, NULL) == 0);
+
+ /* Request a SIGINT signal from outside. */
+ sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, (int) pid);
+ ASSERT (system (command) == 0);
+
+ /* Wait. */
+ sleep (2);
+
+ /* The signal should not have arrived yet, because it is blocked. */
+ ASSERT (sigint_occurred == 0);
+
+ /* Unblock SIGINT. */
+ ASSERT (sigprocmask (SIG_UNBLOCK, &set, NULL) == 0);
+
+ /* The signal should have arrived now, because POSIX says
+ "If there are any pending unblocked signals after the call to
+ sigprocmask(), at least one of those signals shall be delivered
+ before the call to sigprocmask() returns." */
+ ASSERT (sigint_occurred == 1);
+
+ return 0;
+}
+
+#else
+
+/* On native Windows, getpid() values and the arguments that are passed to
+ the (Cygwin?) 'kill' program are not necessarily related. */
+
+int
+main ()
+{
+ fputs ("Skipping test: native Windows platform\n", stderr);
+ return 77;
+}
+
+#endif
diff --git a/gnulib-tests/test-sleep.c b/gnulib-tests/test-sleep.c
new file mode 100644
index 0000000..2f0a995
--- /dev/null
+++ b/gnulib-tests/test-sleep.c
@@ -0,0 +1,58 @@
+/* Test of sleep() function.
+ Copyright (C) 2007-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (sleep, unsigned int, (unsigned int));
+
+#include <signal.h>
+
+#include "macros.h"
+
+#if HAVE_DECL_ALARM
+static void
+handle_alarm (int sig)
+{
+ if (sig != SIGALRM)
+ _exit (1);
+}
+#endif
+
+int
+main (void)
+{
+ ASSERT (sleep (1) <= 1);
+
+ ASSERT (sleep (0) == 0);
+
+#if HAVE_DECL_ALARM
+ {
+ const unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */
+ unsigned int remaining;
+ signal (SIGALRM, handle_alarm);
+ alarm (1);
+ remaining = sleep (pentecost);
+ ASSERT (pentecost - 10 < remaining && remaining <= pentecost);
+ }
+#endif
+
+ return 0;
+}
diff --git a/gnulib-tests/test-sockets.c b/gnulib-tests/test-sockets.c
new file mode 100644
index 0000000..4ff8357
--- /dev/null
+++ b/gnulib-tests/test-sockets.c
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ * Written by Simon Josefsson.
+ *
+ * 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 <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "sockets.h"
+
+int
+main (void)
+{
+ int err;
+
+ err = gl_sockets_startup (SOCKETS_1_1);
+ if (err != 0)
+ {
+ printf ("wsastartup failed %d\n", err);
+ return 1;
+ }
+
+ err = gl_sockets_cleanup ();
+ if (err != 0)
+ {
+ printf ("wsacleanup failed %d\n", err);
+ return 1;
+ }
+
+ (void) gl_fd_to_handle (0);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-stat-time.c b/gnulib-tests/test-stat-time.c
new file mode 100644
index 0000000..23cf303
--- /dev/null
+++ b/gnulib-tests/test-stat-time.c
@@ -0,0 +1,248 @@
+/* Test of <stat-time.h>.
+ Copyright (C) 2007-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by James Youngman <jay@gnu.org>, 2007. */
+
+#include <config.h>
+
+#include "stat-time.h"
+
+#include <fcntl.h>
+#include <signal.h>
+#include <stdio.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <time.h>
+
+#include "macros.h"
+
+#define BASE "test-stat-time.t"
+#include "nap.h"
+
+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)
+{
+ /* This chmod is necessary on mingw, where unlink() of a read-only file
+ fails with EPERM. */
+ chmod (filename, 0600);
+ return unlink (filename);
+}
+
+static void
+cleanup (int sig)
+{
+ /* Remove temporary files. */
+ force_unlink (filename_stamp1);
+ force_unlink (filename_testfile);
+ force_unlink (filename_stamp2);
+ force_unlink (filename_stamp3);
+
+ if (sig != 0)
+ _exit (1);
+}
+
+static int
+open_file (const char *filename, int flags)
+{
+ int fd = open (filename, flags | O_WRONLY, 0500);
+ if (fd >= 0)
+ {
+ close (fd);
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+static void
+create_file (const char *filename)
+{
+ ASSERT (open_file (filename, O_CREAT | O_EXCL));
+}
+
+static void
+do_stat (const char *filename, struct stat *p)
+{
+ ASSERT (stat (filename, p) == 0);
+}
+
+static void
+prepare_test (struct stat *statinfo, struct timespec *modtimes)
+{
+ int i;
+
+ create_file (filename_stamp1);
+ nap ();
+ create_file (filename_testfile);
+ nap ();
+ create_file (filename_stamp2);
+ nap ();
+ ASSERT (chmod (filename_testfile, 0400) == 0);
+ nap ();
+ create_file (filename_stamp3);
+
+ 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)
+ {
+ modtimes[i] = get_stat_mtime (&statinfo[i]);
+ }
+}
+
+static void
+test_mtime (const struct stat *statinfo, struct timespec *modtimes)
+{
+ int i;
+
+ /* Use the struct stat fields directly. */
+ /* mtime(stamp1) < mtime(stamp2) */
+ ASSERT (statinfo[0].st_mtime < statinfo[2].st_mtime
+ || (statinfo[0].st_mtime == statinfo[2].st_mtime
+ && (get_stat_mtime_ns (&statinfo[0])
+ < get_stat_mtime_ns (&statinfo[2]))));
+ /* mtime(stamp2) < mtime(stamp3) */
+ ASSERT (statinfo[2].st_mtime < statinfo[3].st_mtime
+ || (statinfo[2].st_mtime == statinfo[3].st_mtime
+ && (get_stat_mtime_ns (&statinfo[2])
+ < get_stat_mtime_ns (&statinfo[3]))));
+
+ /* Now check the result of the access functions. */
+ /* mtime(stamp1) < mtime(stamp2) */
+ ASSERT (modtimes[0].tv_sec < modtimes[2].tv_sec
+ || (modtimes[0].tv_sec == modtimes[2].tv_sec
+ && modtimes[0].tv_nsec < modtimes[2].tv_nsec));
+ /* mtime(stamp2) < mtime(stamp3) */
+ ASSERT (modtimes[2].tv_sec < modtimes[3].tv_sec
+ || (modtimes[2].tv_sec == modtimes[3].tv_sec
+ && modtimes[2].tv_nsec < modtimes[3].tv_nsec));
+
+ /* verify equivalence */
+ for (i = 0; i < NFILES; ++i)
+ {
+ struct timespec ts;
+ ts = get_stat_mtime (&statinfo[i]);
+ ASSERT (ts.tv_sec == statinfo[i].st_mtime);
+ }
+}
+
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+/* Skip the ctime tests on native Windows platforms, because their
+ st_ctime is either the same as st_mtime (plus or minus an offset)
+ or set to the file _creation_ time, and is not influenced by rename
+ or chmod. */
+# define test_ctime(ignored) ((void) 0)
+#else
+static void
+test_ctime (const struct stat *statinfo)
+{
+ /* On some buggy NFS clients, mtime and ctime are disproportionately
+ skewed from one another. Skip this test in that case. */
+ if (statinfo[0].st_mtime != statinfo[0].st_ctime)
+ return;
+
+ /* 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])
+ < get_stat_ctime_ns (&statinfo[1]))));
+}
+#endif
+
+static void
+test_birthtime (const struct stat *statinfo,
+ const struct timespec *modtimes,
+ struct timespec *birthtimes)
+{
+ int i;
+
+ /* Collect the birth times. */
+ for (i = 0; i < NFILES; ++i)
+ {
+ birthtimes[i] = get_stat_birthtime (&statinfo[i]);
+ if (birthtimes[i].tv_nsec < 0)
+ return;
+ }
+
+ /* 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(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));
+}
+
+int
+main (void)
+{
+ struct stat statinfo[NFILES];
+ struct timespec modtimes[NFILES];
+ struct timespec birthtimes[NFILES];
+
+ initialize_filenames ();
+
+#ifdef SIGHUP
+ signal (SIGHUP, cleanup);
+#endif
+#ifdef SIGINT
+ signal (SIGINT, cleanup);
+#endif
+#ifdef SIGQUIT
+ signal (SIGQUIT, cleanup);
+#endif
+#ifdef SIGTERM
+ signal (SIGTERM, cleanup);
+#endif
+
+ cleanup (0);
+ prepare_test (statinfo, modtimes);
+ test_mtime (statinfo, modtimes);
+ test_ctime (statinfo);
+ test_birthtime (statinfo, modtimes, birthtimes);
+
+ cleanup (0);
+ return 0;
+}
diff --git a/gnulib-tests/test-stat.c b/gnulib-tests/test-stat.c
index 225edaa..19971e7 100644
--- a/gnulib-tests/test-stat.c
+++ b/gnulib-tests/test-stat.c
@@ -1,5 +1,5 @@
/* Tests of stat.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake <ebb9@byu.net>, 2009. */
diff --git a/gnulib-tests/test-stat.h b/gnulib-tests/test-stat.h
index 234ec77..425246e 100644
--- a/gnulib-tests/test-stat.h
+++ b/gnulib-tests/test-stat.h
@@ -1,5 +1,5 @@
/* Tests of stat.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake <ebb9@byu.net>, 2009. */
diff --git a/gnulib-tests/test-stdalign.c b/gnulib-tests/test-stdalign.c
index 8b44d6f..bced3f6 100644
--- a/gnulib-tests/test-stdalign.c
+++ b/gnulib-tests/test-stdalign.c
@@ -1,5 +1,5 @@
/* Test of <stdalign.h>.
- Copyright 2009-2017 Free Software Foundation, Inc.
+ Copyright 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Paul Eggert, inspired by Bruno Haible's test-alignof.c. */
@@ -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:
+ https://lists.gnu.org/r/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 507af83..6b775bf 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2002-2007, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
@@ -81,8 +81,8 @@ _Bool n[m];
char o[sizeof n == m * sizeof n[0] ? 1 : -1];
char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
/* Catch a bug in an HP-UX C compiler. See
- http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
- http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
*/
_Bool q = true;
_Bool *pq = &q;
@@ -105,7 +105,7 @@ main ()
/* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
reported by James Lemley on 2005-10-05; see
- http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
+ https://lists.gnu.org/r/bug-coreutils/2005-10/msg00086.html
This is a runtime test, since a corresponding compile-time
test would rely on initializer extensions. */
{
diff --git a/gnulib-tests/test-stddef.c b/gnulib-tests/test-stddef.c
index 5b0f045..311001a 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,13 +12,14 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake <ebb9@byu.net>, 2009. */
#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 7352215..8a46557 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2006-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2006. */
diff --git a/gnulib-tests/test-stdio.c b/gnulib-tests/test-stdio.c
index 46d75e2..c307d8c 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
diff --git a/gnulib-tests/test-stdlib.c b/gnulib-tests/test-stdlib.c
index 3c1d7fb..3a5c608 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
diff --git a/gnulib-tests/test-strerror.c b/gnulib-tests/test-strerror.c
index 6b2b4fa..cd0df39 100644
--- a/gnulib-tests/test-strerror.c
+++ b/gnulib-tests/test-strerror.c
@@ -1,5 +1,5 @@
/* Test of strerror() function.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake <ebb9@byu.net>, 2007. */
diff --git a/gnulib-tests/test-strerror_r.c b/gnulib-tests/test-strerror_r.c
new file mode 100644
index 0000000..da3679a
--- /dev/null
+++ b/gnulib-tests/test-strerror_r.c
@@ -0,0 +1,181 @@
+/* Test of strerror_r() function.
+ Copyright (C) 2007-2018 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, 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 <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <string.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (strerror_r, int, (int, char *, size_t));
+
+#include <errno.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+ char buf[100];
+ int ret;
+
+ /* Test results with valid errnum and enough room. */
+
+ errno = 0;
+ buf[0] = '\0';
+ ASSERT (strerror_r (EACCES, buf, sizeof buf) == 0);
+ ASSERT (buf[0] != '\0');
+ ASSERT (errno == 0);
+ ASSERT (strlen (buf) < sizeof buf);
+
+ errno = 0;
+ buf[0] = '\0';
+ ASSERT (strerror_r (ETIMEDOUT, buf, sizeof buf) == 0);
+ ASSERT (buf[0] != '\0');
+ ASSERT (errno == 0);
+ ASSERT (strlen (buf) < sizeof buf);
+
+ errno = 0;
+ buf[0] = '\0';
+ ASSERT (strerror_r (EOVERFLOW, buf, sizeof buf) == 0);
+ ASSERT (buf[0] != '\0');
+ ASSERT (errno == 0);
+ ASSERT (strlen (buf) < sizeof buf);
+
+ /* POSIX requires strerror (0) to succeed. Reject use of "Unknown
+ error", but allow "Success", "No error", or even Solaris' "Error
+ 0" which are distinct patterns from true out-of-range strings.
+ http://austingroupbugs.net/view.php?id=382 */
+ errno = 0;
+ buf[0] = '\0';
+ ret = strerror_r (0, buf, sizeof buf);
+ ASSERT (ret == 0);
+ ASSERT (buf[0]);
+ ASSERT (errno == 0);
+ ASSERT (strstr (buf, "nknown") == NULL);
+ ASSERT (strstr (buf, "ndefined") == NULL);
+
+ /* Test results with out-of-range errnum and enough room. POSIX
+ allows an empty string on success, and allows an unchanged buf on
+ error, but these are not useful, so we guarantee contents. */
+ errno = 0;
+ buf[0] = '^';
+ ret = strerror_r (-3, buf, sizeof buf);
+ ASSERT (ret == 0 || ret == EINVAL);
+ ASSERT (buf[0] != '^');
+ ASSERT (*buf);
+ ASSERT (errno == 0);
+ ASSERT (strlen (buf) < sizeof buf);
+
+ /* Test results with a too small buffer. POSIX requires an error;
+ only ERANGE for 0 and valid errors, and a choice of ERANGE or
+ EINVAL for out-of-range values. On error, POSIX permits buf to
+ be empty, unchanged, or unterminated, but these are not useful,
+ so we guarantee NUL-terminated truncated contents for all but
+ size 0. http://austingroupbugs.net/view.php?id=398. Also ensure
+ that no out-of-bounds writes occur. */
+ {
+ int errs[] = { EACCES, 0, -3, };
+ int j;
+
+ buf[sizeof buf - 1] = '\0';
+ for (j = 0; j < SIZEOF (errs); j++)
+ {
+ int err = errs[j];
+ char buf2[sizeof buf] = "";
+ size_t len;
+ size_t i;
+
+ strerror_r (err, buf2, sizeof buf2);
+ len = strlen (buf2);
+ ASSERT (len < sizeof buf);
+
+ for (i = 0; i <= len; i++)
+ {
+ memset (buf, '^', sizeof buf - 1);
+ errno = 0;
+ ret = strerror_r (err, buf, i);
+ ASSERT (errno == 0);
+ if (j == 2)
+ ASSERT (ret == ERANGE || ret == EINVAL);
+ else
+ ASSERT (ret == ERANGE);
+ if (i)
+ {
+ ASSERT (strncmp (buf, buf2, i - 1) == 0);
+ ASSERT (buf[i - 1] == '\0');
+ }
+ ASSERT (strspn (buf + i, "^") == sizeof buf - 1 - i);
+ }
+
+ strcpy (buf, "BADFACE");
+ errno = 0;
+ ret = strerror_r (err, buf, len + 1);
+ ASSERT (ret != ERANGE);
+ ASSERT (errno == 0);
+ ASSERT (strcmp (buf, buf2) == 0);
+ }
+ }
+
+#if GNULIB_STRERROR
+ /* Test that strerror_r does not clobber strerror buffer. On some
+ platforms, this test can only succeed if gnulib also replaces
+ strerror. */
+ {
+ const char *msg1;
+ const char *msg2;
+ const char *msg3;
+ const char *msg4;
+ char *str1;
+ char *str2;
+ char *str3;
+ char *str4;
+
+ msg1 = strerror (ENOENT);
+ ASSERT (msg1);
+ str1 = strdup (msg1);
+ ASSERT (str1);
+
+ msg2 = strerror (ERANGE);
+ ASSERT (msg2);
+ str2 = strdup (msg2);
+ ASSERT (str2);
+
+ msg3 = strerror (-4);
+ ASSERT (msg3);
+ str3 = strdup (msg3);
+ ASSERT (str3);
+
+ msg4 = strerror (1729576);
+ ASSERT (msg4);
+ str4 = strdup (msg4);
+ ASSERT (str4);
+
+ strerror_r (EACCES, buf, sizeof buf);
+ strerror_r (-5, buf, sizeof buf);
+ ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1));
+ ASSERT (msg2 == msg4 || STREQ (msg2, str2));
+ ASSERT (msg3 == msg4 || STREQ (msg3, str3));
+ ASSERT (STREQ (msg4, str4));
+
+ free (str1);
+ free (str2);
+ free (str3);
+ free (str4);
+ }
+#endif
+
+ return 0;
+}
diff --git a/gnulib-tests/test-string.c b/gnulib-tests/test-string.c
index f10005d..75313b2 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
diff --git a/gnulib-tests/test-strverscmp.c b/gnulib-tests/test-strverscmp.c
index c26b001..5aeec59 100644
--- a/gnulib-tests/test-strverscmp.c
+++ b/gnulib-tests/test-strverscmp.c
@@ -1,5 +1,5 @@
/* Test of strverscmp() function.
- Copyright (C) 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake <ebb9@byu.net>, 2008. */
diff --git a/gnulib-tests/test-symlink.c b/gnulib-tests/test-symlink.c
index 6b025a8..d58f27e 100644
--- a/gnulib-tests/test-symlink.c
+++ b/gnulib-tests/test-symlink.c
@@ -1,5 +1,5 @@
/* Tests of symlink.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake <ebb9@byu.net>, 2009. */
diff --git a/gnulib-tests/test-symlink.h b/gnulib-tests/test-symlink.h
index 8b16f4a..ddc8994 100644
--- a/gnulib-tests/test-symlink.h
+++ b/gnulib-tests/test-symlink.h
@@ -1,5 +1,5 @@
/* Tests of symlink.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake <ebb9@byu.net>, 2009. */
diff --git a/gnulib-tests/test-sys_ioctl.c b/gnulib-tests/test-sys_ioctl.c
new file mode 100644
index 0000000..7643bed
--- /dev/null
+++ b/gnulib-tests/test-sys_ioctl.c
@@ -0,0 +1,27 @@
+/* Test of <sys/ioctl.h> substitute.
+ Copyright (C) 2009-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <sys/ioctl.h>
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gnulib-tests/test-sys_select.c b/gnulib-tests/test-sys_select.c
new file mode 100644
index 0000000..d9ca02d
--- /dev/null
+++ b/gnulib-tests/test-sys_select.c
@@ -0,0 +1,59 @@
+/* Test of <sys/select.h> substitute.
+ Copyright (C) 2007-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <sys/select.h>
+
+#include "signature.h"
+
+/* The following may be macros without underlying functions, so only
+ check signature if they are not macros. */
+#ifndef FD_CLR
+SIGNATURE_CHECK (FD_CLR, void, (int, fd_set *));
+#endif
+#ifndef FD_ISSET
+SIGNATURE_CHECK (FD_ISSET, void, (int, fd_set *));
+#endif
+#ifndef FD_SET
+SIGNATURE_CHECK (FD_SET, int, (int, fd_set *));
+#endif
+#ifndef FD_ZERO
+SIGNATURE_CHECK (FD_ZERO, void, (fd_set *));
+#endif
+
+/* Check that the 'struct timeval' type is defined. */
+struct timeval a;
+
+/* Check that a.tv_sec is wide enough to hold a time_t, ignoring
+ signedness issues. */
+typedef int verify_tv_sec_type[sizeof (time_t) <= sizeof (a.tv_sec) ? 1 : -1];
+
+/* Check that sigset_t is defined. */
+sigset_t t2;
+
+int
+main (void)
+{
+ /* Check that FD_ZERO can be used. This should not yield a warning
+ such as "warning: implicit declaration of function 'memset'". */
+ fd_set fds;
+ FD_ZERO (&fds);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-sys_socket.c b/gnulib-tests/test-sys_socket.c
new file mode 100644
index 0000000..1335823
--- /dev/null
+++ b/gnulib-tests/test-sys_socket.c
@@ -0,0 +1,68 @@
+/* Test of <sys/socket.h> substitute.
+ Copyright (C) 2007, 2009-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <sys/socket.h>
+
+#include <errno.h>
+
+#if HAVE_SHUTDOWN
+/* Check some integer constant expressions. */
+int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
+#endif
+
+/* Check that the 'socklen_t' type is defined. */
+socklen_t t1;
+
+/* Check that the 'size_t' and 'ssize_t' types are defined. */
+size_t t2;
+ssize_t t3;
+
+/* Check that 'struct iovec' is defined. */
+struct iovec io;
+
+/* Check that a minimal set of 'struct msghdr' is defined. */
+struct msghdr msg;
+
+int
+main (void)
+{
+ struct sockaddr_storage x;
+ sa_family_t i;
+
+ /* Check some errno values. */
+ switch (ENOTSOCK)
+ {
+ case ENOTSOCK:
+ case EADDRINUSE:
+ case ENETRESET:
+ case ECONNABORTED:
+ case ECONNRESET:
+ case ENOTCONN:
+ case ESHUTDOWN:
+ break;
+ }
+
+ x.ss_family = 42;
+ i = 42;
+ msg.msg_iov = &io;
+
+ return (x.ss_family - i + msg.msg_namelen + msg.msg_iov->iov_len
+ + msg.msg_iovlen);
+}
diff --git a/gnulib-tests/test-sys_stat.c b/gnulib-tests/test-sys_stat.c
index df1972f..3c68c3c 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
diff --git a/gnulib-tests/test-sys_time.c b/gnulib-tests/test-sys_time.c
index ea38e84..6a35e0f 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
diff --git a/gnulib-tests/test-sys_types.c b/gnulib-tests/test-sys_types.c
index 30a6b9d..a44164d 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2011. */
diff --git a/gnulib-tests/test-sys_uio.c b/gnulib-tests/test-sys_uio.c
new file mode 100644
index 0000000..0b9347c
--- /dev/null
+++ b/gnulib-tests/test-sys_uio.c
@@ -0,0 +1,32 @@
+/* Test of <sys/uio.h> substitute.
+ Copyright (C) 2011-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <eblake@redhat.com>, 2011. */
+
+#include <config.h>
+
+#include <sys/uio.h>
+
+/* Check that necessary types are defined. */
+size_t a;
+ssize_t b;
+struct iovec c;
+
+int
+main (void)
+{
+ return a + b + !!c.iov_base + c.iov_len;
+}
diff --git a/gnulib-tests/test-sys_wait.h b/gnulib-tests/test-sys_wait.h
index 00cb1c0..699f2fb 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2010-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake <ebb9@byu.net>, 2010. */
diff --git a/gnulib-tests/test-time.c b/gnulib-tests/test-time.c
index ff9ffee..e016397 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
diff --git a/gnulib-tests/test-unistd.c b/gnulib-tests/test-unistd.c
index ce7f59a..2219456 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
diff --git a/gnulib-tests/test-unsetenv.c b/gnulib-tests/test-unsetenv.c
index d7d7d05..a5dd594 100644
--- a/gnulib-tests/test-unsetenv.c
+++ b/gnulib-tests/test-unsetenv.c
@@ -1,5 +1,5 @@
/* Tests of unsetenv.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake <ebb9@byu.net>, 2009. */
diff --git a/gnulib-tests/test-update-copyright.sh b/gnulib-tests/test-update-copyright.sh
index 0df54e2..d1d18c1 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-2017 Free Software Foundation, Inc.
+# Copyright (C) 2009-2018 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
diffout=`diff -u /dev/null /dev/null 2>&1`
if test x"$diffout" = x"" && test $? -eq 0; then
diff --git a/gnulib-tests/test-vc-list-files-cvs.sh b/gnulib-tests/test-vc-list-files-cvs.sh
index f04fe9c..5cd37f7 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-2017 Free Software Foundation, Inc.
+# Copyright (C) 2008-2018 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
@@ -14,7 +14,7 @@
# 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/>. */
+# along with this program. If not, see <https://www.gnu.org/licenses/>. */
: ${srcdir=.}
. "$srcdir/init.sh"; path_prepend_ "$abs_aux_dir" .
diff --git a/gnulib-tests/test-vc-list-files-git.sh b/gnulib-tests/test-vc-list-files-git.sh
index 8249017..2775fd8 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-2017 Free Software Foundation, Inc.
+# Copyright (C) 2008-2018 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
@@ -14,7 +14,7 @@
# 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/>. */
+# along with this program. If not, see <https://www.gnu.org/licenses/>. */
: ${srcdir=.}
. "$srcdir/init.sh"; path_prepend_ "$abs_aux_dir" .
diff --git a/gnulib-tests/test-verify-try.c b/gnulib-tests/test-verify-try.c
new file mode 100644
index 0000000..20ccffc
--- /dev/null
+++ b/gnulib-tests/test-verify-try.c
@@ -0,0 +1,21 @@
+/* Test the "verify" module.
+
+ Copyright (C) 2017-2018 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 <https://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 92b7501..af97076 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible. */
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 ad8221a..931aa08 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 Free Software Foundation, Inc.
This file is part of the GNUlib Library.
This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/test-version-etc.sh b/gnulib-tests/test-version-etc.sh
index e7de3b7..b796f3e 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-2017 Free Software Foundation, Inc.
+# Copyright (C) 2009-2018 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
@@ -14,7 +14,9 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+. "${srcdir=.}/init.sh"; path_prepend_ .
TMP=ve-expected.tmp
LC_ALL=C
@@ -24,19 +26,19 @@ ERR=0
cat > $TMP <<EOT
test-version-etc (PROJECT) VERSION
COPYRIGHT Free Software Foundation, Inc.
-License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
+License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Sergey Poznyakoff and Eric Blake.
EOT
-./test-version-etc${EXEEXT} --version |
+test-version-etc${EXEEXT} --version |
sed '1s/test-version-etc (.*) .*/test-version-etc (PROJECT) VERSION/
/^Packaged by/d
2,3 s/Copyright (C) [0-9]\{4,4\}/COPYRIGHT/' |
tr -d '\015' |
- diff -c $TMP - || ERR=1
+ compare $TMP - || ERR=1
rm $TMP
diff --git a/gnulib-tests/test-wchar.c b/gnulib-tests/test-wchar.c
index 2463aeb..ac1b508 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
diff --git a/gnulib-tests/test-wcrtomb-w32.c b/gnulib-tests/test-wcrtomb-w32.c
index e7d0803..e8576c7 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/gnulib-tests/test-wcrtomb.c b/gnulib-tests/test-wcrtomb.c
index 1458c76..3c53fcb 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
diff --git a/gnulib-tests/test-wctype-h.c b/gnulib-tests/test-wctype-h.c
index 6d1b2b6..673cdc3 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
diff --git a/gnulib-tests/test-xalloc-die.c b/gnulib-tests/test-xalloc-die.c
index 66eb9a9..28c3bf7 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Simon Josefsson <simon@josefsson.org>, 2009. */
diff --git a/gnulib-tests/test-xalloc-die.sh b/gnulib-tests/test-xalloc-die.sh
index 0538d9f..8596cd1 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-2017 Free Software Foundation, Inc.
+# Copyright (C) 2009-2018 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/init.sh"; path_prepend_ .
diff --git a/gnulib-tests/unsetenv.c b/gnulib-tests/unsetenv.c
index e8f9a80..82c6c06 100644
--- a/gnulib-tests/unsetenv.c
+++ b/gnulib-tests/unsetenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995-2002, 2005-2017 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995-2002, 2005-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
optimizes away the name == NULL test below. */
diff --git a/build-aux/snippet/unused-parameter.h b/gnulib-tests/unused-parameter.h
index b300055..40a0ff8 100644
--- a/build-aux/snippet/unused-parameter.h
+++ b/gnulib-tests/unused-parameter.h
@@ -1,5 +1,5 @@
/* A C macro for declaring that specific function parameters are not used.
- Copyright (C) 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://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
diff --git a/gnulib-tests/w32sock.h b/gnulib-tests/w32sock.h
new file mode 100644
index 0000000..1e5e584
--- /dev/null
+++ b/gnulib-tests/w32sock.h
@@ -0,0 +1,140 @@
+/* w32sock.h --- internal auxiliary functions for Windows socket functions
+
+ Copyright (C) 2008-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Paolo Bonzini */
+
+#include <errno.h>
+
+/* Get O_RDWR and O_BINARY. */
+#include <fcntl.h>
+
+/* Get _open_osfhandle(). */
+#include <io.h>
+
+/* Get _get_osfhandle(). */
+#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))
+
+static inline void
+set_winsock_errno (void)
+{
+ int err = WSAGetLastError ();
+
+ /* Map some WSAE* errors to the runtime library's error codes. */
+ switch (err)
+ {
+ case WSA_INVALID_HANDLE:
+ errno = EBADF;
+ break;
+ case WSA_NOT_ENOUGH_MEMORY:
+ errno = ENOMEM;
+ break;
+ case WSA_INVALID_PARAMETER:
+ errno = EINVAL;
+ break;
+ case WSAENAMETOOLONG:
+ errno = ENAMETOOLONG;
+ break;
+ case WSAENOTEMPTY:
+ errno = ENOTEMPTY;
+ break;
+ case WSAEWOULDBLOCK:
+ errno = EWOULDBLOCK;
+ break;
+ case WSAEINPROGRESS:
+ errno = EINPROGRESS;
+ break;
+ case WSAEALREADY:
+ errno = EALREADY;
+ break;
+ case WSAENOTSOCK:
+ errno = ENOTSOCK;
+ break;
+ case WSAEDESTADDRREQ:
+ errno = EDESTADDRREQ;
+ break;
+ case WSAEMSGSIZE:
+ errno = EMSGSIZE;
+ break;
+ case WSAEPROTOTYPE:
+ errno = EPROTOTYPE;
+ break;
+ case WSAENOPROTOOPT:
+ errno = ENOPROTOOPT;
+ break;
+ case WSAEPROTONOSUPPORT:
+ errno = EPROTONOSUPPORT;
+ break;
+ case WSAEOPNOTSUPP:
+ errno = EOPNOTSUPP;
+ break;
+ case WSAEAFNOSUPPORT:
+ errno = EAFNOSUPPORT;
+ break;
+ case WSAEADDRINUSE:
+ errno = EADDRINUSE;
+ break;
+ case WSAEADDRNOTAVAIL:
+ errno = EADDRNOTAVAIL;
+ break;
+ case WSAENETDOWN:
+ errno = ENETDOWN;
+ break;
+ case WSAENETUNREACH:
+ errno = ENETUNREACH;
+ break;
+ case WSAENETRESET:
+ errno = ENETRESET;
+ break;
+ case WSAECONNABORTED:
+ errno = ECONNABORTED;
+ break;
+ case WSAECONNRESET:
+ errno = ECONNRESET;
+ break;
+ case WSAENOBUFS:
+ errno = ENOBUFS;
+ break;
+ case WSAEISCONN:
+ errno = EISCONN;
+ break;
+ case WSAENOTCONN:
+ errno = ENOTCONN;
+ break;
+ case WSAETIMEDOUT:
+ errno = ETIMEDOUT;
+ break;
+ case WSAECONNREFUSED:
+ errno = ECONNREFUSED;
+ break;
+ case WSAELOOP:
+ errno = ELOOP;
+ break;
+ case WSAEHOSTUNREACH:
+ errno = EHOSTUNREACH;
+ break;
+ default:
+ errno = (err > 10000 && err < 10025) ? err - 10000 : err;
+ break;
+ }
+}
diff --git a/build-aux/snippet/warn-on-use.h b/gnulib-tests/warn-on-use.h
index 3c0eb57..e76c384 100644
--- a/build-aux/snippet/warn-on-use.h
+++ b/gnulib-tests/warn-on-use.h
@@ -1,5 +1,5 @@
/* A C macro for emitting warnings if a function is used.
- Copyright (C) 2010-2017 Free Software Foundation, Inc.
+ Copyright (C) 2010-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* _GL_WARN_ON_USE (function, "literal string") issues a declaration
for FUNCTION which will then trigger a compiler warning containing
diff --git a/gnulib-tests/zerosize-ptr.h b/gnulib-tests/zerosize-ptr.h
index e097ccd..e4867e9 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-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* ISO C 99 does not allow memcmp(), memchr() etc. to be invoked with a NULL
argument. Therefore this file produces a non-NULL pointer which cannot
diff --git a/init.cfg b/init.cfg
index 915a260..0d5e3a3 100644
--- a/init.cfg
+++ b/init.cfg
@@ -1,6 +1,6 @@
# This file is sourced by init.sh, *before* its initialization.
-# Copyright (C) 2010-2017 Free Software Foundation, Inc.
+# Copyright (C) 2010-2018 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
@@ -13,7 +13,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# This goes hand in hand with the "exec 9>&2;" in tests/Makefile.am's
# TESTS_ENVIRONMENT definition.
@@ -59,6 +59,17 @@ require_en_utf8_locale_()
esac
}
+# Some tests would fail without this particular locale.
+# If the locale is not available, just skip the test.
+require_ru_utf8_locale_()
+{
+ path_prepend_ ./testsuite
+ case $(get-mb-cur-max ru_RU.UTF-8) in
+ [3456]) ;;
+ *) skip_ 'ru_RU.UTF-8 locale not found' ;;
+ esac
+}
+
require_el_iso88597_locale_()
{
path_prepend_ ./testsuite
@@ -110,3 +121,68 @@ require_valid_ja_eucjp_locale_()
local n=$(printf '\262C' | LC_ALL="$1" test-mbrtowc)
test "x$n" = "x-2,-1" || skip_ "locale '$1' is buggy"
}
+
+# When testing on a Windows machine, sed might output
+# line endings as CR,LF (\r\n) pairs - which will
+# then fail comparison with the expected output files.
+#
+# This function removes the CR (\r) characters from the given input file.
+remove_cr_inplace()
+{
+ sed -i -e "s/\r//g" "$@" || framework_failure_
+}
+
+require_selinux_()
+{
+ # When in a chroot of an SELinux-enabled system, but with a mock-simulated
+ # SELinux-*disabled* system, recognize that SELinux is disabled system wide:
+ grep 'selinuxfs$' /proc/filesystems > /dev/null \
+ || skip_ "this system lacks SELinux support"
+
+ # Independent of whether SELinux is enabled system-wide,
+ # the current file system may lack SELinux support.
+ # Also the current build may have SELinux support disabled.
+ case $(ls -Zd .) in
+ '? .'|'unlabeled .')
+ test -z "$CONFIG_HEADER" \
+ && framework_failure_ 'CONFIG_HEADER not defined'
+ grep '^#define HAVE_SELINUX_SELINUX_H 1' "$CONFIG_HEADER" > /dev/null \
+ && selinux_missing_="(file) system" || selinux_missing_="build"
+ skip_ "this $selinux_missing_ lacks SELinux support"
+ ;;
+ esac
+}
+
+very_expensive_()
+{
+ if test "$RUN_VERY_EXPENSIVE_TESTS" != yes; then
+ skip_ 'very expensive: disabled by default
+This test is very expensive, so it is disabled by default.
+To run it anyway, rerun make check with the RUN_VERY_EXPENSIVE_TESTS
+environment variable set to yes. E.g.,
+
+ env RUN_VERY_EXPENSIVE_TESTS=yes make check
+
+or use the shortcut target of the toplevel Makefile,
+
+ make check-very-expensive
+'
+ fi
+}
+
+expensive_()
+{
+ if test "$RUN_EXPENSIVE_TESTS" != yes; then
+ skip_ 'expensive: disabled by default
+This test is relatively expensive, so it is disabled by default.
+To run it anyway, rerun make check with the RUN_EXPENSIVE_TESTS
+environment variable set to yes. E.g.,
+
+ env RUN_EXPENSIVE_TESTS=yes make check
+
+or use the shortcut target of the toplevel Makefile,
+
+ make check-expensive
+'
+ fi
+}
diff --git a/lib/_Noreturn.h b/lib/_Noreturn.h
new file mode 100644
index 0000000..c44ad89
--- /dev/null
+++ b/lib/_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/lib/acl-errno-valid.c b/lib/acl-errno-valid.c
index a633985..96577eb 100644
--- a/lib/acl-errno-valid.c
+++ b/lib/acl-errno-valid.c
@@ -1,6 +1,6 @@
/* Test whether ACLs are well supported on this system.
- Copyright 2013-2017 Free Software Foundation, Inc.
+ Copyright 2013-2018 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
@@ -13,7 +13,7 @@
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/>.
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
Written by Paul Eggert. */
diff --git a/lib/acl-internal.c b/lib/acl-internal.c
index 2a2dee9..383c5dd 100644
--- a/lib/acl-internal.c
+++ b/lib/acl-internal.c
@@ -1,6 +1,6 @@
/* Test whether a file has a nontrivial ACL. -*- coding: utf-8 -*-
- Copyright (C) 2002-2003, 2005-2017 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2018 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
@@ -13,7 +13,7 @@
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/>.
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
Written by Paul Eggert, Andreas Grünbacher, and Bruno Haible. */
diff --git a/lib/acl-internal.h b/lib/acl-internal.h
index e7bda0e..6c65e65 100644
--- a/lib/acl-internal.h
+++ b/lib/acl-internal.h
@@ -1,6 +1,6 @@
/* Internal implementation of access control lists. -*- coding: utf-8 -*-
- Copyright (C) 2002-2003, 2005-2017 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2018 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
@@ -13,7 +13,7 @@
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/>.
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
Written by Paul Eggert, Andreas Grünbacher, and Bruno Haible. */
diff --git a/lib/acl.h b/lib/acl.h
index b13370c..d0c122c 100644
--- a/lib/acl.h
+++ b/lib/acl.h
@@ -1,6 +1,6 @@
/* acl.c - access control lists
- Copyright (C) 2002, 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2008-2018 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
@@ -13,7 +13,7 @@
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/>.
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
Written by Paul Eggert. */
diff --git a/lib/acl_entries.c b/lib/acl_entries.c
index 1df6a84..59dd420 100644
--- a/lib/acl_entries.c
+++ b/lib/acl_entries.c
@@ -1,6 +1,6 @@
/* Return the number of entries in an ACL.
- Copyright (C) 2002-2003, 2005-2017 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2018 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
@@ -13,7 +13,7 @@
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/>.
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
Written by Paul Eggert and Andreas Gruenbacher. */
diff --git a/lib/alignof.h b/lib/alignof.h
index e64e2c7..26d71dd 100644
--- a/lib/alignof.h
+++ b/lib/alignof.h
@@ -1,5 +1,5 @@
/* Determine alignment of types.
- Copyright (C) 2003-2004, 2006, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2003-2004, 2006, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _ALIGNOF_H
#define _ALIGNOF_H
diff --git a/lib/alloca.in.h b/lib/alloca.in.h
index c3dc38a..5ad8af8 100644
--- a/lib/alloca.in.h
+++ b/lib/alloca.in.h
@@ -1,6 +1,6 @@
/* Memory allocation on the stack.
- Copyright (C) 1995, 1999, 2001-2004, 2006-2017 Free Software Foundation,
+ Copyright (C) 1995, 1999, 2001-2004, 2006-2018 Free Software Foundation,
Inc.
This program is free software; you can redistribute it and/or modify it
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public
License along with this program; if not, see
- <http://www.gnu.org/licenses/>.
+ <https://www.gnu.org/licenses/>.
*/
/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
diff --git a/lib/arg-nonnull.h b/lib/arg-nonnull.h
new file mode 100644
index 0000000..5f03408
--- /dev/null
+++ b/lib/arg-nonnull.h
@@ -0,0 +1,26 @@
+/* A C macro for declaring that specific arguments must not be NULL.
+ Copyright (C) 2009-2018 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 <https://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/lib/basename-lgpl.c b/lib/basename-lgpl.c
index 54d3cc0..33f9994 100644
--- a/lib/basename-lgpl.c
+++ b/lib/basename-lgpl.c
@@ -1,6 +1,6 @@
/* basename.c -- return the last element in a file name
- Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2017 Free Software
+ Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2018 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -14,7 +14,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/btowc.c b/lib/btowc.c
index 214d2b7..54124b2 100644
--- a/lib/btowc.c
+++ b/lib/btowc.c
@@ -1,5 +1,5 @@
/* Convert unibyte character to wide character.
- Copyright (C) 2008, 2010-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2010-2018 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/c++defs.h b/lib/c++defs.h
new file mode 100644
index 0000000..72ff1ff
--- /dev/null
+++ b/lib/c++defs.h
@@ -0,0 +1,316 @@
+/* C++ compatible function declaration macros.
+ Copyright (C) 2010-2018 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 <https://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 <https://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 <https://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/lib/c-ctype.h b/lib/c-ctype.h
index bcdba6b..d55d4f6 100644
--- a/lib/c-ctype.h
+++ b/lib/c-ctype.h
@@ -5,7 +5,7 @@
<ctype.h> functions' behaviour depends on the current locale set via
setlocale.
- Copyright (C) 2000-2003, 2006, 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003, 2006, 2008-2018 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 @@ 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/>. */
+along with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef C_CTYPE_H
#define C_CTYPE_H
diff --git a/lib/c-strcase.h b/lib/c-strcase.h
index c82dab1..41f439e 100644
--- a/lib/c-strcase.h
+++ b/lib/c-strcase.h
@@ -1,5 +1,5 @@
/* Case-insensitive string comparison functions in C locale.
- Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2017 Free Software
+ Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2018 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef C_STRCASE_H
#define C_STRCASE_H
diff --git a/lib/c-strcasecmp.c b/lib/c-strcasecmp.c
index 5bce873..2b1ac99 100644
--- a/lib/c-strcasecmp.c
+++ b/lib/c-strcasecmp.c
@@ -1,5 +1,5 @@
/* c-strcasecmp.c -- case insensitive string comparator in C locale
- Copyright (C) 1998-1999, 2005-2006, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2006, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/c-strcaseeq.h b/lib/c-strcaseeq.h
index aa5e71f..9bde9de 100644
--- a/lib/c-strcaseeq.h
+++ b/lib/c-strcaseeq.h
@@ -1,5 +1,5 @@
/* Optimized case-insensitive string comparison in C locale.
- Copyright (C) 2001-2002, 2007, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2007, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>. */
diff --git a/lib/c-strncasecmp.c b/lib/c-strncasecmp.c
index ada62d7..8151c1a 100644
--- a/lib/c-strncasecmp.c
+++ b/lib/c-strncasecmp.c
@@ -1,5 +1,5 @@
/* c-strncasecmp.c -- case insensitive string comparator in C locale
- Copyright (C) 1998-1999, 2005-2006, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2006, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/canonicalize-lgpl.c b/lib/canonicalize-lgpl.c
index a32da91..898f0d1 100644
--- a/lib/canonicalize-lgpl.c
+++ b/lib/canonicalize-lgpl.c
@@ -1,5 +1,5 @@
/* Return the canonical absolute name of a given file.
- Copyright (C) 1996-2017 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef _LIBC
/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
@@ -59,8 +59,10 @@
*/
# undef getcwd
# endif
-# ifdef VMS
- /* We want the directory in Unix syntax, not in VMS syntax. */
+# if defined VMS && !defined getcwd
+ /* We want the directory in Unix syntax, not in VMS syntax.
+ The gnulib override of 'getcwd' takes 2 arguments; the original VMS
+ 'getcwd' takes 3 arguments. */
# define __getcwd(buf, max) getcwd (buf, max, 0)
# else
# define __getcwd getcwd
@@ -95,7 +97,7 @@ alloc_failed (void)
{
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* Avoid errno problem without using the malloc or realloc modules; see:
- http://lists.gnu.org/archive/html/bug-gnulib/2016-08/msg00025.html */
+ https://lists.gnu.org/r/bug-gnulib/2016-08/msg00025.html */
errno = ENOMEM;
#endif
}
@@ -268,6 +270,8 @@ __realpath (const char *name, char *resolved)
#endif
*dest = '\0';
+ /* FIXME: if lstat fails with errno == EOVERFLOW,
+ the entry exists. */
#ifdef _LIBC
if (__lxstat64 (_STAT_VER, rpath, &st) < 0)
#else
diff --git a/lib/close-stream.c b/lib/close-stream.c
index 96c1265..3d5a52e 100644
--- a/lib/close-stream.c
+++ b/lib/close-stream.c
@@ -1,6 +1,6 @@
/* Close a stream, with nicer error checking than fclose's.
- Copyright (C) 1998-2002, 2004, 2006-2017 Free Software Foundation, Inc.
+ Copyright (C) 1998-2002, 2004, 2006-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/closeout.c b/lib/closeout.c
index a23388f..0672732 100644
--- a/lib/closeout.c
+++ b/lib/closeout.c
@@ -1,6 +1,6 @@
/* Close standard output and standard error, exiting with a diagnostic on error.
- Copyright (C) 1998-2002, 2004, 2006, 2008-2017 Free Software Foundation,
+ Copyright (C) 1998-2002, 2004, 2006, 2008-2018 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
@@ -14,7 +14,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@@ -33,6 +33,16 @@
#include "exitfail.h"
#include "quotearg.h"
+#ifndef __has_feature
+# define __has_feature(a) false
+#endif
+
+#if defined __SANITIZE_ADDRESS__ || __has_feature (address_sanitizer)
+enum { SANITIZE_ADDRESS = true };
+#else
+enum { SANITIZE_ADDRESS = false };
+#endif
+
static const char *file_name;
/* Set the file name to be reported in the event an error is detected
@@ -119,6 +129,8 @@ close_stdout (void)
_exit (exit_failure);
}
- if (close_stream (stderr) != 0)
- _exit (exit_failure);
+ /* Close stderr only if not sanitizing, as sanitizers may report to
+ stderr after this function returns. */
+ if (!SANITIZE_ADDRESS && close_stream (stderr) != 0)
+ _exit (exit_failure);
}
diff --git a/lib/closeout.h b/lib/closeout.h
index f9df8fe..6629d49 100644
--- a/lib/closeout.h
+++ b/lib/closeout.h
@@ -1,6 +1,6 @@
/* Close standard output and standard error.
- Copyright (C) 1998, 2000, 2003-2004, 2006, 2008-2017 Free Software
+ Copyright (C) 1998, 2000, 2003-2004, 2006, 2008-2018 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -14,7 +14,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef CLOSEOUT_H
# define CLOSEOUT_H 1
diff --git a/lib/config.charset b/lib/config.charset
index 8bedbf3..7101403 100644
--- a/lib/config.charset
+++ b/lib/config.charset
@@ -1,7 +1,7 @@
#! /bin/sh
# Output a system dependent table of character encoding aliases.
#
-# Copyright (C) 2000-2004, 2006-2017 Free Software Foundation, Inc.
+# Copyright (C) 2000-2004, 2006-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# with this program; if not, see <https://www.gnu.org/licenses/>.
#
# The table consists of lines of the form
# ALIAS CANONICAL
diff --git a/lib/copy-acl.c b/lib/copy-acl.c
index eed8966..f5699ef 100644
--- a/lib/copy-acl.c
+++ b/lib/copy-acl.c
@@ -1,6 +1,6 @@
/* Copy access control list from one file to file. -*- coding: utf-8 -*-
- Copyright (C) 2002-2003, 2005-2017 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2018 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
@@ -13,7 +13,7 @@
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/>.
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
Written by Paul Eggert, Andreas Grünbacher, and Bruno Haible. */
diff --git a/lib/ctype.in.h b/lib/ctype.in.h
index 0bb2721..cfcb118 100644
--- a/lib/ctype.in.h
+++ b/lib/ctype.in.h
@@ -1,6 +1,6 @@
/* A substitute for ISO C99 <ctype.h>, for platforms on which it is incomplete.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible. */
diff --git a/lib/dfa.c b/lib/dfa.c
index 5bac288..0b694e1 100644
--- a/lib/dfa.c
+++ b/lib/dfa.c
@@ -1,5 +1,5 @@
/* dfa.c - deterministic extended regexp routines for GNU
- Copyright (C) 1988, 1998, 2000, 2002, 2004-2005, 2007-2017 Free Software
+ Copyright (C) 1988, 1998, 2000, 2002, 2004-2005, 2007-2018 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -54,6 +54,14 @@ isasciidigit (char c)
#include "xalloc.h"
#include "localeinfo.h"
+#ifndef FALLTHROUGH
+# if __GNUC__ < 7
+# define FALLTHROUGH ((void) 0)
+# else
+# define FALLTHROUGH __attribute__ ((__fallthrough__))
+# endif
+#endif
+
#ifndef MIN
# define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
@@ -551,8 +559,9 @@ struct dfa
bool, size_t *, bool *);
/* The locale is simple, like the C locale. These locales can be
- processed more efficiently, e.g., the relationship between lower-
- and upper-case letters is 1-1. */
+ processed more efficiently, as they are single-byte, their native
+ character set is in collating-sequence order, and they do not
+ have multi-character collating elements. */
bool simple_locale;
/* Other cached information derived from the locale. */
@@ -1012,7 +1021,6 @@ parse_bracket_exp (struct dfa *dfa)
if (invert)
{
c = bracket_fetch_wc (dfa);
- invert = true;
known_bracket_exp = dfa->simple_locale;
}
wint_t wc = dfa->lex.wctok;
@@ -1143,24 +1151,14 @@ parse_bracket_exp (struct dfa *dfa)
/* Treat [x-y] as a range if x != y. */
if (wc != wc2 || wc == WEOF)
{
- if (dfa->localeinfo.multibyte)
- known_bracket_exp = false;
- else if (dfa->simple_locale)
+ if (dfa->simple_locale
+ || (isasciidigit (c) & isasciidigit (c2)))
{
- int ci;
- for (ci = c; ci <= c2; ci++)
- setbit (ci, &ccl);
- if (dfa->syntax.case_fold)
- {
- int uc = toupper (c);
- int uc2 = toupper (c2);
- for (ci = 0; ci < NOTCHAR; ci++)
- {
- int uci = toupper (ci);
- if (uc <= uci && uci <= uc2)
- setbit (ci, &ccl);
- }
- }
+ for (int ci = c; ci <= c2; ci++)
+ if (dfa->syntax.case_fold && isalpha (ci))
+ setbit_case_fold_c (ci, &ccl);
+ else
+ setbit (ci, &ccl);
}
else
known_bracket_exp = false;
@@ -1174,7 +1172,7 @@ parse_bracket_exp (struct dfa *dfa)
if (!dfa->localeinfo.multibyte)
{
- if (dfa->syntax.case_fold)
+ if (dfa->syntax.case_fold && isalpha (c))
setbit_case_fold_c (c, &ccl);
else
setbit (c, &ccl);
@@ -1209,7 +1207,7 @@ parse_bracket_exp (struct dfa *dfa)
if (! known_bracket_exp)
return BACKREF;
- if (dfa->localeinfo.multibyte)
+ if (dfa->localeinfo.multibyte && (invert || dfa->lex.brack.nchars != 0))
{
dfa->lex.brack.invert = invert;
dfa->lex.brack.cset = emptyset (&ccl) ? -1 : charclass_index (dfa, &ccl);
@@ -1218,7 +1216,6 @@ parse_bracket_exp (struct dfa *dfa)
if (invert)
{
- assert (!dfa->localeinfo.multibyte);
notset (&ccl);
if (dfa->syntax.syntax_bits & RE_HAT_LISTS_NOT_NEWLINE)
clrbit ('\n', &ccl);
@@ -1625,10 +1622,10 @@ addtok_mb (struct dfa *dfa, token t, char mbprop)
case BACKREF:
dfa->fast = false;
- /* fallthrough */
+ FALLTHROUGH;
default:
dfa->nleaves++;
- /* fallthrough */
+ FALLTHROUGH;
case EMPTY:
dfa->parse.depth++;
break;
@@ -2425,8 +2422,7 @@ dfaanalyze (struct dfa *d, bool searchflag)
copy (&merged, &d->follows[pos[j].index]);
}
}
- /* fallthrough */
-
+ FALLTHROUGH;
case QMARK:
/* A QMARK or STAR node is automatically nullable. */
if (d->tokens[i] != PLUS)
@@ -2716,13 +2712,13 @@ build_state (state_num s, struct dfa *d, unsigned char uc)
else if (d->tokens[pos.index] >= CSET)
{
matches = d->charclasses[d->tokens[pos.index] - CSET];
- if (tstbit (uc, &d->charclasses[d->tokens[pos.index] - CSET]))
+ if (tstbit (uc, &matches))
matched = true;
}
else if (d->tokens[pos.index] == ANYCHAR)
{
matches = d->charclasses[d->canychar];
- if (tstbit (uc, &d->charclasses[d->canychar]))
+ if (tstbit (uc, &matches))
matched = true;
/* ANYCHAR must match with a single character, so we must put
@@ -3342,8 +3338,7 @@ dfa_supported (struct dfa const *d)
case NOTLIMWORD:
if (!d->localeinfo.multibyte)
continue;
- /* fallthrough */
-
+ FALLTHROUGH;
case BACKREF:
case MBCSET:
return false;
@@ -3452,7 +3447,7 @@ dfassbuild (struct dfa *d)
sup->tokens[j++] = EMPTY;
break;
}
- /* fallthrough */
+ FALLTHROUGH;
default:
sup->tokens[j++] = d->tokens[i];
if ((0 <= d->tokens[i] && d->tokens[i] < NOTCHAR)
diff --git a/lib/dfa.h b/lib/dfa.h
index a8d514b..4cf0331 100644
--- a/lib/dfa.h
+++ b/lib/dfa.h
@@ -1,5 +1,5 @@
/* dfa.h - declarations for GNU deterministic regexp compiler
- Copyright (C) 1988, 1998, 2007, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 1988, 1998, 2007, 2009-2018 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/lib/dirname-lgpl.c b/lib/dirname-lgpl.c
index b549ca9..a40f6a9 100644
--- a/lib/dirname-lgpl.c
+++ b/lib/dirname-lgpl.c
@@ -1,6 +1,6 @@
/* dirname.c -- return all but the last element in a file name
- Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2017 Free Software
+ Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2018 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -14,7 +14,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/dirname.h b/lib/dirname.h
index dbf920b..69aeb86 100644
--- a/lib/dirname.h
+++ b/lib/dirname.h
@@ -1,6 +1,6 @@
/* Take file names apart into directory and base names.
- Copyright (C) 1998, 2001, 2003-2006, 2009-2017 Free Software Foundation,
+ Copyright (C) 1998, 2001, 2003-2006, 2009-2018 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
@@ -14,7 +14,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef DIRNAME_H_
# define DIRNAME_H_ 1
diff --git a/lib/dosname.h b/lib/dosname.h
index dd5c177..66486d5 100644
--- a/lib/dosname.h
+++ b/lib/dosname.h
@@ -1,6 +1,6 @@
/* File names on MS-DOS/Windows systems.
- Copyright (C) 2000-2001, 2004-2006, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2000-2001, 2004-2006, 2009-2018 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
@@ -13,7 +13,7 @@
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/>.
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
From Paul Eggert and Jim Meyering. */
diff --git a/lib/errno.in.h b/lib/errno.in.h
index 13194f9..8d2f307 100644
--- a/lib/errno.in.h
+++ b/lib/errno.in.h
@@ -1,6 +1,6 @@
/* A POSIX-like <errno.h>.
- Copyright (C) 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _@GUARD_PREFIX@_ERRNO_H
diff --git a/lib/error.c b/lib/error.c
index 535d8a2..81788c7 100644
--- a/lib/error.c
+++ b/lib/error.c
@@ -1,5 +1,5 @@
/* Error handler for noninteractive utilities
- Copyright (C) 1990-1998, 2000-2007, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 1990-1998, 2000-2007, 2009-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
@@ -98,28 +98,32 @@ extern void __error_at_line (int status, int errnum, const char *file_name,
# 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
/* The gnulib override of fcntl is not needed in this file. */
# undef fcntl
-# if !HAVE_DECL_STRERROR_R
+# if !(GNULIB_STRERROR_R_POSIX || HAVE_DECL_STRERROR_R)
# ifndef HAVE_DECL_STRERROR_R
"this configure-time declaration test was not run"
# endif
# if STRERROR_R_CHAR_P
-char *strerror_r ();
+char *strerror_r (int errnum, char *buf, size_t buflen);
# else
-int strerror_r ();
+int strerror_r (int errnum, char *buf, size_t buflen);
# endif
# endif
#define program_name getprogname ()
-# if HAVE_STRERROR_R || defined strerror_r
+# if GNULIB_STRERROR_R_POSIX || HAVE_STRERROR_R || defined strerror_r
# define __strerror_r strerror_r
-# endif /* HAVE_STRERROR_R || defined strerror_r */
+# endif /* GNULIB_STRERROR_R_POSIX || HAVE_STRERROR_R || defined strerror_r */
#endif /* not _LIBC */
#if !_LIBC
@@ -172,9 +176,9 @@ print_errno_message (int errnum)
{
char const *s;
-#if defined HAVE_STRERROR_R || _LIBC
+#if _LIBC || GNULIB_STRERROR_R_POSIX || defined HAVE_STRERROR_R
char errbuf[1024];
-# if _LIBC || STRERROR_R_CHAR_P
+# if _LIBC || (!GNULIB_STRERROR_R_POSIX && STRERROR_R_CHAR_P)
s = __strerror_r (errnum, errbuf, sizeof errbuf);
# else
if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0)
@@ -268,7 +272,6 @@ error_tail (int status, int errnum, const char *message, va_list args)
else
#endif
vfprintf (stderr, message, args);
- va_end (args);
++error_message_count;
if (errnum)
@@ -318,6 +321,7 @@ error (int status, int errnum, const char *message, ...)
va_start (args, message);
error_tail (status, errnum, message, args);
+ va_end (args);
#ifdef _LIBC
_IO_funlockfile (stderr);
@@ -388,6 +392,7 @@ error_at_line (int status, int errnum, const char *file_name,
va_start (args, message);
error_tail (status, errnum, message, args);
+ va_end (args);
#ifdef _LIBC
_IO_funlockfile (stderr);
diff --git a/lib/error.h b/lib/error.h
index ef024d9..36401e1 100644
--- a/lib/error.h
+++ b/lib/error.h
@@ -1,5 +1,5 @@
/* Declaration for error-reporting function
- Copyright (C) 1995-1997, 2003, 2006, 2008-2017 Free Software Foundation,
+ Copyright (C) 1995-1997, 2003, 2006, 2008-2018 Free Software Foundation,
Inc.
This file is part of the GNU C Library.
@@ -14,7 +14,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef _ERROR_H
#define _ERROR_H 1
diff --git a/lib/exitfail.c b/lib/exitfail.c
index 524eb5c..19c5cba 100644
--- a/lib/exitfail.c
+++ b/lib/exitfail.c
@@ -1,6 +1,6 @@
/* Failure exit status
- Copyright (C) 2002-2003, 2005-2007, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2007, 2009-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/exitfail.h b/lib/exitfail.h
index 895511f..a42057b 100644
--- a/lib/exitfail.h
+++ b/lib/exitfail.h
@@ -1,6 +1,6 @@
/* Failure exit status
- Copyright (C) 2002, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2009-2018 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
@@ -13,6 +13,6 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
extern int volatile exit_failure;
diff --git a/lib/fcntl.in.h b/lib/fcntl.in.h
index 4a1d40a..719a54d 100644
--- a/lib/fcntl.in.h
+++ b/lib/fcntl.in.h
@@ -1,6 +1,6 @@
/* Like <fcntl.h>, but with non-working flags defined to 0.
- Copyright (C) 2006-2017 Free Software Foundation, Inc.
+ Copyright (C) 2006-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* written by Paul Eggert */
@@ -213,7 +213,10 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
#endif
#ifndef O_CLOEXEC
-# define O_CLOEXEC 0
+# define O_CLOEXEC 0x40000000 /* Try to not collide with system O_* flags. */
+# define GNULIB_defined_O_CLOEXEC 1
+#else
+# define GNULIB_defined_O_CLOEXEC 0
#endif
#ifndef O_DIRECT
diff --git a/gnulib-tests/filename.h b/lib/filename.h
index 0ea7e95..a8127e8 100644
--- a/gnulib-tests/filename.h
+++ b/lib/filename.h
@@ -1,5 +1,5 @@
/* Basic filename support macros.
- Copyright (C) 2001-2004, 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef _FILENAME_H
#define _FILENAME_H
diff --git a/lib/fpending.c b/lib/fpending.c
index c9b7786..7bc235d 100644
--- a/lib/fpending.c
+++ b/lib/fpending.c
@@ -1,5 +1,5 @@
/* fpending.c -- return the number of pending output bytes on a stream
- Copyright (C) 2000, 2004, 2006-2007, 2009-2017 Free Software Foundation,
+ Copyright (C) 2000, 2004, 2006-2007, 2009-2018 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Jim Meyering. */
@@ -32,7 +32,8 @@ __fpending (FILE *fp)
/* Most systems provide FILE as a struct and the necessary bitmask in
<stdio.h>, because they need it for implementing getc() and putc() as
fast macros. */
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
+ /* GNU libc, BeOS, Haiku, Linux libc5 */
return fp->_IO_write_ptr - fp->_IO_write_base;
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
@@ -41,7 +42,7 @@ __fpending (FILE *fp)
return fp->_ptr - fp->_buffer;
#elif defined __minix /* Minix */
return fp_->_ptr - fp_->_buf;
-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */
return (fp_->_ptr ? fp_->_ptr - fp_->_base : 0);
#elif defined __UCLIBC__ /* uClibc */
return (fp->__modeflags & __FLAG_WRITING ? fp->__bufpos - fp->__bufstart : 0);
@@ -51,8 +52,6 @@ __fpending (FILE *fp)
return fp->__bufp - fp->__buffer;
#elif defined EPLAN9 /* Plan9 */
return fp->wp - fp->buf;
-#elif defined __VMS /* VMS */
- return (*fp)->_ptr - (*fp)->_base;
#else
# error "Please port gnulib fpending.c to your platform!"
return 1;
diff --git a/lib/fpending.h b/lib/fpending.h
index a901dee..2ff26bc 100644
--- a/lib/fpending.h
+++ b/lib/fpending.h
@@ -1,6 +1,6 @@
/* Declare __fpending.
- Copyright (C) 2000, 2003, 2005-2006, 2009-2017 Free Software Foundation,
+ Copyright (C) 2000, 2003, 2005-2006, 2009-2018 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
@@ -14,7 +14,7 @@
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/>.
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
Written by Jim Meyering. */
diff --git a/lib/fstat.c b/lib/fstat.c
index a5aabc5..c143d46 100644
--- a/lib/fstat.c
+++ b/lib/fstat.c
@@ -1,5 +1,5 @@
/* fstat() replacement.
- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* If the user's config.h happens to include <sys/stat.h>, let it include only
the system's <sys/stat.h> here, so that orig_fstat doesn't recurse to
@@ -23,54 +23,41 @@
/* Get the original definition of fstat. It might be defined as a macro. */
#include <sys/types.h>
#include <sys/stat.h>
-#if _GL_WINDOWS_64_BIT_ST_SIZE
-# undef stat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */
-# define stat _stati64
-# undef fstat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */
-# define fstat _fstati64
-#endif
#undef __need_system_sys_stat_h
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# define WINDOWS_NATIVE
+#endif
+
+#if !defined WINDOWS_NATIVE
+
static int
orig_fstat (int fd, struct stat *buf)
{
return fstat (fd, buf);
}
+#endif
+
/* Specification. */
/* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc
eliminates this include because of the preliminary #include <sys/stat.h>
above. */
#include "sys/stat.h"
+#include "stat-time.h"
+
#include <errno.h>
#include <unistd.h>
-
-#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-# include "msvc-inval.h"
-#endif
-
-#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-static int
-fstat_nothrow (int fd, struct stat *buf)
-{
- int result;
-
- TRY_MSVC_INVAL
- {
- result = orig_fstat (fd, buf);
- }
- CATCH_MSVC_INVAL
- {
- result = -1;
- errno = EBADF;
- }
- DONE_MSVC_INVAL;
-
- return result;
-}
-#else
-# define fstat_nothrow orig_fstat
+#ifdef WINDOWS_NATIVE
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+# if GNULIB_MSVC_NOTHROW
+# include "msvc-nothrow.h"
+# else
+# include <io.h>
+# endif
+# include "stat-w32.h"
#endif
int
@@ -84,5 +71,20 @@ rpl_fstat (int fd, struct stat *buf)
return stat (name, buf);
#endif
- return fstat_nothrow (fd, buf);
+#ifdef WINDOWS_NATIVE
+ /* Fill the fields ourselves, because the original fstat function returns
+ values for st_atime, st_mtime, st_ctime that depend on the current time
+ zone. See
+ <https://lists.gnu.org/r/bug-gnulib/2017-04/msg00134.html> */
+ HANDLE h = (HANDLE) _get_osfhandle (fd);
+
+ if (h == INVALID_HANDLE_VALUE)
+ {
+ errno = EBADF;
+ return -1;
+ }
+ return _gl_fstat_by_handle (h, NULL, buf);
+#else
+ return stat_time_normalize (orig_fstat (fd, buf), buf);
+#endif
}
diff --git a/lib/fwriting.c b/lib/fwriting.c
index 173d098..9be6fb2 100644
--- a/lib/fwriting.c
+++ b/lib/fwriting.c
@@ -1,5 +1,5 @@
/* Retrieve information about a FILE stream.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@@ -27,7 +27,8 @@ fwriting (FILE *fp)
/* Most systems provide FILE as a struct and the necessary bitmask in
<stdio.h>, because they need it for implementing getc() and putc() as
fast macros. */
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
+ /* GNU libc, BeOS, Haiku, Linux libc5 */
return (fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) != 0;
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
@@ -36,7 +37,7 @@ fwriting (FILE *fp)
return (fp->_flags & _IOWRT) != 0;
#elif defined __minix /* Minix */
return (fp->_flags & _IOWRITING) != 0;
-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */
return (fp_->_flag & _IOWRT) != 0;
#elif defined __UCLIBC__ /* uClibc */
return (fp->__modeflags & __FLAG_WRITING) != 0;
diff --git a/lib/fwriting.h b/lib/fwriting.h
index 73b345f..f2a6c5e 100644
--- a/lib/fwriting.h
+++ b/lib/fwriting.h
@@ -1,5 +1,5 @@
/* Retrieve information about a FILE stream.
- Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <stdbool.h>
#include <stdio.h>
diff --git a/lib/get-permissions.c b/lib/get-permissions.c
index dc77748..bb1af5d 100644
--- a/lib/get-permissions.c
+++ b/lib/get-permissions.c
@@ -1,6 +1,6 @@
/* Get permissions of a file. -*- coding: utf-8 -*-
- Copyright (C) 2002-2003, 2005-2017 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2018 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
@@ -13,7 +13,7 @@
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/>.
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
Written by Paul Eggert, Andreas Grünbacher, and Bruno Haible. */
diff --git a/lib/getdelim.c b/lib/getdelim.c
index e2e0885..09b362e 100644
--- a/lib/getdelim.c
+++ b/lib/getdelim.c
@@ -1,5 +1,5 @@
/* getdelim.c --- Implementation of replacement getdelim function.
- Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2017 Free Software
+ Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2018 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or
@@ -13,7 +13,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* Ported from glibc by Simon Josefsson. */
@@ -52,7 +52,7 @@ alloc_failed (void)
{
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* Avoid errno problem without using the realloc module; see:
- http://lists.gnu.org/archive/html/bug-gnulib/2016-08/msg00025.html */
+ https://lists.gnu.org/r/bug-gnulib/2016-08/msg00025.html */
errno = ENOMEM;
#endif
}
diff --git a/lib/getfilecon.c b/lib/getfilecon.c
index a27d476..3bf254e 100644
--- a/lib/getfilecon.c
+++ b/lib/getfilecon.c
@@ -1,5 +1,5 @@
/* wrap getfilecon, lgetfilecon, and fgetfilecon
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* written by Jim Meyering */
diff --git a/lib/getopt-cdefs.in.h b/lib/getopt-cdefs.in.h
new file mode 100644
index 0000000..12b5a87
--- /dev/null
+++ b/lib/getopt-cdefs.in.h
@@ -0,0 +1,67 @@
+/* getopt-on-non-glibc compatibility macros.
+ Copyright (C) 1989-2018 Free Software Foundation, Inc.
+ This file is part of gnulib.
+ Unlike most of the getopt implementation, it is NOT shared
+ with the GNU C Library.
+
+ 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 the Free Software Foundation; either version 3 of
+ the License, or (at your option) any later version.
+
+ This file 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 gnulib; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _GETOPT_CDEFS_H
+#define _GETOPT_CDEFS_H 1
+
+/* This header should not be used directly; include getopt.h or
+ unistd.h instead. It does not have a protective #error, because
+ the guard macro for getopt.h in gnulib is not fixed. */
+
+/* getopt-core.h and getopt-ext.h are shared with GNU libc, and expect
+ a number of the internal macros supplied to GNU libc's headers by
+ sys/cdefs.h. Provide fallback definitions for all of them. */
+#if @HAVE_SYS_CDEFS_H@
+# include <sys/cdefs.h>
+#endif
+
+#ifndef __BEGIN_DECLS
+# ifdef __cplusplus
+# define __BEGIN_DECLS extern "C" {
+# else
+# define __BEGIN_DECLS /* nothing */
+# endif
+#endif
+#ifndef __END_DECLS
+# ifdef __cplusplus
+# define __END_DECLS }
+# else
+# define __END_DECLS /* nothing */
+# endif
+#endif
+
+#ifndef __GNUC_PREREQ
+# if defined __GNUC__ && defined __GNUC_VERSION__
+# define __GNUC_PREREQ(maj, min) \
+ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
+# else
+# define __GNUC_PREREQ(maj, min) 0
+# endif
+#endif
+
+#ifndef __THROW
+# if defined __cplusplus && __GNUC_PREREQ (2,8)
+# define __THROW throw ()
+# else
+# define __THROW
+# endif
+#endif
+
+#endif /* _GETOPT_CDEFS_H */
diff --git a/lib/getopt-core.h b/lib/getopt-core.h
new file mode 100644
index 0000000..e51b6c7
--- /dev/null
+++ b/lib/getopt-core.h
@@ -0,0 +1,96 @@
+/* Declarations for getopt (basic, portable features only).
+ Copyright (C) 1989-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library and is also part of gnulib.
+ Patches to this file should be submitted to both projects.
+
+ The GNU C Library 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.
+
+ The GNU C Library 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 the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _GETOPT_CORE_H
+#define _GETOPT_CORE_H 1
+
+/* This header should not be used directly; include getopt.h or
+ unistd.h instead. Unlike most bits headers, it does not have
+ a protective #error, because the guard macro for getopt.h in
+ gnulib is not fixed. */
+
+__BEGIN_DECLS
+
+/* For communication from 'getopt' to the caller.
+ When 'getopt' finds an option that takes an argument,
+ the argument value is returned here.
+ Also, when 'ordering' is RETURN_IN_ORDER,
+ each non-option ARGV-element is returned here. */
+
+extern char *optarg;
+
+/* Index in ARGV of the next element to be scanned.
+ This is used for communication to and from the caller
+ and for communication between successive calls to 'getopt'.
+
+ On entry to 'getopt', zero means this is the first call; initialize.
+
+ When 'getopt' returns -1, this is the index of the first of the
+ non-option elements that the caller should itself scan.
+
+ Otherwise, 'optind' communicates from one call to the next
+ how much of ARGV has been scanned so far. */
+
+extern int optind;
+
+/* Callers store zero here to inhibit the error message 'getopt' prints
+ for unrecognized options. */
+
+extern int opterr;
+
+/* Set to an option character which was unrecognized. */
+
+extern int optopt;
+
+/* Get definitions and prototypes for functions to process the
+ arguments in ARGV (ARGC of them, minus the program name) for
+ options given in OPTS.
+
+ Return the option character from OPTS just read. Return -1 when
+ there are no more options. For unrecognized options, or options
+ missing arguments, 'optopt' is set to the option letter, and '?' is
+ returned.
+
+ The OPTS string is a list of characters which are recognized option
+ letters, optionally followed by colons, specifying that that letter
+ takes an argument, to be placed in 'optarg'.
+
+ If a letter in OPTS is followed by two colons, its argument is
+ optional. This behavior is specific to the GNU 'getopt'.
+
+ The argument '--' causes premature termination of argument
+ scanning, explicitly telling 'getopt' that there are no more
+ options.
+
+ If OPTS begins with '-', then non-option arguments are treated as
+ arguments to the option '\1'. This behavior is specific to the GNU
+ 'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in
+ the environment, then do not permute arguments.
+
+ For standards compliance, the 'argv' argument has the type
+ char *const *, but this is inaccurate; if argument permutation is
+ enabled, the argv array (not the strings it points to) must be
+ writable. */
+
+extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
+ __THROW _GL_ARG_NONNULL ((2, 3));
+
+__END_DECLS
+
+#endif /* _GETOPT_CORE_H */
diff --git a/lib/getopt-ext.h b/lib/getopt-ext.h
new file mode 100644
index 0000000..cb41206
--- /dev/null
+++ b/lib/getopt-ext.h
@@ -0,0 +1,77 @@
+/* Declarations for getopt (GNU extensions).
+ Copyright (C) 1989-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library and is also part of gnulib.
+ Patches to this file should be submitted to both projects.
+
+ The GNU C Library 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.
+
+ The GNU C Library 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 the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _GETOPT_EXT_H
+#define _GETOPT_EXT_H 1
+
+/* This header should not be used directly; include getopt.h instead.
+ Unlike most bits headers, it does not have a protective #error,
+ because the guard macro for getopt.h in gnulib is not fixed. */
+
+__BEGIN_DECLS
+
+/* Describe the long-named options requested by the application.
+ The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
+ of 'struct option' terminated by an element containing a name which is
+ zero.
+
+ The field 'has_arg' is:
+ no_argument (or 0) if the option does not take an argument,
+ required_argument (or 1) if the option requires an argument,
+ optional_argument (or 2) if the option takes an optional argument.
+
+ If the field 'flag' is not NULL, it points to a variable that is set
+ to the value given in the field 'val' when the option is found, but
+ left unchanged if the option is not found.
+
+ To have a long-named option do something other than set an 'int' to
+ a compiled-in constant, such as set a value from 'optarg', set the
+ option's 'flag' field to zero and its 'val' field to a nonzero
+ value (the equivalent single-letter option character, if there is
+ one). For long options that have a zero 'flag' field, 'getopt'
+ returns the contents of the 'val' field. */
+
+struct option
+{
+ const char *name;
+ /* has_arg can't be an enum because some compilers complain about
+ type mismatches in all the code that assumes it is an int. */
+ int has_arg;
+ int *flag;
+ int val;
+};
+
+/* Names for the values of the 'has_arg' field of 'struct option'. */
+
+#define no_argument 0
+#define required_argument 1
+#define optional_argument 2
+
+extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind)
+ __THROW _GL_ARG_NONNULL ((2, 3));
+extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind)
+ __THROW _GL_ARG_NONNULL ((2, 3));
+
+__END_DECLS
+
+#endif /* _GETOPT_EXT_H */
diff --git a/lib/getopt-pfx-core.h b/lib/getopt-pfx-core.h
new file mode 100644
index 0000000..c62f9e2
--- /dev/null
+++ b/lib/getopt-pfx-core.h
@@ -0,0 +1,59 @@
+/* getopt (basic, portable features) gnulib wrapper header.
+ Copyright (C) 1989-2018 Free Software Foundation, Inc.
+ This file is part of gnulib.
+ Unlike most of the getopt implementation, it is NOT shared
+ with the GNU C Library.
+
+ 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 the Free Software Foundation; either version 3 of
+ the License, or (at your option) any later version.
+
+ This file 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 gnulib; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _GETOPT_PFX_CORE_H
+#define _GETOPT_PFX_CORE_H 1
+
+/* This header should not be used directly; include getopt.h or
+ unistd.h instead. It does not have a protective #error, because
+ the guard macro for getopt.h in gnulib is not fixed. */
+
+/* Standalone applications should #define __GETOPT_PREFIX to an
+ identifier that prefixes the external functions and variables
+ defined in getopt-core.h and getopt-ext.h. Systematically
+ rename identifiers so that they do not collide with the system
+ functions and variables. Renaming avoids problems with some
+ compilers and linkers. */
+#ifdef __GETOPT_PREFIX
+# ifndef __GETOPT_ID
+# define __GETOPT_CONCAT(x, y) x ## y
+# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y)
+# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
+# endif
+# undef getopt
+# undef optarg
+# undef opterr
+# undef optind
+# undef optopt
+# define getopt __GETOPT_ID (getopt)
+# define optarg __GETOPT_ID (optarg)
+# define opterr __GETOPT_ID (opterr)
+# define optind __GETOPT_ID (optind)
+# define optopt __GETOPT_ID (optopt)
+
+/* The system's getopt.h may have already included getopt-core.h to
+ declare the unprefixed identifiers. Undef _GETOPT_CORE_H so that
+ getopt-core.h declares them with prefixes. */
+# undef _GETOPT_CORE_H
+#endif
+
+#include <getopt-core.h>
+
+#endif /* _GETOPT_PFX_CORE_H */
diff --git a/lib/getopt-pfx-ext.h b/lib/getopt-pfx-ext.h
new file mode 100644
index 0000000..753f129
--- /dev/null
+++ b/lib/getopt-pfx-ext.h
@@ -0,0 +1,71 @@
+/* getopt (GNU extensions) gnulib wrapper header.
+ Copyright (C) 1989-2018 Free Software Foundation, Inc.
+ This file is part of gnulib.
+ Unlike most of the getopt implementation, it is NOT shared
+ with the GNU C Library.
+
+ 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 the Free Software Foundation; either version 3 of
+ the License, or (at your option) any later version.
+
+ This file 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 gnulib; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _GETOPT_PFX_EXT_H
+#define _GETOPT_PFX_EXT_H 1
+
+/* This header should not be used directly; include getopt.h instead.
+ It does not have a protective #error, because the guard macro for
+ getopt.h in gnulib is not fixed. */
+
+/* Standalone applications should #define __GETOPT_PREFIX to an
+ identifier that prefixes the external functions and variables
+ defined in getopt-core.h and getopt-ext.h. Systematically
+ rename identifiers so that they do not collide with the system
+ functions and variables. Renaming avoids problems with some
+ compilers and linkers. */
+#ifdef __GETOPT_PREFIX
+# ifndef __GETOPT_ID
+# define __GETOPT_CONCAT(x, y) x ## y
+# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y)
+# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
+# endif
+# undef getopt_long
+# undef getopt_long_only
+# undef option
+# undef _getopt_internal
+# define getopt_long __GETOPT_ID (getopt_long)
+# define getopt_long_only __GETOPT_ID (getopt_long_only)
+# define option __GETOPT_ID (option)
+# define _getopt_internal __GETOPT_ID (getopt_internal)
+
+/* The system's getopt.h may have already included getopt-ext.h to
+ declare the unprefixed identifiers. Undef _GETOPT_EXT_H so that
+ getopt-ext.h declares them with prefixes. */
+# undef _GETOPT_EXT_H
+#endif
+
+/* Standalone applications get correct prototypes for getopt_long and
+ getopt_long_only; they declare "char **argv". For backward
+ compatibility with old applications, if __GETOPT_PREFIX is not
+ defined, we supply GNU-libc-compatible, but incorrect, prototypes
+ using "char *const *argv". (GNU libc is stuck with the incorrect
+ prototypes, as they are baked into older versions of LSB.) */
+#ifndef __getopt_argv_const
+# if defined __GETOPT_PREFIX
+# define __getopt_argv_const /* empty */
+# else
+# define __getopt_argv_const const
+# endif
+#endif
+
+#include <getopt-ext.h>
+
+#endif /* _GETOPT_PFX_EXT_H */
diff --git a/lib/getopt.c b/lib/getopt.c
index e40ea8d..55375cc 100644
--- a/lib/getopt.c
+++ b/lib/getopt.c
@@ -1,23 +1,21 @@
/* Getopt for GNU.
- NOTE: getopt is part of the C library, so if you don't know what
- "Keep this file name-space clean" means, talk to drepper@gnu.org
- before changing it!
- Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2017 Free Software
- Foundation, Inc.
- This file is part of the GNU C Library.
-
- 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,
+ Copyright (C) 1987-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library and is also part of gnulib.
+ Patches to this file should be submitted to both projects.
+
+ The GNU C Library 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.
+
+ The GNU C Library 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.
+ 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/>. */
+ You should have received a copy of the GNU General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
#ifndef _LIBC
# include <config.h>
@@ -31,30 +29,54 @@
#include <unistd.h>
#ifdef _LIBC
+/* When used as part of glibc, error printing must be done differently
+ for standards compliance. getopt is not a cancellation point, so
+ it must not call functions that are, and it is specified by an
+ older standard than stdio locking, so it must not refer to
+ functions in the "user namespace" related to stdio locking.
+ Finally, it must use glibc's internal message translation so that
+ the messages are looked up in the proper text domain. */
# include <libintl.h>
+# define fprintf __fxprintf_nocancel
+# define flockfile(fp) _IO_flockfile (fp)
+# define funlockfile(fp) _IO_funlockfile (fp)
#else
# include "gettext.h"
# define _(msgid) gettext (msgid)
+/* When used standalone, flockfile and funlockfile might not be
+ available. */
+# if (!defined _POSIX_THREAD_SAFE_FUNCTIONS \
+ || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
+# define flockfile(fp) /* nop */
+# define funlockfile(fp) /* nop */
+# endif
+/* When used standalone, do not attempt to use alloca. */
+# define __libc_use_alloca(size) 0
+# undef alloca
+# define alloca(size) (abort (), (void *)0)
#endif
-#if defined _LIBC && defined USE_IN_LIBIO
-# include <wchar.h>
-#endif
-
-/* This version of 'getopt' appears to the caller like standard Unix 'getopt'
- but it behaves differently for the user, since it allows the user
- to intersperse the options with the other arguments.
-
- As 'getopt_long' works, it permutes the elements of ARGV so that,
- when it is done, all the options precede everything else. Thus
- all application programs are extended to handle flexible argument order.
-
- Using 'getopt' or setting the environment variable POSIXLY_CORRECT
+/* This implementation of 'getopt' has three modes for handling
+ options interspersed with non-option arguments. It can stop
+ scanning for options at the first non-option argument encountered,
+ as POSIX specifies. It can continue scanning for options after the
+ first non-option argument, but permute 'argv' as it goes so that,
+ after 'getopt' is done, all the options precede all the non-option
+ arguments and 'optind' points to the first non-option argument.
+ Or, it can report non-option arguments as if they were arguments to
+ the option character '\x01'.
+
+ The default behavior of 'getopt_long' is to permute the argument list.
+ When this implementation is used standalone, the default behavior of
+ 'getopt' is to stop at the first non-option argument, but when it is
+ used as part of GNU libc it also permutes the argument list. In both
+ cases, setting the environment variable POSIXLY_CORRECT to any value
disables permutation.
- Then the behavior is completely standard.
- GNU application programs can use a third alternative mode in which
- they can distinguish the relative order of options and other arguments. */
+ If the first character of the OPTSTRING argument to 'getopt' or
+ 'getopt_long' is '+', both functions will stop at the first
+ non-option argument. If it is '-', both functions will report
+ non-option arguments as arguments to the option character '\x01'. */
#include "getopt_int.h"
@@ -95,42 +117,7 @@ int optopt = '?';
/* Keep a global copy of all internal members of getopt_data. */
static struct _getopt_data getopt_data;
-
-
-#if defined HAVE_DECL_GETENV && !HAVE_DECL_GETENV
-extern char *getenv ();
-#endif
-#ifdef _LIBC
-/* Stored original parameters.
- XXX This is no good solution. We should rather copy the args so
- that we can compare them later. But we must not use malloc(3). */
-extern int __libc_argc;
-extern char **__libc_argv;
-
-/* Bash 2.0 gives us an environment variable containing flags
- indicating ARGV elements that should not be considered arguments. */
-
-# ifdef USE_NONOPTION_FLAGS
-/* Defined in getopt_init.c */
-extern char *__getopt_nonoption_flags;
-# endif
-
-# ifdef USE_NONOPTION_FLAGS
-# define SWAP_FLAGS(ch1, ch2) \
- if (d->__nonoption_flags_len > 0) \
- { \
- char __tmp = __getopt_nonoption_flags[ch1]; \
- __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
- __getopt_nonoption_flags[ch2] = __tmp; \
- }
-# else
-# define SWAP_FLAGS(ch1, ch2)
-# endif
-#else /* !_LIBC */
-# define SWAP_FLAGS(ch1, ch2)
-#endif /* _LIBC */
-
/* Exchange two adjacent subsequences of ARGV.
One subsequence is elements [first_nonopt,last_nonopt)
which contains all the non-options that have been skipped so far.
@@ -153,64 +140,40 @@ exchange (char **argv, struct _getopt_data *d)
It leaves the longer segment in the right place overall,
but it consists of two parts that need to be swapped next. */
-#if defined _LIBC && defined USE_NONOPTION_FLAGS
- /* First make sure the handling of the '__getopt_nonoption_flags'
- string can work normally. Our top argument must be in the range
- of the string. */
- if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len)
- {
- /* We must extend the array. The user plays games with us and
- presents new arguments. */
- char *new_str = malloc (top + 1);
- if (new_str == NULL)
- d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0;
- else
- {
- memset (__mempcpy (new_str, __getopt_nonoption_flags,
- d->__nonoption_flags_max_len),
- '\0', top + 1 - d->__nonoption_flags_max_len);
- d->__nonoption_flags_max_len = top + 1;
- __getopt_nonoption_flags = new_str;
- }
- }
-#endif
-
while (top > middle && middle > bottom)
{
if (top - middle > middle - bottom)
- {
- /* Bottom segment is the short one. */
- int len = middle - bottom;
- register int i;
-
- /* Swap it with the top part of the top segment. */
- for (i = 0; i < len; i++)
- {
- tem = argv[bottom + i];
- argv[bottom + i] = argv[top - (middle - bottom) + i];
- argv[top - (middle - bottom) + i] = tem;
- SWAP_FLAGS (bottom + i, top - (middle - bottom) + i);
- }
- /* Exclude the moved bottom segment from further swapping. */
- top -= len;
- }
+ {
+ /* Bottom segment is the short one. */
+ int len = middle - bottom;
+ int i;
+
+ /* Swap it with the top part of the top segment. */
+ for (i = 0; i < len; i++)
+ {
+ tem = argv[bottom + i];
+ argv[bottom + i] = argv[top - (middle - bottom) + i];
+ argv[top - (middle - bottom) + i] = tem;
+ }
+ /* Exclude the moved bottom segment from further swapping. */
+ top -= len;
+ }
else
- {
- /* Top segment is the short one. */
- int len = top - middle;
- register int i;
-
- /* Swap it with the bottom part of the bottom segment. */
- for (i = 0; i < len; i++)
- {
- tem = argv[bottom + i];
- argv[bottom + i] = argv[middle + i];
- argv[middle + i] = tem;
- SWAP_FLAGS (bottom + i, middle + i);
- }
- /* Exclude the moved top segment from further swapping. */
- bottom += len;
- }
+ {
+ /* Top segment is the short one. */
+ int len = top - middle;
+ int i;
+
+ /* Swap it with the bottom part of the bottom segment. */
+ for (i = 0; i < len; i++)
+ {
+ tem = argv[bottom + i];
+ argv[bottom + i] = argv[middle + i];
+ argv[middle + i] = tem;
+ }
+ /* Exclude the moved top segment from further swapping. */
+ bottom += len;
+ }
}
/* Update records for the slots the non-options now occupy. */
@@ -219,25 +182,216 @@ exchange (char **argv, struct _getopt_data *d)
d->__last_nonopt = d->optind;
}
-/* Initialize the internal data when the first call is made. */
+/* Process the argument starting with d->__nextchar as a long option.
+ d->optind should *not* have been advanced over this argument.
+
+ If the value returned is -1, it was not actually a long option, the
+ state is unchanged, and the argument should be processed as a set
+ of short options (this can only happen when long_only is true).
+ Otherwise, the option (and its argument, if any) have been consumed
+ and the return value is the value to return from _getopt_internal_r. */
+static int
+process_long_option (int argc, char **argv, const char *optstring,
+ const struct option *longopts, int *longind,
+ int long_only, struct _getopt_data *d,
+ int print_errors, const char *prefix)
+{
+ char *nameend;
+ size_t namelen;
+ const struct option *p;
+ const struct option *pfound = NULL;
+ int n_options;
+ int option_index;
+
+ for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++)
+ /* Do nothing. */ ;
+ namelen = nameend - d->__nextchar;
+
+ /* First look for an exact match, counting the options as a side
+ effect. */
+ for (p = longopts, n_options = 0; p->name; p++, n_options++)
+ if (!strncmp (p->name, d->__nextchar, namelen)
+ && namelen == strlen (p->name))
+ {
+ /* Exact match found. */
+ pfound = p;
+ option_index = n_options;
+ break;
+ }
+
+ if (pfound == NULL)
+ {
+ /* Didn't find an exact match, so look for abbreviations. */
+ unsigned char *ambig_set = NULL;
+ int ambig_malloced = 0;
+ int ambig_fallback = 0;
+ int indfound = -1;
+
+ for (p = longopts, option_index = 0; p->name; p++, option_index++)
+ if (!strncmp (p->name, d->__nextchar, namelen))
+ {
+ if (pfound == NULL)
+ {
+ /* First nonexact match found. */
+ pfound = p;
+ indfound = option_index;
+ }
+ else if (long_only
+ || pfound->has_arg != p->has_arg
+ || pfound->flag != p->flag
+ || pfound->val != p->val)
+ {
+ /* Second or later nonexact match found. */
+ if (!ambig_fallback)
+ {
+ if (!print_errors)
+ /* Don't waste effort tracking the ambig set if
+ we're not going to print it anyway. */
+ ambig_fallback = 1;
+ else if (!ambig_set)
+ {
+ if (__libc_use_alloca (n_options))
+ ambig_set = alloca (n_options);
+ else if ((ambig_set = malloc (n_options)) == NULL)
+ /* Fall back to simpler error message. */
+ ambig_fallback = 1;
+ else
+ ambig_malloced = 1;
+
+ if (ambig_set)
+ {
+ memset (ambig_set, 0, n_options);
+ ambig_set[indfound] = 1;
+ }
+ }
+ if (ambig_set)
+ ambig_set[option_index] = 1;
+ }
+ }
+ }
+
+ if (ambig_set || ambig_fallback)
+ {
+ if (print_errors)
+ {
+ if (ambig_fallback)
+ fprintf (stderr, _("%s: option '%s%s' is ambiguous\n"),
+ argv[0], prefix, d->__nextchar);
+ else
+ {
+ flockfile (stderr);
+ fprintf (stderr,
+ _("%s: option '%s%s' is ambiguous; possibilities:"),
+ argv[0], prefix, d->__nextchar);
+
+ for (option_index = 0; option_index < n_options; option_index++)
+ if (ambig_set[option_index])
+ fprintf (stderr, " '%s%s'",
+ prefix, longopts[option_index].name);
+
+ /* This must use 'fprintf' even though it's only
+ printing a single character, so that it goes through
+ __fxprintf_nocancel when compiled as part of glibc. */
+ fprintf (stderr, "\n");
+ funlockfile (stderr);
+ }
+ }
+ if (ambig_malloced)
+ free (ambig_set);
+ d->__nextchar += strlen (d->__nextchar);
+ d->optind++;
+ d->optopt = 0;
+ return '?';
+ }
+
+ option_index = indfound;
+ }
+
+ if (pfound == NULL)
+ {
+ /* Can't find it as a long option. If this is not getopt_long_only,
+ or the option starts with '--' or is not a valid short option,
+ then it's an error. */
+ if (!long_only || argv[d->optind][1] == '-'
+ || strchr (optstring, *d->__nextchar) == NULL)
+ {
+ if (print_errors)
+ fprintf (stderr, _("%s: unrecognized option '%s%s'\n"),
+ argv[0], prefix, d->__nextchar);
+
+ d->__nextchar = NULL;
+ d->optind++;
+ d->optopt = 0;
+ return '?';
+ }
+
+ /* Otherwise interpret it as a short option. */
+ return -1;
+ }
+
+ /* We have found a matching long option. Consume it. */
+ d->optind++;
+ d->__nextchar = NULL;
+ if (*nameend)
+ {
+ /* Don't test has_arg with >, because some C compilers don't
+ allow it to be used on enums. */
+ if (pfound->has_arg)
+ d->optarg = nameend + 1;
+ else
+ {
+ if (print_errors)
+ fprintf (stderr,
+ _("%s: option '%s%s' doesn't allow an argument\n"),
+ argv[0], prefix, pfound->name);
+
+ d->optopt = pfound->val;
+ return '?';
+ }
+ }
+ else if (pfound->has_arg == 1)
+ {
+ if (d->optind < argc)
+ d->optarg = argv[d->optind++];
+ else
+ {
+ if (print_errors)
+ fprintf (stderr,
+ _("%s: option '%s%s' requires an argument\n"),
+ argv[0], prefix, pfound->name);
+
+ d->optopt = pfound->val;
+ return optstring[0] == ':' ? ':' : '?';
+ }
+ }
+
+ if (longind != NULL)
+ *longind = option_index;
+ if (pfound->flag)
+ {
+ *(pfound->flag) = pfound->val;
+ return 0;
+ }
+ return pfound->val;
+}
+
+/* Initialize internal data upon the first call to getopt. */
static const char *
_getopt_initialize (int argc _GL_UNUSED,
- char **argv _GL_UNUSED, const char *optstring,
- struct _getopt_data *d, int posixly_correct)
+ char **argv _GL_UNUSED, const char *optstring,
+ struct _getopt_data *d, int posixly_correct)
{
/* Start processing options with ARGV-element 1 (since ARGV-element 0
is the program name); the sequence of previously skipped
non-option ARGV-elements is empty. */
+ if (d->optind == 0)
+ d->optind = 1;
d->__first_nonopt = d->__last_nonopt = d->optind;
-
d->__nextchar = NULL;
- d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT");
-
/* Determine how to handle the ordering of options and nonoptions. */
-
if (optstring[0] == '-')
{
d->__ordering = RETURN_IN_ORDER;
@@ -248,41 +402,12 @@ _getopt_initialize (int argc _GL_UNUSED,
d->__ordering = REQUIRE_ORDER;
++optstring;
}
- else if (d->__posixly_correct)
+ else if (posixly_correct || !!getenv ("POSIXLY_CORRECT"))
d->__ordering = REQUIRE_ORDER;
else
d->__ordering = PERMUTE;
-#if defined _LIBC && defined USE_NONOPTION_FLAGS
- if (!d->__posixly_correct
- && argc == __libc_argc && argv == __libc_argv)
- {
- if (d->__nonoption_flags_max_len == 0)
- {
- if (__getopt_nonoption_flags == NULL
- || __getopt_nonoption_flags[0] == '\0')
- d->__nonoption_flags_max_len = -1;
- else
- {
- const char *orig_str = __getopt_nonoption_flags;
- int len = d->__nonoption_flags_max_len = strlen (orig_str);
- if (d->__nonoption_flags_max_len < argc)
- d->__nonoption_flags_max_len = argc;
- __getopt_nonoption_flags =
- (char *) malloc (d->__nonoption_flags_max_len);
- if (__getopt_nonoption_flags == NULL)
- d->__nonoption_flags_max_len = -1;
- else
- memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
- '\0', d->__nonoption_flags_max_len - len);
- }
- }
- d->__nonoption_flags_len = d->__nonoption_flags_max_len;
- }
- else
- d->__nonoption_flags_len = 0;
-#endif
-
+ d->__initialized = 1;
return optstring;
}
@@ -344,8 +469,8 @@ _getopt_initialize (int argc _GL_UNUSED,
int
_getopt_internal_r (int argc, char **argv, const char *optstring,
- const struct option *longopts, int *longind,
- int long_only, struct _getopt_data *d, int posixly_correct)
+ const struct option *longopts, int *longind,
+ int long_only, struct _getopt_data *d, int posixly_correct)
{
int print_errors = d->opterr;
@@ -355,461 +480,129 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
d->optarg = NULL;
if (d->optind == 0 || !d->__initialized)
- {
- if (d->optind == 0)
- d->optind = 1; /* Don't scan ARGV[0], the program name. */
- optstring = _getopt_initialize (argc, argv, optstring, d,
- posixly_correct);
- d->__initialized = 1;
- }
+ optstring = _getopt_initialize (argc, argv, optstring, d, posixly_correct);
else if (optstring[0] == '-' || optstring[0] == '+')
optstring++;
+
if (optstring[0] == ':')
print_errors = 0;
- /* Test whether ARGV[optind] points to a non-option argument.
- Either it does not have option syntax, or there is an environment flag
- from the shell indicating it is not an option. The later information
- is only used when the used in the GNU libc. */
-#if defined _LIBC && defined USE_NONOPTION_FLAGS
-# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \
- || (d->optind < d->__nonoption_flags_len \
- && __getopt_nonoption_flags[d->optind] == '1'))
-#else
-# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0')
-#endif
+ /* Test whether ARGV[optind] points to a non-option argument. */
+#define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0')
if (d->__nextchar == NULL || *d->__nextchar == '\0')
{
/* Advance to the next ARGV-element. */
/* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
- moved back by the user (who may also have changed the arguments). */
+ moved back by the user (who may also have changed the arguments). */
if (d->__last_nonopt > d->optind)
- d->__last_nonopt = d->optind;
+ d->__last_nonopt = d->optind;
if (d->__first_nonopt > d->optind)
- d->__first_nonopt = d->optind;
+ d->__first_nonopt = d->optind;
if (d->__ordering == PERMUTE)
- {
- /* If we have just processed some options following some non-options,
- exchange them so that the options come first. */
+ {
+ /* If we have just processed some options following some non-options,
+ exchange them so that the options come first. */
- if (d->__first_nonopt != d->__last_nonopt
- && d->__last_nonopt != d->optind)
- exchange ((char **) argv, d);
- else if (d->__last_nonopt != d->optind)
- d->__first_nonopt = d->optind;
+ if (d->__first_nonopt != d->__last_nonopt
+ && d->__last_nonopt != d->optind)
+ exchange (argv, d);
+ else if (d->__last_nonopt != d->optind)
+ d->__first_nonopt = d->optind;
- /* Skip any additional non-options
- and extend the range of non-options previously skipped. */
+ /* Skip any additional non-options
+ and extend the range of non-options previously skipped. */
- while (d->optind < argc && NONOPTION_P)
- d->optind++;
- d->__last_nonopt = d->optind;
- }
+ while (d->optind < argc && NONOPTION_P)
+ d->optind++;
+ d->__last_nonopt = d->optind;
+ }
/* The special ARGV-element '--' means premature end of options.
- Skip it like a null option,
- then exchange with previous non-options as if it were an option,
- then skip everything else like a non-option. */
+ Skip it like a null option,
+ then exchange with previous non-options as if it were an option,
+ then skip everything else like a non-option. */
if (d->optind != argc && !strcmp (argv[d->optind], "--"))
- {
- d->optind++;
+ {
+ d->optind++;
- if (d->__first_nonopt != d->__last_nonopt
- && d->__last_nonopt != d->optind)
- exchange ((char **) argv, d);
- else if (d->__first_nonopt == d->__last_nonopt)
- d->__first_nonopt = d->optind;
- d->__last_nonopt = argc;
+ if (d->__first_nonopt != d->__last_nonopt
+ && d->__last_nonopt != d->optind)
+ exchange (argv, d);
+ else if (d->__first_nonopt == d->__last_nonopt)
+ d->__first_nonopt = d->optind;
+ d->__last_nonopt = argc;
- d->optind = argc;
- }
+ d->optind = argc;
+ }
/* If we have done all the ARGV-elements, stop the scan
- and back over any non-options that we skipped and permuted. */
+ and back over any non-options that we skipped and permuted. */
if (d->optind == argc)
- {
- /* Set the next-arg-index to point at the non-options
- that we previously skipped, so the caller will digest them. */
- if (d->__first_nonopt != d->__last_nonopt)
- d->optind = d->__first_nonopt;
- return -1;
- }
+ {
+ /* Set the next-arg-index to point at the non-options
+ that we previously skipped, so the caller will digest them. */
+ if (d->__first_nonopt != d->__last_nonopt)
+ d->optind = d->__first_nonopt;
+ return -1;
+ }
/* If we have come to a non-option and did not permute it,
- either stop the scan or describe it to the caller and pass it by. */
+ either stop the scan or describe it to the caller and pass it by. */
if (NONOPTION_P)
- {
- if (d->__ordering == REQUIRE_ORDER)
- return -1;
- d->optarg = argv[d->optind++];
- return 1;
- }
+ {
+ if (d->__ordering == REQUIRE_ORDER)
+ return -1;
+ d->optarg = argv[d->optind++];
+ return 1;
+ }
/* We have found another option-ARGV-element.
- Skip the initial punctuation. */
-
- d->__nextchar = (argv[d->optind] + 1
- + (longopts != NULL && argv[d->optind][1] == '-'));
- }
-
- /* Decode the current option-ARGV-element. */
-
- /* Check whether the ARGV-element is a long option.
-
- If long_only and the ARGV-element has the form "-f", where f is
- a valid short option, don't consider it an abbreviated form of
- a long option that starts with f. Otherwise there would be no
- way to give the -f short option.
-
- On the other hand, if there's a long option "fubar" and
- the ARGV-element is "-fu", do consider that an abbreviation of
- the long option, just like "--fu", and not "-f" with arg "u".
-
- This distinction seems to be the most useful approach. */
-
- if (longopts != NULL
- && (argv[d->optind][1] == '-'
- || (long_only && (argv[d->optind][2]
- || !strchr (optstring, argv[d->optind][1])))))
- {
- char *nameend;
- unsigned int namelen;
- const struct option *p;
- const struct option *pfound = NULL;
- struct option_list
- {
- const struct option *p;
- struct option_list *next;
- } *ambig_list = NULL;
-#ifdef _LIBC
-/* malloc() not used for _LIBC to simplify failure messages. */
-# define free_option_list(l)
-#else
-# define free_option_list(l) \
- while (l != NULL) \
- { \
- struct option_list *pn = l->next; \
- free (l); \
- l = pn; \
- }
-#endif
- int exact = 0;
- int ambig = 0;
- int indfound = -1;
- int option_index;
-
- for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++)
- /* Do nothing. */ ;
- namelen = nameend - d->__nextchar;
-
- /* Test all long options for either exact match
- or abbreviated matches. */
- for (p = longopts, option_index = 0; p->name; p++, option_index++)
- if (!strncmp (p->name, d->__nextchar, namelen))
- {
- if (namelen == (unsigned int) strlen (p->name))
- {
- /* Exact match found. */
- pfound = p;
- indfound = option_index;
- exact = 1;
- break;
- }
- else if (pfound == NULL)
- {
- /* First nonexact match found. */
- pfound = p;
- indfound = option_index;
- }
- else if (ambig)
- ; /* Taking simpler path to handling ambiguities. */
- else if (long_only
- || pfound->has_arg != p->has_arg
- || pfound->flag != p->flag
- || pfound->val != p->val)
- {
- /* Second or later nonexact match found. */
-#ifdef _LIBC
- struct option_list *newp = alloca (sizeof (*newp));
-#else
- struct option_list *newp = malloc (sizeof (*newp));
- if (newp == NULL)
- {
- free_option_list (ambig_list);
- ambig_list = NULL;
- ambig = 1; /* Use simpler fallback message. */
- }
- else
-#endif
- {
- newp->p = p;
- newp->next = ambig_list;
- ambig_list = newp;
- }
- }
- }
-
- if ((ambig || ambig_list) && !exact)
- {
- if (print_errors && ambig_list)
- {
- struct option_list first;
- first.p = pfound;
- first.next = ambig_list;
- ambig_list = &first;
-
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf = NULL;
- size_t buflen = 0;
-
- FILE *fp = open_memstream (&buf, &buflen);
- if (fp != NULL)
- {
- fprintf (fp,
- _("%s: option '%s' is ambiguous; possibilities:"),
- argv[0], argv[d->optind]);
-
- do
- {
- fprintf (fp, " '--%s'", ambig_list->p->name);
- ambig_list = ambig_list->next;
- }
- while (ambig_list != NULL);
-
- fputc_unlocked ('\n', fp);
-
- if (__builtin_expect (fclose (fp) != EOF, 1))
- {
- _IO_flockfile (stderr);
-
- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
- ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
-
- __fxprintf (NULL, "%s", buf);
-
- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
- _IO_funlockfile (stderr);
-
- free (buf);
- }
- }
-#else
- fprintf (stderr,
- _("%s: option '%s' is ambiguous; possibilities:"),
- argv[0], argv[d->optind]);
- do
- {
- fprintf (stderr, " '--%s'", ambig_list->p->name);
- ambig_list = ambig_list->next;
- }
- while (ambig_list != NULL);
-
- fputc ('\n', stderr);
-#endif
- }
- else if (print_errors && ambig)
- {
- fprintf (stderr,
- _("%s: option '%s' is ambiguous\n"),
- argv[0], argv[d->optind]);
- }
- d->__nextchar += strlen (d->__nextchar);
- d->optind++;
- d->optopt = 0;
- free_option_list (ambig_list);
- return '?';
- }
-
- free_option_list (ambig_list);
-
- if (pfound != NULL)
- {
- option_index = indfound;
- d->optind++;
- if (*nameend)
- {
- /* Don't test has_arg with >, because some C compilers don't
- allow it to be used on enums. */
- if (pfound->has_arg)
- d->optarg = nameend + 1;
- else
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
- int n;
-#endif
-
- if (argv[d->optind - 1][1] == '-')
- {
- /* --option */
-#if defined _LIBC && defined USE_IN_LIBIO
- n = __asprintf (&buf, _("\
-%s: option '--%s' doesn't allow an argument\n"),
- argv[0], pfound->name);
-#else
- fprintf (stderr, _("\
-%s: option '--%s' doesn't allow an argument\n"),
- argv[0], pfound->name);
-#endif
- }
- else
- {
- /* +option or -option */
-#if defined _LIBC && defined USE_IN_LIBIO
- n = __asprintf (&buf, _("\
-%s: option '%c%s' doesn't allow an argument\n"),
- argv[0], argv[d->optind - 1][0],
- pfound->name);
-#else
- fprintf (stderr, _("\
-%s: option '%c%s' doesn't allow an argument\n"),
- argv[0], argv[d->optind - 1][0],
- pfound->name);
-#endif
- }
-
-#if defined _LIBC && defined USE_IN_LIBIO
- if (n >= 0)
- {
- _IO_flockfile (stderr);
-
- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
- ((_IO_FILE *) stderr)->_flags2
- |= _IO_FLAGS2_NOTCANCEL;
-
- __fxprintf (NULL, "%s", buf);
-
- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
- _IO_funlockfile (stderr);
-
- free (buf);
- }
-#endif
- }
-
- d->__nextchar += strlen (d->__nextchar);
-
- d->optopt = pfound->val;
- return '?';
- }
- }
- else if (pfound->has_arg == 1)
- {
- if (d->optind < argc)
- d->optarg = argv[d->optind++];
- else
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- if (__asprintf (&buf, _("\
-%s: option '--%s' requires an argument\n"),
- argv[0], pfound->name) >= 0)
- {
- _IO_flockfile (stderr);
-
- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
- ((_IO_FILE *) stderr)->_flags2
- |= _IO_FLAGS2_NOTCANCEL;
-
- __fxprintf (NULL, "%s", buf);
-
- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
- _IO_funlockfile (stderr);
-
- free (buf);
- }
-#else
- fprintf (stderr,
- _("%s: option '--%s' requires an argument\n"),
- argv[0], pfound->name);
-#endif
- }
- d->__nextchar += strlen (d->__nextchar);
- d->optopt = pfound->val;
- return optstring[0] == ':' ? ':' : '?';
- }
- }
- d->__nextchar += strlen (d->__nextchar);
- if (longind != NULL)
- *longind = option_index;
- if (pfound->flag)
- {
- *(pfound->flag) = pfound->val;
- return 0;
- }
- return pfound->val;
- }
-
- /* Can't find it as a long option. If this is not getopt_long_only,
- or the option starts with '--' or is not a valid short
- option, then it's an error.
- Otherwise interpret it as a short option. */
- if (!long_only || argv[d->optind][1] == '-'
- || strchr (optstring, *d->__nextchar) == NULL)
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
- int n;
-#endif
-
- if (argv[d->optind][1] == '-')
- {
- /* --option */
-#if defined _LIBC && defined USE_IN_LIBIO
- n = __asprintf (&buf, _("%s: unrecognized option '--%s'\n"),
- argv[0], d->__nextchar);
-#else
- fprintf (stderr, _("%s: unrecognized option '--%s'\n"),
- argv[0], d->__nextchar);
-#endif
- }
- else
- {
- /* +option or -option */
-#if defined _LIBC && defined USE_IN_LIBIO
- n = __asprintf (&buf, _("%s: unrecognized option '%c%s'\n"),
- argv[0], argv[d->optind][0], d->__nextchar);
-#else
- fprintf (stderr, _("%s: unrecognized option '%c%s'\n"),
- argv[0], argv[d->optind][0], d->__nextchar);
-#endif
- }
-
-#if defined _LIBC && defined USE_IN_LIBIO
- if (n >= 0)
- {
- _IO_flockfile (stderr);
-
- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
- ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
-
- __fxprintf (NULL, "%s", buf);
-
- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
- _IO_funlockfile (stderr);
-
- free (buf);
- }
-#endif
- }
- d->__nextchar = (char *) "";
- d->optind++;
- d->optopt = 0;
- return '?';
- }
+ Check whether it might be a long option. */
+ if (longopts)
+ {
+ if (argv[d->optind][1] == '-')
+ {
+ /* "--foo" is always a long option. The special option
+ "--" was handled above. */
+ d->__nextchar = argv[d->optind] + 2;
+ return process_long_option (argc, argv, optstring, longopts,
+ longind, long_only, d,
+ print_errors, "--");
+ }
+
+ /* If long_only and the ARGV-element has the form "-f",
+ where f is a valid short option, don't consider it an
+ abbreviated form of a long option that starts with f.
+ Otherwise there would be no way to give the -f short
+ option.
+
+ On the other hand, if there's a long option "fubar" and
+ the ARGV-element is "-fu", do consider that an
+ abbreviation of the long option, just like "--fu", and
+ not "-f" with arg "u".
+
+ This distinction seems to be the most useful approach. */
+ if (long_only && (argv[d->optind][2]
+ || !strchr (optstring, argv[d->optind][1])))
+ {
+ int code;
+ d->__nextchar = argv[d->optind] + 1;
+ code = process_long_option (argc, argv, optstring, longopts,
+ longind, long_only, d,
+ print_errors, "-");
+ if (code != -1)
+ return code;
+ }
+ }
+
+ /* It is not a long option. Skip the initial punctuation. */
+ d->__nextchar = argv[d->optind] + 1;
}
/* Look at and handle the next short option-character. */
@@ -824,331 +617,83 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
if (temp == NULL || c == ':' || c == ';')
{
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
- int n;
-#endif
-
-#if defined _LIBC && defined USE_IN_LIBIO
- n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"),
- argv[0], c);
-#else
- fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c);
-#endif
-
-#if defined _LIBC && defined USE_IN_LIBIO
- if (n >= 0)
- {
- _IO_flockfile (stderr);
-
- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
- ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
-
- __fxprintf (NULL, "%s", buf);
-
- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
- _IO_funlockfile (stderr);
-
- free (buf);
- }
-#endif
- }
- d->optopt = c;
- return '?';
+ if (print_errors)
+ fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c);
+ d->optopt = c;
+ return '?';
}
+
/* Convenience. Treat POSIX -W foo same as long option --foo */
- if (temp[0] == 'W' && temp[1] == ';')
+ if (temp[0] == 'W' && temp[1] == ';' && longopts != NULL)
{
- char *nameend;
- const struct option *p;
- const struct option *pfound = NULL;
- int exact = 0;
- int ambig = 0;
- int indfound = 0;
- int option_index;
-
- if (longopts == NULL)
- goto no_longs;
-
- /* This is an option that requires an argument. */
- if (*d->__nextchar != '\0')
- {
- d->optarg = d->__nextchar;
- /* If we end this ARGV-element by taking the rest as an arg,
- we must advance to the next element now. */
- d->optind++;
- }
- else if (d->optind == argc)
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- if (__asprintf (&buf,
- _("%s: option requires an argument -- '%c'\n"),
- argv[0], c) >= 0)
- {
- _IO_flockfile (stderr);
-
- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
- ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
-
- __fxprintf (NULL, "%s", buf);
-
- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
- _IO_funlockfile (stderr);
-
- free (buf);
- }
-#else
- fprintf (stderr,
- _("%s: option requires an argument -- '%c'\n"),
- argv[0], c);
-#endif
- }
- d->optopt = c;
- if (optstring[0] == ':')
- c = ':';
- else
- c = '?';
- return c;
- }
- else
- /* We already incremented 'd->optind' once;
- increment it again when taking next ARGV-elt as argument. */
- d->optarg = argv[d->optind++];
-
- /* optarg is now the argument, see if it's in the
- table of longopts. */
-
- for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '=';
- nameend++)
- /* Do nothing. */ ;
-
- /* Test all long options for either exact match
- or abbreviated matches. */
- for (p = longopts, option_index = 0; p->name; p++, option_index++)
- if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar))
- {
- if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name))
- {
- /* Exact match found. */
- pfound = p;
- indfound = option_index;
- exact = 1;
- break;
- }
- else if (pfound == NULL)
- {
- /* First nonexact match found. */
- pfound = p;
- indfound = option_index;
- }
- else if (long_only
- || pfound->has_arg != p->has_arg
- || pfound->flag != p->flag
- || pfound->val != p->val)
- /* Second or later nonexact match found. */
- ambig = 1;
- }
- if (ambig && !exact)
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"),
- argv[0], d->optarg) >= 0)
- {
- _IO_flockfile (stderr);
-
- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
- ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
-
- __fxprintf (NULL, "%s", buf);
-
- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
- _IO_funlockfile (stderr);
-
- free (buf);
- }
-#else
- fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"),
- argv[0], d->optarg);
-#endif
- }
- d->__nextchar += strlen (d->__nextchar);
- d->optind++;
- return '?';
- }
- if (pfound != NULL)
- {
- option_index = indfound;
- if (*nameend)
- {
- /* Don't test has_arg with >, because some C compilers don't
- allow it to be used on enums. */
- if (pfound->has_arg)
- d->optarg = nameend + 1;
- else
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- if (__asprintf (&buf, _("\
-%s: option '-W %s' doesn't allow an argument\n"),
- argv[0], pfound->name) >= 0)
- {
- _IO_flockfile (stderr);
-
- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
- ((_IO_FILE *) stderr)->_flags2
- |= _IO_FLAGS2_NOTCANCEL;
-
- __fxprintf (NULL, "%s", buf);
-
- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
- _IO_funlockfile (stderr);
-
- free (buf);
- }
-#else
- fprintf (stderr, _("\
-%s: option '-W %s' doesn't allow an argument\n"),
- argv[0], pfound->name);
-#endif
- }
-
- d->__nextchar += strlen (d->__nextchar);
- return '?';
- }
- }
- else if (pfound->has_arg == 1)
- {
- if (d->optind < argc)
- d->optarg = argv[d->optind++];
- else
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- if (__asprintf (&buf, _("\
-%s: option '-W %s' requires an argument\n"),
- argv[0], pfound->name) >= 0)
- {
- _IO_flockfile (stderr);
-
- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
- ((_IO_FILE *) stderr)->_flags2
- |= _IO_FLAGS2_NOTCANCEL;
-
- __fxprintf (NULL, "%s", buf);
-
- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
- _IO_funlockfile (stderr);
-
- free (buf);
- }
-#else
- fprintf (stderr, _("\
-%s: option '-W %s' requires an argument\n"),
- argv[0], pfound->name);
-#endif
- }
- d->__nextchar += strlen (d->__nextchar);
- return optstring[0] == ':' ? ':' : '?';
- }
- }
- else
- d->optarg = NULL;
- d->__nextchar += strlen (d->__nextchar);
- if (longind != NULL)
- *longind = option_index;
- if (pfound->flag)
- {
- *(pfound->flag) = pfound->val;
- return 0;
- }
- return pfound->val;
- }
-
- no_longs:
- d->__nextchar = NULL;
- return 'W'; /* Let the application handle it. */
+ /* This is an option that requires an argument. */
+ if (*d->__nextchar != '\0')
+ d->optarg = d->__nextchar;
+ else if (d->optind == argc)
+ {
+ if (print_errors)
+ fprintf (stderr,
+ _("%s: option requires an argument -- '%c'\n"),
+ argv[0], c);
+
+ d->optopt = c;
+ if (optstring[0] == ':')
+ c = ':';
+ else
+ c = '?';
+ return c;
+ }
+ else
+ d->optarg = argv[d->optind];
+
+ d->__nextchar = d->optarg;
+ d->optarg = NULL;
+ return process_long_option (argc, argv, optstring, longopts, longind,
+ 0 /* long_only */, d, print_errors, "-W ");
}
if (temp[1] == ':')
{
- if (temp[2] == ':')
- {
- /* This is an option that accepts an argument optionally. */
- if (*d->__nextchar != '\0')
- {
- d->optarg = d->__nextchar;
- d->optind++;
- }
- else
- d->optarg = NULL;
- d->__nextchar = NULL;
- }
- else
- {
- /* This is an option that requires an argument. */
- if (*d->__nextchar != '\0')
- {
- d->optarg = d->__nextchar;
- /* If we end this ARGV-element by taking the rest as an arg,
- we must advance to the next element now. */
- d->optind++;
- }
- else if (d->optind == argc)
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- if (__asprintf (&buf, _("\
-%s: option requires an argument -- '%c'\n"),
- argv[0], c) >= 0)
- {
- _IO_flockfile (stderr);
-
- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
- ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
-
- __fxprintf (NULL, "%s", buf);
-
- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
- _IO_funlockfile (stderr);
-
- free (buf);
- }
-#else
- fprintf (stderr,
- _("%s: option requires an argument -- '%c'\n"),
- argv[0], c);
-#endif
- }
- d->optopt = c;
- if (optstring[0] == ':')
- c = ':';
- else
- c = '?';
- }
- else
- /* We already incremented 'optind' once;
- increment it again when taking next ARGV-elt as argument. */
- d->optarg = argv[d->optind++];
- d->__nextchar = NULL;
- }
+ if (temp[2] == ':')
+ {
+ /* This is an option that accepts an argument optionally. */
+ if (*d->__nextchar != '\0')
+ {
+ d->optarg = d->__nextchar;
+ d->optind++;
+ }
+ else
+ d->optarg = NULL;
+ d->__nextchar = NULL;
+ }
+ else
+ {
+ /* This is an option that requires an argument. */
+ if (*d->__nextchar != '\0')
+ {
+ d->optarg = d->__nextchar;
+ /* If we end this ARGV-element by taking the rest as an arg,
+ we must advance to the next element now. */
+ d->optind++;
+ }
+ else if (d->optind == argc)
+ {
+ if (print_errors)
+ fprintf (stderr,
+ _("%s: option requires an argument -- '%c'\n"),
+ argv[0], c);
+
+ d->optopt = c;
+ if (optstring[0] == ':')
+ c = ':';
+ else
+ c = '?';
+ }
+ else
+ /* We already incremented 'optind' once;
+ increment it again when taking next ARGV-elt as argument. */
+ d->optarg = argv[d->optind++];
+ d->__nextchar = NULL;
+ }
}
return c;
}
@@ -1156,8 +701,8 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
int
_getopt_internal (int argc, char **argv, const char *optstring,
- const struct option *longopts, int *longind, int long_only,
- int posixly_correct)
+ const struct option *longopts, int *longind, int long_only,
+ int posixly_correct)
{
int result;
@@ -1165,8 +710,8 @@ _getopt_internal (int argc, char **argv, const char *optstring,
getopt_data.opterr = opterr;
result = _getopt_internal_r (argc, argv, optstring, longopts,
- longind, long_only, &getopt_data,
- posixly_correct);
+ longind, long_only, &getopt_data,
+ posixly_correct);
optind = getopt_data.optind;
optarg = getopt_data.optarg;
@@ -1175,32 +720,23 @@ _getopt_internal (int argc, char **argv, const char *optstring,
return result;
}
-/* glibc gets a LSB-compliant getopt.
- Standalone applications get a POSIX-compliant getopt. */
-#if _LIBC
-enum { POSIXLY_CORRECT = 0 };
-#else
-enum { POSIXLY_CORRECT = 1 };
-#endif
-
-int
-getopt (int argc, char *const *argv, const char *optstring)
-{
- return _getopt_internal (argc, (char **) argv, optstring,
- (const struct option *) 0,
- (int *) 0,
- 0, POSIXLY_CORRECT);
-}
+/* glibc gets a LSB-compliant getopt and a POSIX-complaint __posix_getopt.
+ Standalone applications just get a POSIX-compliant getopt.
+ POSIX and LSB both require these functions to take 'char *const *argv'
+ even though this is incorrect (because of the permutation). */
+#define GETOPT_ENTRY(NAME, POSIXLY_CORRECT) \
+ int \
+ NAME (int argc, char *const *argv, const char *optstring) \
+ { \
+ return _getopt_internal (argc, (char **)argv, optstring, \
+ 0, 0, 0, POSIXLY_CORRECT); \
+ }
#ifdef _LIBC
-int
-__posix_getopt (int argc, char *const *argv, const char *optstring)
-{
- return _getopt_internal (argc, argv, optstring,
- (const struct option *) 0,
- (int *) 0,
- 0, 1);
-}
+GETOPT_ENTRY(getopt, 0)
+GETOPT_ENTRY(__posix_getopt, 1)
+#else
+GETOPT_ENTRY(getopt, 1)
#endif
@@ -1221,51 +757,51 @@ main (int argc, char **argv)
c = getopt (argc, argv, "abc:d:0123456789");
if (c == -1)
- break;
+ break;
switch (c)
- {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- if (digit_optind != 0 && digit_optind != this_option_optind)
- printf ("digits occur in two different argv-elements.\n");
- digit_optind = this_option_optind;
- printf ("option %c\n", c);
- break;
-
- case 'a':
- printf ("option a\n");
- break;
-
- case 'b':
- printf ("option b\n");
- break;
-
- case 'c':
- printf ("option c with value '%s'\n", optarg);
- break;
-
- case '?':
- break;
-
- default:
- printf ("?? getopt returned character code 0%o ??\n", c);
- }
+ {
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ if (digit_optind != 0 && digit_optind != this_option_optind)
+ printf ("digits occur in two different argv-elements.\n");
+ digit_optind = this_option_optind;
+ printf ("option %c\n", c);
+ break;
+
+ case 'a':
+ printf ("option a\n");
+ break;
+
+ case 'b':
+ printf ("option b\n");
+ break;
+
+ case 'c':
+ printf ("option c with value '%s'\n", optarg);
+ break;
+
+ case '?':
+ break;
+
+ default:
+ printf ("?? getopt returned character code 0%o ??\n", c);
+ }
}
if (optind < argc)
{
printf ("non-option ARGV-elements: ");
while (optind < argc)
- printf ("%s ", argv[optind++]);
+ printf ("%s ", argv[optind++]);
printf ("\n");
}
diff --git a/lib/getopt.in.h b/lib/getopt.in.h
index 6cbad8e..5fb58dd 100644
--- a/lib/getopt.in.h
+++ b/lib/getopt.in.h
@@ -1,20 +1,22 @@
/* Declarations for getopt.
- Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2017 Free Software
- Foundation, Inc.
- This file is part of the GNU C Library.
+ Copyright (C) 1989-2018 Free Software Foundation, Inc.
+ This file is part of gnulib.
+ Unlike most of the getopt implementation, it is NOT shared
+ with the GNU C Library, which supplies a different version of
+ this file.
- 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 file 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.
+ This file 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/>. */
+ You should have received a copy of the GNU General Public
+ License along with gnulib; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _@GUARD_PREFIX@_GETOPT_H
@@ -32,230 +34,28 @@
# undef _GL_SYSTEM_GETOPT
#endif
-#ifndef _@GUARD_PREFIX@_GETOPT_H
-
-#ifndef __need_getopt
-# define _@GUARD_PREFIX@_GETOPT_H 1
-#endif
+#define _@GUARD_PREFIX@_GETOPT_H 1
/* Standalone applications should #define __GETOPT_PREFIX to an
identifier that prefixes the external functions and variables
- defined in this header. When this happens, include the
- headers that might declare getopt so that they will not cause
- confusion if included after this file (if the system had <getopt.h>,
- we have already included it). Then systematically rename
- identifiers so that they do not collide with the system functions
- and variables. Renaming avoids problems with some compilers and
- linkers. */
+ defined in getopt-core.h and getopt-ext.h. When this happens,
+ include the headers that might declare getopt so that they will not
+ cause confusion if included after this file (if the system had
+ <getopt.h>, we have already included it). */
#if defined __GETOPT_PREFIX
-# if !defined __need_getopt
-# if !@HAVE_GETOPT_H@
-# define __need_system_stdlib_h
-# include <stdlib.h>
-# undef __need_system_stdlib_h
-# include <stdio.h>
-# include <unistd.h>
-# endif
-# undef __need_getopt
-# endif
-# undef __GETOPT_CONCAT
-# undef __GETOPT_XCONCAT
-# undef __GETOPT_ID
-# undef getopt
-# undef getopt_long
-# undef getopt_long_only
-# undef optarg
-# undef opterr
-# undef optind
-# undef optopt
-# undef option
-# undef _getopt_internal
-# define __GETOPT_CONCAT(x, y) x ## y
-# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y)
-# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
-# define getopt __GETOPT_ID (getopt)
-# define getopt_long __GETOPT_ID (getopt_long)
-# define getopt_long_only __GETOPT_ID (getopt_long_only)
-# define optarg __GETOPT_ID (optarg)
-# define opterr __GETOPT_ID (opterr)
-# define optind __GETOPT_ID (optind)
-# define optopt __GETOPT_ID (optopt)
-# define option __GETOPT_ID (option)
-# define _getopt_internal __GETOPT_ID (getopt_internal)
-#endif
-
-/* Standalone applications get correct prototypes for getopt_long and
- getopt_long_only; they declare "char **argv". libc uses prototypes
- with "char *const *argv" that are incorrect because getopt_long and
- getopt_long_only can permute argv; this is required for backward
- compatibility (e.g., for LSB 2.0.1).
-
- This used to be '#if defined __GETOPT_PREFIX && !defined __need_getopt',
- but it caused redefinition warnings if both unistd.h and getopt.h were
- included, since unistd.h includes getopt.h having previously defined
- __need_getopt.
-
- The only place where __getopt_argv_const is used is in definitions
- of getopt_long and getopt_long_only below, but these are visible
- only if __need_getopt is not defined, so it is quite safe to rewrite
- the conditional as follows:
-*/
-#if !defined __need_getopt
-# if defined __GETOPT_PREFIX
-# define __getopt_argv_const /* empty */
-# else
-# define __getopt_argv_const const
-# endif
-#endif
-
-/* If __GNU_LIBRARY__ is not already defined, either we are being used
- standalone, or this is the first header included in the source file.
- If we are being used with glibc, we need to include <features.h>, but
- that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
- not defined, include <ctype.h>, which will pull in <features.h> for us
- if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
- doesn't flood the namespace with stuff the way some other headers do.) */
-#if !defined __GNU_LIBRARY__
-# include <ctype.h>
-#endif
-
-#ifndef __THROW
-# ifndef __GNUC_PREREQ
-# define __GNUC_PREREQ(maj, min) (0)
-# endif
-# if defined __cplusplus && __GNUC_PREREQ (2,8)
-# define __THROW throw ()
-# else
-# define __THROW
+# if !@HAVE_GETOPT_H@
+# define __need_system_stdlib_h
+# include <stdlib.h>
+# undef __need_system_stdlib_h
+# include <stdio.h>
+# include <unistd.h>
# endif
#endif
/* The definition of _GL_ARG_NONNULL is copied here. */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* For communication from 'getopt' to the caller.
- When 'getopt' finds an option that takes an argument,
- the argument value is returned here.
- Also, when 'ordering' is RETURN_IN_ORDER,
- each non-option ARGV-element is returned here. */
-
-extern char *optarg;
-
-/* Index in ARGV of the next element to be scanned.
- This is used for communication to and from the caller
- and for communication between successive calls to 'getopt'.
-
- On entry to 'getopt', zero means this is the first call; initialize.
-
- When 'getopt' returns -1, this is the index of the first of the
- non-option elements that the caller should itself scan.
-
- Otherwise, 'optind' communicates from one call to the next
- how much of ARGV has been scanned so far. */
-
-extern int optind;
-
-/* Callers store zero here to inhibit the error message 'getopt' prints
- for unrecognized options. */
-
-extern int opterr;
-
-/* Set to an option character which was unrecognized. */
+#include <getopt-cdefs.h>
+#include <getopt-pfx-core.h>
+#include <getopt-pfx-ext.h>
-extern int optopt;
-
-#ifndef __need_getopt
-/* Describe the long-named options requested by the application.
- The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
- of 'struct option' terminated by an element containing a name which is
- zero.
-
- The field 'has_arg' is:
- no_argument (or 0) if the option does not take an argument,
- required_argument (or 1) if the option requires an argument,
- optional_argument (or 2) if the option takes an optional argument.
-
- If the field 'flag' is not NULL, it points to a variable that is set
- to the value given in the field 'val' when the option is found, but
- left unchanged if the option is not found.
-
- To have a long-named option do something other than set an 'int' to
- a compiled-in constant, such as set a value from 'optarg', set the
- option's 'flag' field to zero and its 'val' field to a nonzero
- value (the equivalent single-letter option character, if there is
- one). For long options that have a zero 'flag' field, 'getopt'
- returns the contents of the 'val' field. */
-
-# if !GNULIB_defined_struct_option
-struct option
-{
- const char *name;
- /* has_arg can't be an enum because some compilers complain about
- type mismatches in all the code that assumes it is an int. */
- int has_arg;
- int *flag;
- int val;
-};
-# define GNULIB_defined_struct_option 1
-# endif
-
-/* Names for the values of the 'has_arg' field of 'struct option'. */
-
-# define no_argument 0
-# define required_argument 1
-# define optional_argument 2
-#endif /* need getopt */
-
-
-/* Get definitions and prototypes for functions to process the
- arguments in ARGV (ARGC of them, minus the program name) for
- options given in OPTS.
-
- Return the option character from OPTS just read. Return -1 when
- there are no more options. For unrecognized options, or options
- missing arguments, 'optopt' is set to the option letter, and '?' is
- returned.
-
- The OPTS string is a list of characters which are recognized option
- letters, optionally followed by colons, specifying that that letter
- takes an argument, to be placed in 'optarg'.
-
- If a letter in OPTS is followed by two colons, its argument is
- optional. This behavior is specific to the GNU 'getopt'.
-
- The argument '--' causes premature termination of argument
- scanning, explicitly telling 'getopt' that there are no more
- options.
-
- If OPTS begins with '-', then non-option arguments are treated as
- arguments to the option '\1'. This behavior is specific to the GNU
- 'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in
- the environment, then do not permute arguments. */
-
-extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
- __THROW _GL_ARG_NONNULL ((2, 3));
-
-#ifndef __need_getopt
-extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv,
- const char *__shortopts,
- const struct option *__longopts, int *__longind)
- __THROW _GL_ARG_NONNULL ((2, 3));
-extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
- const char *__shortopts,
- const struct option *__longopts, int *__longind)
- __THROW _GL_ARG_NONNULL ((2, 3));
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-/* Make sure we later can get all the definitions and declarations. */
-#undef __need_getopt
-
-#endif /* _@GUARD_PREFIX@_GETOPT_H */
#endif /* _@GUARD_PREFIX@_GETOPT_H */
diff --git a/lib/getopt1.c b/lib/getopt1.c
index 4d2e8cb..9c7fff4 100644
--- a/lib/getopt1.c
+++ b/lib/getopt1.c
@@ -1,56 +1,44 @@
/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2017 Free Software
- Foundation, Inc.
- This file is part of the GNU C Library.
+ Copyright (C) 1987-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library and is also part of gnulib.
+ Patches to this file should be submitted to both projects.
- 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.
+ The GNU C Library 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,
+ The GNU C Library 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.
+ 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/>. */
+ You should have received a copy of the GNU General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
-#ifdef _LIBC
-# include <getopt.h>
-#else
+#ifndef _LIBC
# include <config.h>
-# include "getopt.h"
#endif
-#include "getopt_int.h"
-
-#include <stdio.h>
-/* This needs to come after some library #include
- to get __GNU_LIBRARY__ defined. */
-#ifdef __GNU_LIBRARY__
-#include <stdlib.h>
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
+#include "getopt.h"
+#include "getopt_int.h"
int
getopt_long (int argc, char *__getopt_argv_const *argv, const char *options,
- const struct option *long_options, int *opt_index)
+ const struct option *long_options, int *opt_index)
{
return _getopt_internal (argc, (char **) argv, options, long_options,
- opt_index, 0, 0);
+ opt_index, 0, 0);
}
int
_getopt_long_r (int argc, char **argv, const char *options,
- const struct option *long_options, int *opt_index,
- struct _getopt_data *d)
+ const struct option *long_options, int *opt_index,
+ struct _getopt_data *d)
{
return _getopt_internal_r (argc, argv, options, long_options, opt_index,
- 0, d, 0);
+ 0, d, 0);
}
/* Like getopt_long, but '-' as well as '--' can indicate a long option.
@@ -60,26 +48,27 @@ _getopt_long_r (int argc, char **argv, const char *options,
int
getopt_long_only (int argc, char *__getopt_argv_const *argv,
- const char *options,
- const struct option *long_options, int *opt_index)
+ const char *options,
+ const struct option *long_options, int *opt_index)
{
return _getopt_internal (argc, (char **) argv, options, long_options,
- opt_index, 1, 0);
+ opt_index, 1, 0);
}
int
_getopt_long_only_r (int argc, char **argv, const char *options,
- const struct option *long_options, int *opt_index,
- struct _getopt_data *d)
+ const struct option *long_options, int *opt_index,
+ struct _getopt_data *d)
{
return _getopt_internal_r (argc, argv, options, long_options, opt_index,
- 1, d, 0);
+ 1, d, 0);
}
#ifdef TEST
#include <stdio.h>
+#include <stdlib.h>
int
main (int argc, char **argv)
@@ -93,74 +82,74 @@ main (int argc, char **argv)
int option_index = 0;
static const struct option long_options[] =
{
- {"add", 1, 0, 0},
- {"append", 0, 0, 0},
- {"delete", 1, 0, 0},
- {"verbose", 0, 0, 0},
- {"create", 0, 0, 0},
- {"file", 1, 0, 0},
- {0, 0, 0, 0}
+ {"add", 1, 0, 0},
+ {"append", 0, 0, 0},
+ {"delete", 1, 0, 0},
+ {"verbose", 0, 0, 0},
+ {"create", 0, 0, 0},
+ {"file", 1, 0, 0},
+ {0, 0, 0, 0}
};
c = getopt_long (argc, argv, "abc:d:0123456789",
- long_options, &option_index);
+ long_options, &option_index);
if (c == -1)
- break;
+ break;
switch (c)
- {
- case 0:
- printf ("option %s", long_options[option_index].name);
- if (optarg)
- printf (" with arg %s", optarg);
- printf ("\n");
- break;
-
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- if (digit_optind != 0 && digit_optind != this_option_optind)
- printf ("digits occur in two different argv-elements.\n");
- digit_optind = this_option_optind;
- printf ("option %c\n", c);
- break;
-
- case 'a':
- printf ("option a\n");
- break;
-
- case 'b':
- printf ("option b\n");
- break;
-
- case 'c':
- printf ("option c with value '%s'\n", optarg);
- break;
-
- case 'd':
- printf ("option d with value '%s'\n", optarg);
- break;
-
- case '?':
- break;
-
- default:
- printf ("?? getopt returned character code 0%o ??\n", c);
- }
+ {
+ case 0:
+ printf ("option %s", long_options[option_index].name);
+ if (optarg)
+ printf (" with arg %s", optarg);
+ printf ("\n");
+ break;
+
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ if (digit_optind != 0 && digit_optind != this_option_optind)
+ printf ("digits occur in two different argv-elements.\n");
+ digit_optind = this_option_optind;
+ printf ("option %c\n", c);
+ break;
+
+ case 'a':
+ printf ("option a\n");
+ break;
+
+ case 'b':
+ printf ("option b\n");
+ break;
+
+ case 'c':
+ printf ("option c with value '%s'\n", optarg);
+ break;
+
+ case 'd':
+ printf ("option d with value '%s'\n", optarg);
+ break;
+
+ case '?':
+ break;
+
+ default:
+ printf ("?? getopt returned character code 0%o ??\n", c);
+ }
}
if (optind < argc)
{
printf ("non-option ARGV-elements: ");
while (optind < argc)
- printf ("%s ", argv[optind++]);
+ printf ("%s ", argv[optind++]);
printf ("\n");
}
diff --git a/lib/getopt_int.h b/lib/getopt_int.h
index a7ce0e9..b0e9a6d 100644
--- a/lib/getopt_int.h
+++ b/lib/getopt_int.h
@@ -1,30 +1,31 @@
/* Internal declarations for getopt.
- Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2017 Free Software
- Foundation, Inc.
- This file is part of the GNU C Library.
+ Copyright (C) 1989-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library and is also part of gnulib.
+ Patches to this file should be submitted to both projects.
- 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.
+ The GNU C Library 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,
+ The GNU C Library 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.
+ 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/>. */
+ You should have received a copy of the GNU General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
#ifndef _GETOPT_INT_H
-#define _GETOPT_INT_H 1
+#define _GETOPT_INT_H 1
#include <getopt.h>
extern int _getopt_internal (int ___argc, char **___argv,
- const char *__shortopts,
- const struct option *__longopts, int *__longind,
- int __long_only, int __posixly_correct);
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind,
+ int __long_only, int __posixly_correct);
/* Reentrant versions which can handle parsing multiple argument
@@ -32,28 +33,20 @@ extern int _getopt_internal (int ___argc, char **___argv,
/* Describe how to deal with options that follow non-option ARGV-elements.
- If the caller did not specify anything,
- the default is REQUIRE_ORDER if the environment variable
- POSIXLY_CORRECT is defined, PERMUTE otherwise.
+ REQUIRE_ORDER means don't recognize them as options; stop option
+ processing when the first non-option is seen. This is what POSIX
+ specifies should happen.
- REQUIRE_ORDER means don't recognize them as options;
- stop option processing when the first non-option is seen.
- This is what Unix does.
- This mode of operation is selected by either setting the environment
- variable POSIXLY_CORRECT, or using '+' as the first character
- of the list of option characters, or by calling getopt.
-
- PERMUTE is the default. We permute the contents of ARGV as we
- scan, so that eventually all the non-options are at the end.
- This allows options to be given in any order, even with programs
- that were not written to expect this.
+ PERMUTE means permute the contents of ARGV as we scan, so that
+ eventually all the non-options are at the end. This allows options
+ to be given in any order, even with programs that were not written
+ to expect this.
RETURN_IN_ORDER is an option available to programs that were
written to expect options and other ARGV-elements in any order
and that care about the ordering of the two. We describe each
non-option ARGV-element as if it were the argument of an option
- with character code 1. Using '-' as the first character of the
- list of option characters selects this mode of operation.
+ with character code 1.
The special argument '--' forces an end of option-scanning regardless
of the value of 'ordering'. In the case of RETURN_IN_ORDER, only
@@ -91,11 +84,6 @@ struct _getopt_data
/* See __ord above. */
enum __ord __ordering;
- /* If the POSIXLY_CORRECT environment variable is set
- or getopt was called. */
- int __posixly_correct;
-
-
/* Handle permutation of arguments. */
/* Describe the part of ARGV that contains non-options that have
@@ -104,32 +92,27 @@ struct _getopt_data
int __first_nonopt;
int __last_nonopt;
-
-#if defined _LIBC && defined USE_NONOPTION_FLAGS
- int __nonoption_flags_max_len;
- int __nonoption_flags_len;
-#endif
};
/* The initializer is necessary to set OPTIND and OPTERR to their
default values and to clear the initialization flag. */
-#define _GETOPT_DATA_INITIALIZER { 1, 1 }
+#define _GETOPT_DATA_INITIALIZER { 1, 1 }
extern int _getopt_internal_r (int ___argc, char **___argv,
- const char *__shortopts,
- const struct option *__longopts, int *__longind,
- int __long_only, struct _getopt_data *__data,
- int __posixly_correct);
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind,
+ int __long_only, struct _getopt_data *__data,
+ int __posixly_correct);
extern int _getopt_long_r (int ___argc, char **___argv,
- const char *__shortopts,
- const struct option *__longopts, int *__longind,
- struct _getopt_data *__data);
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind,
+ struct _getopt_data *__data);
extern int _getopt_long_only_r (int ___argc, char **___argv,
- const char *__shortopts,
- const struct option *__longopts,
- int *__longind,
- struct _getopt_data *__data);
+ const char *__shortopts,
+ const struct option *__longopts,
+ int *__longind,
+ struct _getopt_data *__data);
#endif /* getopt_int.h */
diff --git a/lib/getprogname.c b/lib/getprogname.c
index 5295484..c824b47 100644
--- a/lib/getprogname.c
+++ b/lib/getprogname.c
@@ -1,5 +1,5 @@
/* Program name management.
- Copyright (C) 2016-2017 Free Software Foundation, Inc.
+ Copyright (C) 2016-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@@ -64,7 +64,7 @@ getprogname (void)
/* https://www.gnu.org/software/libc/manual/html_node/Error-Messages.html */
return last_component (program_invocation_name);
# elif HAVE_GETEXECNAME /* Solaris */
- /* http://docs.oracle.com/cd/E19253-01/816-5168/6mbb3hrb1/index.html */
+ /* https://docs.oracle.com/cd/E19253-01/816-5168/6mbb3hrb1/index.html */
const char *p = getexecname ();
if (!p)
p = "?";
@@ -74,7 +74,7 @@ getprogname (void)
const char *p = __argv && __argv[0] ? __argv[0] : "?";
return last_component (p);
# elif HAVE_VAR___PROGNAME /* OpenBSD, QNX */
- /* http://man.openbsd.org/style.9 */
+ /* https://man.openbsd.org/style.9 */
/* http://www.qnx.de/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.neutrino_lib_ref%2Fp%2F__progname.html */
/* Be careful to declare this only when we absolutely need it
(OpenBSD 5.1), rather than when it's available. Otherwise,
@@ -85,9 +85,8 @@ getprogname (void)
return p && p[0] ? p : "?";
# elif _AIX /* AIX */
/* Idea by Bastien ROUCARIÈS,
- http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00095.html
- Reference: http://
- ibm.biz/knowctr#ssw_aix_53/com.ibm.aix.basetechref/doc/basetrf1/getprocs.htm
+ https://lists.gnu.org/r/bug-gnulib/2010-12/msg00095.html
+ Reference: https://www.ibm.com/support/knowledgecenter/en/ssw_aix_61/com.ibm.aix.basetrf1/getprocs.htm
*/
static char *p;
static int first = 1;
@@ -165,7 +164,7 @@ getprogname (void)
if (ioctl_ok)
{
char *name = buf.pr_fname;
- char *namesize = sizeof buf.pr_fname;
+ size_t namesize = sizeof buf.pr_fname;
char *namenul = memchr (name, '\0', namesize);
size_t namelen = namenul ? namenul - name : namesize;
char *namecopy = malloc (namelen + 1);
@@ -183,3 +182,10 @@ getprogname (void)
}
#endif
+
+/*
+ * Hey Emacs!
+ * Local Variables:
+ * coding: utf-8
+ * End:
+ */
diff --git a/lib/getprogname.h b/lib/getprogname.h
index 9ab924c..ee6688f 100644
--- a/lib/getprogname.h
+++ b/lib/getprogname.h
@@ -1,5 +1,5 @@
/* Program name management.
- Copyright (C) 2016-2017 Free Software Foundation, Inc.
+ Copyright (C) 2016-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef _GL_GETPROGNAME_H
#define _GL_GETPROGNAME_H
diff --git a/lib/gettext.h b/lib/gettext.h
index 0465d7a..f2d7458 100644
--- a/lib/gettext.h
+++ b/lib/gettext.h
@@ -1,5 +1,5 @@
/* Convenience header for conditional use of GNU <libintl.h>.
- Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2017 Free Software
+ Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2018 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -13,13 +13,14 @@
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/>. */
+ with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _LIBGETTEXT_H
#define _LIBGETTEXT_H 1
-/* NLS can be disabled through the configure --disable-nls option. */
-#if ENABLE_NLS
+/* NLS can be disabled through the configure --disable-nls option
+ or through "#define ENABLE NLS 0" before including this file. */
+#if defined ENABLE_NLS && ENABLE_NLS
/* Get declarations of GNU message catalog functions. */
# include <libintl.h>
@@ -184,7 +185,8 @@ npgettext_aux (const char *domain,
#include <string.h>
#if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \
- /* || __STDC_VERSION__ >= 199901L */ )
+ /* || __STDC_VERSION__ == 199901L
+ || (__STDC_VERSION__ >= 201112L && !defined __STDC_NO_VLA__) */ )
# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1
#else
# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0
diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c
index 18dcbda..3957565 100644
--- a/lib/gettimeofday.c
+++ b/lib/gettimeofday.c
@@ -1,6 +1,6 @@
/* Provide gettimeofday for systems that don't have it or for which it's broken.
- Copyright (C) 2001-2003, 2005-2007, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2007, 2009-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* written by Jim Meyering */
@@ -24,93 +24,95 @@
#include <time.h>
-#if HAVE_SYS_TIMEB_H
-# include <sys/timeb.h>
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# define WINDOWS_NATIVE
+# include <windows.h>
#endif
-#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME
+#include "localtime-buffer.h"
-/* Work around the bug in some systems whereby gettimeofday clobbers
- the static buffer that localtime uses for its return value. The
- gettimeofday function from Mac OS X 10.0.4 (i.e., Darwin 1.3.7) has
- this problem. The tzset replacement is necessary for at least
- Solaris 2.5, 2.5.1, and 2.6. */
-
-static struct tm tm_zero_buffer;
-static struct tm *localtime_buffer_addr = &tm_zero_buffer;
-
-# undef localtime
-extern struct tm *localtime (time_t const *);
-
-# undef gmtime
-extern struct tm *gmtime (time_t const *);
-
-/* This is a wrapper for localtime. It is used only on systems for which
- gettimeofday clobbers the static buffer used for localtime's result.
+#ifdef WINDOWS_NATIVE
- On the first call, record the address of the static buffer that
- localtime uses for its result. */
-
-struct tm *
-rpl_localtime (time_t const *timep)
-{
- struct tm *tm = localtime (timep);
-
- if (localtime_buffer_addr == &tm_zero_buffer)
- localtime_buffer_addr = tm;
-
- return tm;
-}
+/* GetSystemTimePreciseAsFileTime was introduced only in Windows 8. */
+typedef void (WINAPI * GetSystemTimePreciseAsFileTimeFuncType) (FILETIME *lpTime);
+static GetSystemTimePreciseAsFileTimeFuncType GetSystemTimePreciseAsFileTimeFunc = NULL;
+static BOOL initialized = FALSE;
-/* Same as above, since gmtime and localtime use the same buffer. */
-struct tm *
-rpl_gmtime (time_t const *timep)
+static void
+initialize (void)
{
- struct tm *tm = gmtime (timep);
-
- if (localtime_buffer_addr == &tm_zero_buffer)
- localtime_buffer_addr = tm;
-
- return tm;
+ HMODULE kernel32 = LoadLibrary ("kernel32.dll");
+ if (kernel32 != NULL)
+ {
+ GetSystemTimePreciseAsFileTimeFunc =
+ (GetSystemTimePreciseAsFileTimeFuncType) GetProcAddress (kernel32, "GetSystemTimePreciseAsFileTime");
+ }
+ initialized = TRUE;
}
-#endif /* GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME */
-
-#if TZSET_CLOBBERS_LOCALTIME
-
-# undef tzset
-extern void tzset (void);
-
-/* This is a wrapper for tzset, for systems on which tzset may clobber
- the static buffer used for localtime's result. */
-void
-rpl_tzset (void)
-{
- /* Save and restore the contents of the buffer used for localtime's
- result around the call to tzset. */
- struct tm save = *localtime_buffer_addr;
- tzset ();
- *localtime_buffer_addr = save;
-}
#endif
/* This is a wrapper for gettimeofday. It is used only on systems
that lack this function, or whose implementation of this function
- causes problems. */
+ causes problems.
+ Work around the bug in some systems whereby gettimeofday clobbers
+ the static buffer that localtime uses for its return value. The
+ gettimeofday function from Mac OS X 10.0.4 (i.e., Darwin 1.3.7) has
+ this problem. */
int
gettimeofday (struct timeval *restrict tv, void *restrict tz)
{
#undef gettimeofday
-#if HAVE_GETTIMEOFDAY
-# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
+#ifdef WINDOWS_NATIVE
+
+ /* On native Windows, there are two ways to get the current time:
+ GetSystemTimeAsFileTime
+ <https://msdn.microsoft.com/en-us/library/ms724397.aspx>
+ or
+ GetSystemTimePreciseAsFileTime
+ <https://msdn.microsoft.com/en-us/library/hh706895.aspx>.
+ GetSystemTimeAsFileTime produces values that jump by increments of
+ 15.627 milliseconds (!) on average.
+ Whereas GetSystemTimePreciseAsFileTime values usually jump by 1 or 2
+ microseconds.
+ More discussion on this topic:
+ <http://www.windowstimestamp.com/description>. */
+ FILETIME current_time;
+
+ if (!initialized)
+ initialize ();
+ if (GetSystemTimePreciseAsFileTimeFunc != NULL)
+ GetSystemTimePreciseAsFileTimeFunc (&current_time);
+ else
+ GetSystemTimeAsFileTime (&current_time);
+
+ /* Convert from FILETIME to 'struct timeval'. */
+ /* FILETIME: <https://msdn.microsoft.com/en-us/library/ms724284.aspx> */
+ ULONGLONG since_1601 =
+ ((ULONGLONG) current_time.dwHighDateTime << 32)
+ | (ULONGLONG) current_time.dwLowDateTime;
+ /* Between 1601-01-01 and 1970-01-01 there were 280 normal years and 89 leap
+ years, in total 134774 days. */
+ ULONGLONG since_1970 =
+ since_1601 - (ULONGLONG) 134774 * (ULONGLONG) 86400 * (ULONGLONG) 10000000;
+ ULONGLONG microseconds_since_1970 = since_1970 / (ULONGLONG) 10;
+ tv->tv_sec = microseconds_since_1970 / (ULONGLONG) 1000000;
+ tv->tv_usec = microseconds_since_1970 % (ULONGLONG) 1000000;
+
+ return 0;
+
+#else
+
+# if HAVE_GETTIMEOFDAY
+# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
/* Save and restore the contents of the buffer used for localtime's
result around the call to gettimeofday. */
struct tm save = *localtime_buffer_addr;
-# endif
+# endif
-# if defined timeval /* 'struct timeval' overridden by gnulib? */
-# undef timeval
+# if defined timeval /* 'struct timeval' overridden by gnulib? */
+# undef timeval
struct timeval otv;
int result = gettimeofday (&otv, (struct timezone *) tz);
if (result == 0)
@@ -118,25 +120,16 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz)
tv->tv_sec = otv.tv_sec;
tv->tv_usec = otv.tv_usec;
}
-# else
+# else
int result = gettimeofday (tv, (struct timezone *) tz);
-# endif
+# endif
-# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
+# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
*localtime_buffer_addr = save;
-# endif
+# endif
return result;
-#else
-
-# if HAVE__FTIME
-
- struct _timeb timebuf;
- _ftime (&timebuf);
- tv->tv_sec = timebuf.time;
- tv->tv_usec = timebuf.millitm * 1000;
-
# else
# if !defined OK_TO_USE_1S_CLOCK
@@ -146,9 +139,8 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz)
tv->tv_sec = time (NULL);
tv->tv_usec = 0;
-# endif
-
return 0;
+# endif
#endif
}
diff --git a/lib/glthread/lock.c b/lib/glthread/lock.c
index ca44c23..f166d7c 100644
--- a/lib/glthread/lock.c
+++ b/lib/glthread/lock.c
@@ -1,5 +1,5 @@
/* Locking in multithreaded situations.
- Copyright (C) 2005-2017 Free Software Foundation, Inc.
+ Copyright (C) 2005-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2005.
Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h,
@@ -30,7 +30,7 @@
/* ------------------------- gl_rwlock_t datatype ------------------------- */
-# if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (__GNU_LIBRARY__ > 1))
+# if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (defined PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP && (__GNU_LIBRARY__ > 1)))
# ifdef PTHREAD_RWLOCK_INITIALIZER
diff --git a/lib/glthread/lock.h b/lib/glthread/lock.h
index ea7a5b5..fcc3f3a 100644
--- a/lib/glthread/lock.h
+++ b/lib/glthread/lock.h
@@ -1,5 +1,5 @@
/* Locking in multithreaded situations.
- Copyright (C) 2005-2017 Free Software Foundation, Inc.
+ Copyright (C) 2005-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2005.
Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h,
@@ -140,15 +140,27 @@ extern int glthread_in_use (void);
# pragma weak pthread_mutexattr_settype
# pragma weak pthread_mutexattr_destroy
# pragma weak pthread_rwlockattr_init
-# pragma weak pthread_rwlockattr_setkind_np
+# if __GNU_LIBRARY__ > 1
+# pragma weak pthread_rwlockattr_setkind_np
+# endif
# pragma weak pthread_rwlockattr_destroy
# ifndef pthread_self
# pragma weak pthread_self
# endif
# if !PTHREAD_IN_USE_DETECTION_HARD
-# pragma weak pthread_cancel
-# define pthread_in_use() (pthread_cancel != NULL)
+ /* On most platforms, pthread_cancel or pthread_kill can be used to
+ determine whether libpthread is in use.
+ On newer versions of FreeBSD, however, this is no longer possible,
+ because pthread_cancel and pthread_kill got added to libc. Therefore
+ use pthread_create to test whether libpthread is in use. */
+# if defined __FreeBSD__ || defined __DragonFly__ /* FreeBSD */
+# pragma weak pthread_create
+# define pthread_in_use() (pthread_create != NULL)
+# else /* glibc, NetBSD, OpenBSD, IRIX, OSF/1, Solaris */
+# pragma weak pthread_cancel
+# define pthread_in_use() (pthread_cancel != NULL)
+# endif
# endif
# else
@@ -179,7 +191,7 @@ typedef pthread_mutex_t gl_lock_t;
/* ------------------------- gl_rwlock_t datatype ------------------------- */
-# if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (__GNU_LIBRARY__ > 1))
+# if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (defined PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP && (__GNU_LIBRARY__ > 1)))
# ifdef PTHREAD_RWLOCK_INITIALIZER
diff --git a/lib/glthread/threadlib.c b/lib/glthread/threadlib.c
index bf2e19c..e8b484a 100644
--- a/lib/glthread/threadlib.c
+++ b/lib/glthread/threadlib.c
@@ -1,5 +1,5 @@
/* Multithreading primitives.
- Copyright (C) 2005-2017 Free Software Foundation, Inc.
+ Copyright (C) 2005-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2005. */
diff --git a/lib/gnulib.mk b/lib/gnulib.mk
index 97272be..9a44ba0 100644
--- a/lib/gnulib.mk
+++ b/lib/gnulib.mk
@@ -1,6 +1,6 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2002-2017 Free Software Foundation, Inc.
+# Copyright (C) 2002-2018 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
@@ -13,7 +13,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this file. If not, see <http://www.gnu.org/licenses/>.
+# along with this file. If not, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License,
# this file may be distributed as part of a program that
@@ -25,6 +25,7 @@
MOSTLYCLEANFILES += lib/core lib/*.stackdump
+# No GNU Make output.
noinst_LIBRARIES += lib/libsed.a
@@ -347,6 +348,13 @@ EXTRA_DIST += lib/fcntl.in.h
## end gnulib module fcntl-h
+## begin gnulib module filename
+
+
+EXTRA_DIST += lib/filename.h
+
+## end gnulib module filename
+
## begin gnulib module fpending
@@ -359,9 +367,9 @@ EXTRA_lib_libsed_a_SOURCES += lib/fpending.c
## begin gnulib module fstat
-EXTRA_DIST += lib/fstat.c
+EXTRA_DIST += lib/fstat.c lib/stat-w32.c lib/stat-w32.h
-EXTRA_lib_libsed_a_SOURCES += lib/fstat.c
+EXTRA_lib_libsed_a_SOURCES += lib/fstat.c lib/stat-w32.c
## end gnulib module fstat
@@ -392,11 +400,11 @@ EXTRA_lib_libsed_a_SOURCES += lib/getdelim.c
## begin gnulib module getopt-posix
-BUILT_SOURCES += $(GETOPT_H)
+BUILT_SOURCES += $(GETOPT_H) $(GETOPT_CDEFS_H)
# We need the following in order to create <getopt.h> when the system
# doesn't have one that works with the given compiler.
-lib/getopt.h: lib/getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
+lib/getopt.h: lib/getopt.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|GL|g' \
@@ -409,9 +417,18 @@ lib/getopt.h: lib/getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
< $(top_srcdir)/lib/getopt.in.h; \
} > $@-t && \
mv -f $@-t $@
-MOSTLYCLEANFILES += lib/getopt.h lib/getopt.h-t
-EXTRA_DIST += lib/getopt.c lib/getopt.in.h lib/getopt1.c lib/getopt_int.h
+lib/getopt-cdefs.h: lib/getopt-cdefs.in.h $(top_builddir)/config.status
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \
+ < $(top_srcdir)/lib/getopt-cdefs.in.h; \
+ } > $@-t && \
+ mv -f $@-t $@
+
+MOSTLYCLEANFILES += lib/getopt.h lib/getopt.h-t lib/getopt-cdefs.h lib/getopt-cdefs.h-t
+
+EXTRA_DIST += lib/getopt-cdefs.in.h lib/getopt-core.h lib/getopt-ext.h lib/getopt-pfx-core.h lib/getopt-pfx-ext.h lib/getopt.c lib/getopt.in.h lib/getopt1.c lib/getopt_int.h
EXTRA_lib_libsed_a_SOURCES += lib/getopt.c lib/getopt1.c
@@ -461,12 +478,11 @@ EXTRA_DIST += $(top_srcdir)/build-aux/gnu-web-doc-update
## begin gnulib module gnumakefile
+EXTRA_DIST += $(top_srcdir)/GNUmakefile
distclean-local: clean-GNUmakefile
clean-GNUmakefile:
test '$(srcdir)' = . || rm -f $(top_builddir)/GNUmakefile
-EXTRA_DIST += $(top_srcdir)/GNUmakefile
-
## end gnulib module gnumakefile
## begin gnulib module gnupload
@@ -532,6 +548,7 @@ lib/langinfo.h: lib/langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(W
-e 's/@''GNULIB_NL_LANGINFO''@/$(GNULIB_NL_LANGINFO)/g' \
-e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \
-e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \
+ -e 's|@''HAVE_LANGINFO_ALTMON''@|$(HAVE_LANGINFO_ALTMON)|g' \
-e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \
-e 's|@''HAVE_LANGINFO_YESEXPR''@|$(HAVE_LANGINFO_YESEXPR)|g' \
-e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \
@@ -693,6 +710,15 @@ EXTRA_lib_libsed_a_SOURCES += lib/localeconv.c
## end gnulib module localeconv
+## begin gnulib module localtime-buffer
+
+
+EXTRA_DIST += lib/localtime-buffer.c lib/localtime-buffer.h
+
+EXTRA_lib_libsed_a_SOURCES += lib/localtime-buffer.c
+
+## end gnulib module localtime-buffer
+
## begin gnulib module lock
lib_libsed_a_SOURCES += lib/glthread/lock.h lib/glthread/lock.c
@@ -727,7 +753,7 @@ EXTRA_lib_libsed_a_SOURCES += lib/malloc.c
lib_libsed_a_SOURCES += lib/malloca.c
-EXTRA_DIST += lib/malloca.h lib/malloca.valgrind
+EXTRA_DIST += lib/malloca.h
## end gnulib module malloca
@@ -892,13 +918,6 @@ EXTRA_lib_libsed_a_SOURCES += lib/readlink.c
## end gnulib module readlink
-## begin gnulib module readme-release
-
-
-EXTRA_DIST += $(top_srcdir)/README-release
-
-## end gnulib module readme-release
-
## begin gnulib module regex
@@ -933,15 +952,6 @@ EXTRA_DIST += lib/same-inode.h
## end gnulib module same-inode
-## begin gnulib module secure_getenv
-
-
-EXTRA_DIST += lib/secure_getenv.c
-
-EXTRA_lib_libsed_a_SOURCES += lib/secure_getenv.c
-
-## end gnulib module secure_getenv
-
## begin gnulib module selinux-h
lib_libsed_a_SOURCES += lib/se-context.in.h lib/se-selinux.in.h lib/se-context.c lib/se-selinux.c
@@ -990,115 +1000,69 @@ EXTRA_lib_libsed_a_SOURCES += lib/getfilecon.c
## 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=$(top_srcdir)/lib/_Noreturn.h
-EXTRA_DIST += $(top_srcdir)/build-aux/snippet/_Noreturn.h
+EXTRA_DIST += lib/_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 += lib/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.
-lib/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 += lib/arg-nonnull.h lib/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=lib/arg-nonnull.h
+ARG_NONNULL_H=$(top_srcdir)/lib/arg-nonnull.h
-EXTRA_DIST += $(top_srcdir)/build-aux/snippet/arg-nonnull.h
+EXTRA_DIST += lib/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 += lib/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.
-lib/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 += lib/c++defs.h lib/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=lib/c++defs.h
+CXXDEFS_H=$(top_srcdir)/lib/c++defs.h
-EXTRA_DIST += $(top_srcdir)/build-aux/snippet/c++defs.h
+EXTRA_DIST += lib/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 += lib/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.
-lib/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 += lib/unused-parameter.h lib/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=lib/unused-parameter.h
+UNUSED_PARAMETER_H=$(top_srcdir)/lib/unused-parameter.h
-EXTRA_DIST += $(top_srcdir)/build-aux/snippet/unused-parameter.h
+EXTRA_DIST += lib/unused-parameter.h
## end gnulib module snippet/unused-parameter
## begin gnulib module snippet/warn-on-use
-BUILT_SOURCES += lib/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.
-lib/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 += lib/warn-on-use.h lib/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=lib/warn-on-use.h
+WARN_ON_USE_H=$(top_srcdir)/lib/warn-on-use.h
-EXTRA_DIST += $(top_srcdir)/build-aux/snippet/warn-on-use.h
+EXTRA_DIST += lib/warn-on-use.h
## end gnulib module snippet/warn-on-use
## begin gnulib module stat
-EXTRA_DIST += lib/stat.c
+EXTRA_DIST += lib/stat-w32.c lib/stat-w32.h lib/stat.c
-EXTRA_lib_libsed_a_SOURCES += lib/stat.c
+EXTRA_lib_libsed_a_SOURCES += lib/stat-w32.c lib/stat.c
## end gnulib module stat
@@ -1109,6 +1073,14 @@ EXTRA_DIST += lib/stat-macros.h
## end gnulib module stat-macros
+## begin gnulib module stat-time
+
+lib_libsed_a_SOURCES += lib/stat-time.c
+
+EXTRA_DIST += lib/stat-time.h
+
+## end gnulib module stat-time
+
## begin gnulib module stdalign
BUILT_SOURCES += $(STDALIGN_H)
@@ -1431,6 +1403,7 @@ lib/stdlib.h: lib/stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \
-e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \
-e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
+ -e 's/@''GNULIB_REALLOCARRAY''@/$(GNULIB_REALLOCARRAY)/g' \
-e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \
-e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \
-e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \
@@ -1449,6 +1422,7 @@ lib/stdlib.h: lib/stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
-e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
-e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \
+ -e 's|@''HAVE_DECL_INITSTATE''@|$(HAVE_DECL_INITSTATE)|g' \
-e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
-e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \
-e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
@@ -1461,10 +1435,12 @@ lib/stdlib.h: lib/stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \
-e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
-e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
+ -e 's|@''HAVE_REALLOCARRAY''@|$(HAVE_REALLOCARRAY)|g' \
-e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \
-e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \
-e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \
-e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \
+ -e 's|@''HAVE_DECL_SETSTATE''@|$(HAVE_DECL_SETSTATE)|g' \
-e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
-e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
-e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \
@@ -1539,6 +1515,7 @@ lib/string.h: lib/string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
+ -e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GNULIB_EXPLICIT_BZERO)/g' \
-e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \
-e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \
-e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \
@@ -1577,7 +1554,8 @@ lib/string.h: lib/string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
-e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
< $(top_srcdir)/lib/string.in.h | \
- sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
+ sed -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \
+ -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
-e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
-e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
-e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
@@ -1598,20 +1576,20 @@ lib/string.h: lib/string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \
-e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
-e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
- -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
-e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
-e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
- -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
+ -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
-e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \
-e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
- -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
- -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
- -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
-e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \
-e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \
-e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \
- -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
+ -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
+ -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
-e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
+ -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
+ -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
+ -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
-e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
@@ -1650,6 +1628,7 @@ lib/sys/stat.h: lib/sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(A
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
-e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \
+ -e 's|@''WINDOWS_STAT_TIMESPEC''@|$(WINDOWS_STAT_TIMESPEC)|g' \
-e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \
-e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \
-e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
@@ -1663,6 +1642,7 @@ lib/sys/stat.h: lib/sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(A
-e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \
-e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \
-e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \
+ -e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GNULIB_OVERRIDES_STRUCT_STAT)/g' \
-e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
-e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
-e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
@@ -1746,6 +1726,7 @@ lib/sys/types.h: lib/sys_types.in.h $(top_builddir)/config.status
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \
-e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
+ -e 's|@''WINDOWS_STAT_INODES''@|$(WINDOWS_STAT_INODES)|g' \
< $(top_srcdir)/lib/sys_types.in.h; \
} > $@-t && \
mv $@-t $@
@@ -1785,24 +1766,31 @@ lib/time.h: lib/time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
- -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \
+ -e 's/@''GNULIB_CTIME''@/$(GNULIB_CTIME)/g' \
+ -e 's/@''GNULIB_LOCALTIME''@/$(GNULIB_LOCALTIME)/g' \
-e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \
-e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \
+ -e 's/@''GNULIB_STRFTIME''@/$(GNULIB_STRFTIME)/g' \
-e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
-e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
-e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
-e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \
+ -e 's/@''GNULIB_TZSET''@/$(GNULIB_TZSET)/g' \
-e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
-e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
-e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
-e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \
-e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \
+ -e 's|@''HAVE_TZSET''@|$(HAVE_TZSET)|g' \
+ -e 's|@''REPLACE_CTIME''@|$(REPLACE_CTIME)|g' \
-e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \
-e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \
-e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
-e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
-e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
+ -e 's|@''REPLACE_STRFTIME''@|$(REPLACE_STRFTIME)|g' \
-e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
+ -e 's|@''REPLACE_TZSET''@|$(REPLACE_TZSET)|g' \
-e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
@@ -1877,6 +1865,7 @@ lib/unistd.h: lib/unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \
-e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \
-e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \
+ -e 's/@''GNULIB_TRUNCATE''@/$(GNULIB_TRUNCATE)/g' \
-e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \
-e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \
-e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \
@@ -1914,6 +1903,7 @@ lib/unistd.h: lib/unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
-e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
-e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
+ -e 's|@''HAVE_TRUNCATE''@|$(HAVE_TRUNCATE)|g' \
-e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
-e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
-e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
@@ -1933,6 +1923,7 @@ lib/unistd.h: lib/unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
-e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
-e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
+ -e 's|@''REPLACE_FACCESSAT''@|$(REPLACE_FACCESSAT)|g' \
-e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
-e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
-e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
@@ -1955,6 +1946,7 @@ lib/unistd.h: lib/unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
-e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
-e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \
+ -e 's|@''REPLACE_TRUNCATE''@|$(REPLACE_TRUNCATE)|g' \
-e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \
-e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \
-e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
@@ -2036,6 +2028,7 @@ lib/wchar.h: lib/wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NON
-e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \
-e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
-e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \
+ -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \
-e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
-e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \
-e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \
@@ -2076,6 +2069,7 @@ lib/wchar.h: lib/wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NON
-e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \
-e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \
-e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \
+ -e 's/@''GNULIB_WCSFTIME''@/$(GNULIB_WCSFTIME)/g' \
< $(top_srcdir)/lib/wchar.in.h | \
sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
-e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
@@ -2115,6 +2109,7 @@ lib/wchar.h: lib/wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NON
-e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \
-e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \
-e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \
+ -e 's|@''HAVE_WCSFTIME''@|$(HAVE_WCSFTIME)|g' \
-e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
-e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
| \
@@ -2131,6 +2126,7 @@ lib/wchar.h: lib/wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NON
-e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \
-e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
-e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \
+ -e 's|@''REPLACE_WCSFTIME''@|$(REPLACE_WCSFTIME)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
@@ -2185,6 +2181,7 @@ lib/wctype.h: lib/wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \
+ -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \
-e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
-e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \
-e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \
diff --git a/lib/hard-locale.c b/lib/hard-locale.c
index 57ed42b..49bc6ca 100644
--- a/lib/hard-locale.c
+++ b/lib/hard-locale.c
@@ -1,6 +1,6 @@
/* hard-locale.c -- Determine whether a locale is hard.
- Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2017 Free Software
+ Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2018 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -14,7 +14,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/hard-locale.h b/lib/hard-locale.h
index ba424af..22eecc5 100644
--- a/lib/hard-locale.h
+++ b/lib/hard-locale.h
@@ -1,6 +1,6 @@
/* Determine whether a locale is hard.
- Copyright (C) 1999, 2003-2004, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2003-2004, 2009-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef HARD_LOCALE_H_
# define HARD_LOCALE_H_ 1
diff --git a/lib/ignore-value.h b/lib/ignore-value.h
index 2439d95..95eac1c 100644
--- a/lib/ignore-value.h
+++ b/lib/ignore-value.h
@@ -1,6 +1,6 @@
/* ignore a function return without a compiler warning. -*- coding: utf-8 -*-
- Copyright (C) 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Jim Meyering, Eric Blake and Pádraig Brady. */
diff --git a/lib/intprops.h b/lib/intprops.h
index 85ed61f..15e470c 100644
--- a/lib/intprops.h
+++ b/lib/intprops.h
@@ -1,6 +1,6 @@
/* intprops.h -- properties of integer types
- Copyright (C) 2001-2017 Free Software Foundation, Inc.
+ Copyright (C) 2001-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Paul Eggert. */
@@ -21,13 +21,12 @@
#define _GL_INTPROPS_H
#include <limits.h>
-#include <verify.h>
/* Return a value with the common real type of E and V and the value of V. */
#define _GL_INT_CONVERT(e, v) (0 * (e) + (v))
/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
- <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00406.html>. */
+ <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00406.html>. */
#define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v))
/* The extra casts in the following macros work around compiler bugs,
@@ -80,24 +79,7 @@
/* This include file assumes that signed types are two's complement without
padding bits; the above macros have undefined behavior otherwise.
If this is a problem for you, please let us know how to fix it for your host.
- As a sanity check, test the assumption for some signed types that
- <limits.h> bounds. */
-verify (TYPE_MINIMUM (signed char) == SCHAR_MIN);
-verify (TYPE_MAXIMUM (signed char) == SCHAR_MAX);
-verify (TYPE_MINIMUM (short int) == SHRT_MIN);
-verify (TYPE_MAXIMUM (short int) == SHRT_MAX);
-verify (TYPE_MINIMUM (int) == INT_MIN);
-verify (TYPE_MAXIMUM (int) == INT_MAX);
-verify (TYPE_MINIMUM (long int) == LONG_MIN);
-verify (TYPE_MAXIMUM (long int) == LONG_MAX);
-#ifdef LLONG_MAX
-verify (TYPE_MINIMUM (long long int) == LLONG_MIN);
-verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
-#endif
-/* Similarly, sanity-check one ISO/IEC TS 18661-1:2014 macro if defined. */
-#ifdef UINT_WIDTH
-verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH);
-#endif
+ This assumption is tested by the intprops-tests module. */
/* Does the __typeof__ keyword work? This could be done by
'configure', but for now it's easier to do it by hand. */
@@ -197,7 +179,7 @@ verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH);
/* Return 1 if A * B would overflow in [MIN,MAX] arithmetic.
See above for restrictions. Avoid && and || as they tickle
bugs in Sun C 5.11 2010/08/13 and other compilers; see
- <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00401.html>. */
+ <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00401.html>. */
#define INT_MULTIPLY_RANGE_OVERFLOW(a, b, min, max) \
((b) < 0 \
? ((a) < 0 \
@@ -237,7 +219,11 @@ verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH);
: (max) >> (b) < (a))
/* True if __builtin_add_overflow (A, B, P) works when P is non-null. */
-#define _GL_HAS_BUILTIN_OVERFLOW (5 <= __GNUC__)
+#if 5 <= __GNUC__ && !defined __ICC
+# define _GL_HAS_BUILTIN_OVERFLOW 1
+#else
+# define _GL_HAS_BUILTIN_OVERFLOW 0
+#endif
/* True if __builtin_add_overflow_p (A, B, C) works. */
#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
@@ -389,10 +375,10 @@ verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH);
(_Generic \
(*(r), \
signed char: \
- _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
signed char, SCHAR_MIN, SCHAR_MAX), \
short int: \
- _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
short int, SHRT_MIN, SHRT_MAX), \
int: \
_GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
@@ -406,10 +392,10 @@ verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH);
#else
# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \
(sizeof *(r) == sizeof (signed char) \
- ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \
+ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
signed char, SCHAR_MIN, SCHAR_MAX) \
: sizeof *(r) == sizeof (short int) \
- ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \
+ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
short int, SHRT_MIN, SHRT_MAX) \
: sizeof *(r) == sizeof (int) \
? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
@@ -431,9 +417,8 @@ verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH);
/* Store the low-order bits of A <op> B into *R, where the operation
is given by OP. Use the unsigned type UT for calculation to avoid
- overflow problems. *R's type is T, with extremal values TMIN and
- TMAX. T must be a signed integer type. Return 1 if the result
- overflows. */
+ overflow problems. *R's type is T, with extrema TMIN and TMAX.
+ T must be a signed integer type. Return 1 if the result overflows. */
#define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \
(sizeof ((a) op (b)) < sizeof (t) \
? _GL_INT_OP_CALC1 ((t) (a), (t) (b), r, op, overflow, ut, t, tmin, tmax) \
@@ -442,17 +427,27 @@ verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH);
((overflow (a, b) \
|| (EXPR_SIGNED ((a) op (b)) && ((a) op (b)) < (tmin)) \
|| (tmax) < ((a) op (b))) \
- ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 1) \
- : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 0))
-
-/* Return A <op> B, where the operation is given by OP. Use the
- unsigned type UT for calculation to avoid overflow problems.
- Convert the result to type T without overflow by subtracting TMIN
- from large values before converting, and adding it afterwards.
- Compilers can optimize all the operations except OP. */
-#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t, tmin, tmax) \
- (((ut) (a) op (ut) (b)) <= (tmax) \
- ? (t) ((ut) (a) op (ut) (b)) \
- : ((t) (((ut) (a) op (ut) (b)) - (tmin)) + (tmin)))
+ ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 1) \
+ : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 0))
+
+/* Return the low-order bits of A <op> B, where the operation is given
+ by OP. Use the unsigned type UT for calculation to avoid undefined
+ behavior on signed integer overflow, and convert the result to type T.
+ UT is at least as wide as T and is no narrower than unsigned int,
+ T is two's complement, and there is no padding or trap representations.
+ Assume that converting UT to T yields the low-order bits, as is
+ done in all known two's-complement C compilers. E.g., see:
+ https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html
+
+ According to the C standard, converting UT to T yields an
+ implementation-defined result or signal for values outside T's
+ range. However, code that works around this theoretical problem
+ runs afoul of a compiler bug in Oracle Studio 12.3 x86. See:
+ https://lists.gnu.org/r/bug-gnulib/2017-04/msg00049.html
+ As the compiler bug is real, don't try to work around the
+ theoretical problem. */
+
+#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t) \
+ ((t) ((ut) (a) op (ut) (b)))
#endif /* _GL_INTPROPS_H */
diff --git a/lib/isblank.c b/lib/isblank.c
index 63ed962..df4b4aa 100644
--- a/lib/isblank.c
+++ b/lib/isblank.c
@@ -1,6 +1,6 @@
/* Test whether a character is a blank.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/langinfo.in.h b/lib/langinfo.in.h
index 7981cbf..96c237a 100644
--- a/lib/langinfo.in.h
+++ b/lib/langinfo.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <langinfo.h>.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
/*
* POSIX <langinfo.h> for platforms that lack it or have an incomplete one.
@@ -86,6 +86,18 @@ typedef int nl_item;
# define MON_10 (MON_1 + 9)
# define MON_11 (MON_1 + 10)
# define MON_12 (MON_1 + 11)
+# define ALTMON_1 10200
+# define ALTMON_2 (ALTMON_1 + 1)
+# define ALTMON_3 (ALTMON_1 + 2)
+# define ALTMON_4 (ALTMON_1 + 3)
+# define ALTMON_5 (ALTMON_1 + 4)
+# define ALTMON_6 (ALTMON_1 + 5)
+# define ALTMON_7 (ALTMON_1 + 6)
+# define ALTMON_8 (ALTMON_1 + 7)
+# define ALTMON_9 (ALTMON_1 + 8)
+# define ALTMON_10 (ALTMON_1 + 9)
+# define ALTMON_11 (ALTMON_1 + 10)
+# define ALTMON_12 (ALTMON_1 + 11)
# define ABMON_1 10035
# define ABMON_2 (ABMON_1 + 1)
# define ABMON_3 (ABMON_1 + 2)
@@ -138,6 +150,22 @@ typedef int nl_item;
# define GNULIB_defined_T_FMT_AMPM 1
# endif
+# if !@HAVE_LANGINFO_ALTMON@
+# define ALTMON_1 10200
+# define ALTMON_2 (ALTMON_1 + 1)
+# define ALTMON_3 (ALTMON_1 + 2)
+# define ALTMON_4 (ALTMON_1 + 3)
+# define ALTMON_5 (ALTMON_1 + 4)
+# define ALTMON_6 (ALTMON_1 + 5)
+# define ALTMON_7 (ALTMON_1 + 6)
+# define ALTMON_8 (ALTMON_1 + 7)
+# define ALTMON_9 (ALTMON_1 + 8)
+# define ALTMON_10 (ALTMON_1 + 9)
+# define ALTMON_11 (ALTMON_1 + 10)
+# define ALTMON_12 (ALTMON_1 + 11)
+# define GNULIB_defined_ALTMON 1
+# endif
+
# if !@HAVE_LANGINFO_ERA@
# define ERA 10047
# define ERA_D_FMT 10048
diff --git a/lib/limits.in.h b/lib/limits.in.h
index a7e307f..2c809d9 100644
--- a/lib/limits.in.h
+++ b/lib/limits.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <limits.h>.
- Copyright 2016-2017 Free Software Foundation, Inc.
+ Copyright 2016-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _@GUARD_PREFIX@_LIMITS_H
@@ -28,6 +28,17 @@
#ifndef _@GUARD_PREFIX@_LIMITS_H
#define _@GUARD_PREFIX@_LIMITS_H
+/* For HP-UX 11.31. */
+#if defined LONG_LONG_MIN && !defined LLONG_MIN
+# define LLONG_MIN LONG_LONG_MIN
+#endif
+#if defined LONG_LONG_MAX && !defined LLONG_MAX
+# define LLONG_MAX LONG_LONG_MAX
+#endif
+#if defined ULONG_LONG_MAX && !defined ULLONG_MAX
+# define ULLONG_MAX ULONG_LONG_MAX
+#endif
+
/* The number of usable bits in an unsigned or signed integer type
with minimum value MIN and maximum value MAX, as an int expression
suitable in #if. Cover all known practical hosts. This
diff --git a/lib/local.mk b/lib/local.mk
index ba0aa62..1ef14b4 100644
--- a/lib/local.mk
+++ b/lib/local.mk
@@ -1,4 +1,4 @@
-# Copyright 1997-2017 Free Software Foundation, Inc.
+# Copyright 1997-2018 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
@@ -11,7 +11,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
include lib/gnulib.mk
diff --git a/lib/localcharset.c b/lib/localcharset.c
index 9d0a1b8..d583d6b 100644
--- a/lib/localcharset.c
+++ b/lib/localcharset.c
@@ -1,6 +1,6 @@
/* Determine a canonical name for the current locale's character encoding.
- Copyright (C) 2000-2006, 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 2000-2006, 2008-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ with this program; if not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>. */
@@ -32,7 +32,7 @@
# define DARWIN7 /* Darwin 7 or newer, i.e. Mac OS X 10.3 or newer */
#endif
-#if defined _WIN32 || defined __WIN32__
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
# define WINDOWS_NATIVE
# include <locale.h>
#endif
@@ -75,6 +75,7 @@
# include "relocatable.h"
#else
# define relocate(pathname) (pathname)
+# define relocate2(pathname,allocatedp) (*(allocatedp) = NULL, (pathname))
#endif
/* Get LIBDIR. */
@@ -129,6 +130,7 @@ get_charset_aliases (void)
if (cp == NULL)
{
#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__ || defined OS2)
+ char *malloc_dir = NULL;
const char *dir;
const char *base = "charset.alias";
char *file_name;
@@ -137,7 +139,7 @@ get_charset_aliases (void)
necessary for running the testsuite before "make install". */
dir = getenv ("CHARSETALIASDIR");
if (dir == NULL || dir[0] == '\0')
- dir = relocate (LIBDIR);
+ dir = relocate2 (LIBDIR, &malloc_dir);
/* Concatenate dir and base into freshly allocated file_name. */
{
@@ -154,6 +156,8 @@ get_charset_aliases (void)
}
}
+ free (malloc_dir);
+
if (file_name == NULL)
/* Out of memory. Treat the file as empty. */
cp = "";
@@ -351,7 +355,7 @@ get_charset_aliases (void)
by Alex Taylor:
<http://altsan.org/os2/toolkits/uls/index.html#codepages>.
See also "IBM Globalization - Code page identifiers":
- <http://www-01.ibm.com/software/globalization/cp/cp_cpgid.html>. */
+ <https://www-01.ibm.com/software/globalization/cp/cp_cpgid.html>. */
cp = "CP813" "\0" "ISO-8859-7" "\0"
"CP878" "\0" "KOI8-R" "\0"
"CP819" "\0" "ISO-8859-1" "\0"
diff --git a/lib/localcharset.h b/lib/localcharset.h
index a2e2a7b..3ce8b94 100644
--- a/lib/localcharset.h
+++ b/lib/localcharset.h
@@ -1,5 +1,5 @@
/* Determine a canonical name for the current locale's character encoding.
- Copyright (C) 2000-2003, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003, 2009-2018 Free Software Foundation, Inc.
This file is part of the GNU CHARSET Library.
This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,7 @@
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/>. */
+ with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _LOCALCHARSET_H
#define _LOCALCHARSET_H
diff --git a/lib/locale.in.h b/lib/locale.in.h
index 9eb43f9..1b27f1f 100644
--- a/lib/locale.in.h
+++ b/lib/locale.in.h
@@ -1,5 +1,5 @@
/* A POSIX <locale.h>.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
diff --git a/lib/localeconv.c b/lib/localeconv.c
index bc1960b..87cface 100644
--- a/lib/localeconv.c
+++ b/lib/localeconv.c
@@ -1,5 +1,5 @@
/* Query locale dependent information for formatting numbers.
- Copyright (C) 2012-2017 Free Software Foundation, Inc.
+ Copyright (C) 2012-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/localeinfo.c b/lib/localeinfo.c
index ece679e..4fdeeb4 100644
--- a/lib/localeinfo.c
+++ b/lib/localeinfo.c
@@ -1,6 +1,6 @@
/* locale information
- Copyright 2016-2017 Free Software Foundation, Inc.
+ Copyright 2016-2018 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/lib/localeinfo.h b/lib/localeinfo.h
index a6773f5..fcd5311 100644
--- a/lib/localeinfo.h
+++ b/lib/localeinfo.h
@@ -1,6 +1,6 @@
/* locale information
- Copyright 2016-2017 Free Software Foundation, Inc.
+ Copyright 2016-2018 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/lib/localtime-buffer.c b/lib/localtime-buffer.c
new file mode 100644
index 0000000..df11f43
--- /dev/null
+++ b/lib/localtime-buffer.c
@@ -0,0 +1,58 @@
+/* Provide access to the last buffer returned by localtime() or gmtime().
+
+ Copyright (C) 2001-2003, 2005-2007, 2009-2018 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, 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 <https://www.gnu.org/licenses/>. */
+
+/* written by Jim Meyering */
+
+#include <config.h>
+
+/* Specification. */
+#include "localtime-buffer.h"
+
+#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME
+
+static struct tm tm_zero_buffer;
+struct tm *localtime_buffer_addr = &tm_zero_buffer;
+
+/* This is a wrapper for localtime.
+
+ On the first call, record the address of the static buffer that
+ localtime uses for its result. */
+
+struct tm *
+rpl_localtime (time_t const *timep)
+{
+ struct tm *tm = localtime (timep);
+
+ if (localtime_buffer_addr == &tm_zero_buffer)
+ localtime_buffer_addr = tm;
+
+ return tm;
+}
+
+/* Same as above, since gmtime and localtime use the same buffer. */
+struct tm *
+rpl_gmtime (time_t const *timep)
+{
+ struct tm *tm = gmtime (timep);
+
+ if (localtime_buffer_addr == &tm_zero_buffer)
+ localtime_buffer_addr = tm;
+
+ return tm;
+}
+
+#endif
diff --git a/lib/localtime-buffer.h b/lib/localtime-buffer.h
new file mode 100644
index 0000000..f381ff0
--- /dev/null
+++ b/lib/localtime-buffer.h
@@ -0,0 +1,27 @@
+/* Provide access to the last buffer returned by localtime() or gmtime().
+
+ Copyright (C) 2001-2003, 2005-2007, 2009-2018 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, 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 <https://www.gnu.org/licenses/>. */
+
+/* written by Jim Meyering */
+
+#include <time.h>
+
+#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME
+
+/* The address of the last buffer returned by localtime() or gmtime(). */
+extern struct tm *localtime_buffer_addr;
+
+#endif
diff --git a/lib/lstat.c b/lib/lstat.c
index f4dc43e..5873bbd 100644
--- a/lib/lstat.c
+++ b/lib/lstat.c
@@ -1,6 +1,6 @@
/* Work around a bug of lstat on some systems
- Copyright (C) 1997-2006, 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 1997-2006, 2008-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* written by Jim Meyering */
@@ -47,6 +47,8 @@ orig_lstat (const char *filename, struct stat *buf)
above. */
# include "sys/stat.h"
+# include "stat-time.h"
+
# include <string.h>
# include <errno.h>
@@ -66,32 +68,33 @@ orig_lstat (const char *filename, struct stat *buf)
int
rpl_lstat (const char *file, struct stat *sbuf)
{
- size_t len;
- int lstat_result = orig_lstat (file, sbuf);
-
- if (lstat_result != 0)
- return lstat_result;
+ int result = orig_lstat (file, sbuf);
/* This replacement file can blindly check against '/' rather than
using the ISSLASH macro, because all platforms with '\\' either
lack symlinks (mingw) or have working lstat (cygwin) and thus do
not compile this file. 0 len should have already been filtered
out above, with a failure return of ENOENT. */
- len = strlen (file);
- if (file[len - 1] != '/' || S_ISDIR (sbuf->st_mode))
- return 0;
-
- /* At this point, a trailing slash is only permitted on
- symlink-to-dir; but it should have found information on the
- directory, not the symlink. Call stat() to get info about the
- link's referent. Our replacement stat guarantees valid results,
- even if the symlink is not pointing to a directory. */
- if (!S_ISLNK (sbuf->st_mode))
+ if (result == 0)
{
- errno = ENOTDIR;
- return -1;
+ if (S_ISDIR (sbuf->st_mode) || file[strlen (file) - 1] != '/')
+ result = stat_time_normalize (result, sbuf);
+ else
+ {
+ /* At this point, a trailing slash is permitted only on
+ symlink-to-dir; but it should have found information on the
+ directory, not the symlink. Call 'stat' to get info about the
+ link's referent. Our replacement stat guarantees valid results,
+ even if the symlink is not pointing to a directory. */
+ if (!S_ISLNK (sbuf->st_mode))
+ {
+ errno = ENOTDIR;
+ return -1;
+ }
+ result = stat (file, sbuf);
+ }
}
- return stat (file, sbuf);
+ return result;
}
#endif /* HAVE_LSTAT */
diff --git a/lib/malloc.c b/lib/malloc.c
index eeaf12b..471c3ab 100644
--- a/lib/malloc.c
+++ b/lib/malloc.c
@@ -1,6 +1,6 @@
/* malloc() function that is glibc compatible.
- Copyright (C) 1997-1998, 2006-2007, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 1997-1998, 2006-2007, 2009-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* written by Jim Meyering and Bruno Haible */
diff --git a/lib/malloca.c b/lib/malloca.c
index 0bf4adc..c54e1e0 100644
--- a/lib/malloca.c
+++ b/lib/malloca.c
@@ -1,6 +1,6 @@
/* Safe automatic memory allocation.
- Copyright (C) 2003, 2006-2007, 2009-2017 Free Software Foundation, Inc.
- Written by Bruno Haible <bruno@clisp.org>, 2003.
+ Copyright (C) 2003, 2006-2007, 2009-2018 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2003, 2018.
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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#define _GL_USE_STDLIB_ALLOC 1
#include <config.h>
@@ -21,82 +21,49 @@
/* Specification. */
#include "malloca.h"
-#include <stdint.h>
-
#include "verify.h"
/* The speed critical point in this file is freea() applied to an alloca()
result: it must be fast, to match the speed of alloca(). The speed of
mmalloca() and freea() in the other case are not critical, because they
- are only invoked for big memory sizes. */
-
-#if HAVE_ALLOCA
-
-/* Store the mmalloca() results in a hash table. This is needed to reliably
- distinguish a mmalloca() result and an alloca() result.
-
- Although it is possible that the same pointer is returned by alloca() and
- by mmalloca() at different times in the same application, it does not lead
- to a bug in freea(), because:
- - Before a pointer returned by alloca() can point into malloc()ed memory,
- the function must return, and once this has happened the programmer must
- not call freea() on it anyway.
- - Before a pointer returned by mmalloca() can point into the stack, it
- must be freed. The only function that can free it is freea(), and
- when freea() frees it, it also removes it from the hash table. */
-
-#define MAGIC_NUMBER 0x1415fb4a
-#define MAGIC_SIZE sizeof (int)
-/* This is how the header info would look like without any alignment
- considerations. */
-struct preliminary_header { void *next; int magic; };
-/* But the header's size must be a multiple of sa_alignment_max. */
-#define HEADER_SIZE \
- (((sizeof (struct preliminary_header) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max)
-union header {
- void *next;
- struct {
- char room[HEADER_SIZE - MAGIC_SIZE];
- int word;
- } magic;
-};
-verify (HEADER_SIZE == sizeof (union header));
-/* We make the hash table quite big, so that during lookups the probability
- of empty hash buckets is quite high. There is no need to make the hash
- table resizable, because when the hash table gets filled so much that the
- lookup becomes slow, it means that the application has memory leaks. */
-#define HASH_TABLE_SIZE 257
-static void * mmalloca_results[HASH_TABLE_SIZE];
-
-#endif
+ are only invoked for big memory sizes.
+ Here we use a bit in the address as an indicator, an idea by Ondřej Bílka.
+ malloca() can return three types of pointers:
+ - Pointers ≡ 0 mod 2*sa_alignment_max come from stack allocation.
+ - Pointers ≡ sa_alignment_max mod 2*sa_alignment_max come from heap
+ allocation.
+ - NULL comes from a failed heap allocation. */
+
+/* Type for holding very small pointer differences. */
+typedef unsigned char small_t;
+/* Verify that it is wide enough. */
+verify (2 * sa_alignment_max - 1 <= (small_t) -1);
void *
mmalloca (size_t n)
{
#if HAVE_ALLOCA
- /* Allocate one more word, that serves as an indicator for malloc()ed
- memory, so that freea() of an alloca() result is fast. */
- size_t nplus = n + HEADER_SIZE;
+ /* Allocate one more word, used to determine the address to pass to freea(),
+ and room for the alignment ≡ sa_alignment_max mod 2*sa_alignment_max. */
+ size_t nplus = n + sizeof (small_t) + 2 * sa_alignment_max - 1;
if (nplus >= n)
{
- void *p = malloc (nplus);
+ char *mem = (char *) malloc (nplus);
- if (p != NULL)
+ if (mem != NULL)
{
- size_t slot;
- union header *h = p;
-
- p = h + 1;
-
- /* Put a magic number into the indicator word. */
- h->magic.word = MAGIC_NUMBER;
-
- /* Enter p into the hash table. */
- slot = (uintptr_t) p % HASH_TABLE_SIZE;
- h->next = mmalloca_results[slot];
- mmalloca_results[slot] = p;
-
+ char *p =
+ (char *)((((uintptr_t)mem + sizeof (small_t) + sa_alignment_max - 1)
+ & ~(uintptr_t)(2 * sa_alignment_max - 1))
+ + sa_alignment_max);
+ /* Here p >= mem + sizeof (small_t),
+ and p <= mem + sizeof (small_t) + 2 * sa_alignment_max - 1
+ hence p + n <= mem + nplus.
+ So, the memory range [p, p+n) lies in the allocated memory range
+ [mem, mem + nplus). */
+ ((small_t *) p)[-1] = p - mem;
+ /* p ≡ sa_alignment_max mod 2*sa_alignment_max. */
return p;
}
}
@@ -115,35 +82,24 @@ mmalloca (size_t n)
void
freea (void *p)
{
- /* mmalloca() may have returned NULL. */
- if (p != NULL)
+ /* Check argument. */
+ if ((uintptr_t) p & (sa_alignment_max - 1))
{
- /* Attempt to quickly distinguish the mmalloca() result - which has
- a magic indicator word - and the alloca() result - which has an
- uninitialized indicator word. It is for this test that sa_increment
- additional bytes are allocated in the alloca() case. */
- if (((int *) p)[-1] == MAGIC_NUMBER)
- {
- /* Looks like a mmalloca() result. To see whether it really is one,
- perform a lookup in the hash table. */
- size_t slot = (uintptr_t) p % HASH_TABLE_SIZE;
- void **chain = &mmalloca_results[slot];
- for (; *chain != NULL;)
- {
- union header *h = p;
- if (*chain == p)
- {
- /* Found it. Remove it from the hash table and free it. */
- union header *p_begin = h - 1;
- *chain = p_begin->next;
- free (p_begin);
- return;
- }
- h = *chain;
- chain = &h[-1].next;
- }
- }
- /* At this point, we know it was not a mmalloca() result. */
+ /* p was not the result of a malloca() call. Invalid argument. */
+ abort ();
+ }
+ /* Determine whether p was a non-NULL pointer returned by mmalloca(). */
+ if ((uintptr_t) p & sa_alignment_max)
+ {
+ void *mem = (char *) p - ((small_t *) p)[-1];
+ free (mem);
}
}
#endif
+
+/*
+ * Hey Emacs!
+ * Local Variables:
+ * coding: utf-8
+ * End:
+ */
diff --git a/lib/malloca.h b/lib/malloca.h
index a9078fc..1e47813 100644
--- a/lib/malloca.h
+++ b/lib/malloca.h
@@ -1,5 +1,5 @@
/* Safe automatic memory allocation.
- Copyright (C) 2003-2007, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2003-2007, 2009-2018 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _MALLOCA_H
#define _MALLOCA_H
@@ -56,8 +56,10 @@ extern "C" {
the function returns. Upon failure, it returns NULL. */
#if HAVE_ALLOCA
# define malloca(N) \
- ((N) < 4032 - sa_increment \
- ? (void *) ((char *) alloca ((N) + sa_increment) + sa_increment) \
+ ((N) < 4032 - (2 * sa_alignment_max - 1) \
+ ? (void *) (((uintptr_t) (char *) alloca ((N) + 2 * sa_alignment_max - 1) \
+ + (2 * sa_alignment_max - 1)) \
+ & ~(uintptr_t)(2 * sa_alignment_max - 1)) \
: mmalloca (N))
#else
# define malloca(N) \
@@ -119,10 +121,7 @@ enum
| (sa_alignment_longlong - 1)
#endif
| (sa_alignment_longdouble - 1)
- ) + 1,
-/* The increment that guarantees room for a magic word must be >= sizeof (int)
- and a multiple of sa_alignment_max. */
- sa_increment = ((sizeof (int) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max
+ ) + 1
};
#endif /* _MALLOCA_H */
diff --git a/lib/malloca.valgrind b/lib/malloca.valgrind
deleted file mode 100644
index 52f0a50..0000000
--- a/lib/malloca.valgrind
+++ /dev/null
@@ -1,7 +0,0 @@
-# Suppress a valgrind message about use of uninitialized memory in freea().
-# This use is OK because it provides only a speedup.
-{
- freea
- Memcheck:Cond
- fun:freea
-}
diff --git a/lib/mbrlen.c b/lib/mbrlen.c
index b630d29..2812a2e 100644
--- a/lib/mbrlen.c
+++ b/lib/mbrlen.c
@@ -1,5 +1,5 @@
/* Recognize multibyte character.
- Copyright (C) 1999-2000, 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2008-2018 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/mbrtowc.c b/lib/mbrtowc.c
index d4809f6..22ac2c4 100644
--- a/lib/mbrtowc.c
+++ b/lib/mbrtowc.c
@@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
- Copyright (C) 1999-2002, 2005-2017 Free Software Foundation, Inc.
+ Copyright (C) 1999-2002, 2005-2018 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@@ -35,6 +35,13 @@
# include "streq.h"
# include "verify.h"
+#ifndef FALLTHROUGH
+# if __GNUC__ < 7
+# define FALLTHROUGH ((void) 0)
+# else
+# define FALLTHROUGH __attribute__ ((__fallthrough__))
+# endif
+#endif
verify (sizeof (mbstate_t) >= 4);
@@ -74,10 +81,10 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
break;
case 3:
buf[2] = pstate[3];
- /*FALLTHROUGH*/
+ FALLTHROUGH;
case 2:
buf[1] = pstate[2];
- /*FALLTHROUGH*/
+ FALLTHROUGH;
case 1:
buf[0] = pstate[1];
p = buf;
@@ -98,7 +105,7 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
/* Here m > 0. */
# if __GLIBC__ || defined __UCLIBC__
- /* Work around bug <http://sourceware.org/bugzilla/show_bug.cgi?id=9674> */
+ /* Work around bug <https://sourceware.org/bugzilla/show_bug.cgi?id=9674> */
mbtowc (NULL, NULL, 0);
# endif
{
diff --git a/lib/mbsinit.c b/lib/mbsinit.c
index 58e0441..921cbf1 100644
--- a/lib/mbsinit.c
+++ b/lib/mbsinit.c
@@ -1,5 +1,5 @@
/* Test for initial conversion state.
- Copyright (C) 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@@ -22,17 +22,7 @@
#include "verify.h"
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
-
-/* On native Windows, 'mbstate_t' is defined as 'int'. */
-
-int
-mbsinit (const mbstate_t *ps)
-{
- return ps == NULL || *ps == 0;
-}
-
-#else
+#if GNULIB_defined_mbstate_t
/* Platforms that lack mbsinit() also lack mbrlen(), mbrtowc(), mbsrtowcs()
and wcrtomb(), wcsrtombs().
@@ -45,6 +35,7 @@ mbsinit (const mbstate_t *ps)
We define the meaning of mbstate_t as follows:
- In mb -> wc direction, mbstate_t's first byte contains the number of
buffered bytes (in the range 0..3), followed by up to 3 buffered bytes.
+ See mbrtowc.c.
- In wc -> mb direction, mbstate_t contains no information. In other
words, it is always in the initial state. */
@@ -58,4 +49,25 @@ mbsinit (const mbstate_t *ps)
return pstate == NULL || pstate[0] == 0;
}
+#else
+
+int
+mbsinit (const mbstate_t *ps)
+{
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+ /* Native Windows. */
+# ifdef __MINGW32__
+ /* On mingw, 'mbstate_t' is defined as 'int'. */
+ return ps == NULL || *ps == 0;
+# else
+ /* MSVC defines 'mbstate_t' as an 8-byte struct; the first 4-bytes matter. */
+ return ps == NULL || *(const unsigned int *)ps == 0;
+# endif
+# else
+ /* Minix, HP-UX 11.00, Solaris 2.6, Interix, ... */
+ /* Maybe this definition works, maybe not... */
+ return ps == NULL || *(const char *)ps == 0;
+# endif
+}
+
#endif
diff --git a/lib/mbtowc-impl.h b/lib/mbtowc-impl.h
index b53b2eb..633832f 100644
--- a/lib/mbtowc-impl.h
+++ b/lib/mbtowc-impl.h
@@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* We don't need a static internal state, because the encoding is not state
dependent, and when mbrtowc returns (size_t)(-2). we throw the result
diff --git a/lib/mbtowc.c b/lib/mbtowc.c
index 118754f..a212b22 100644
--- a/lib/mbtowc.c
+++ b/lib/mbtowc.c
@@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/memchr.c b/lib/memchr.c
index 3481260..0b47546 100644
--- a/lib/memchr.c
+++ b/lib/memchr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2017
+/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2018
Free Software Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
@@ -21,7 +21,7 @@ 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/>. */
+along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef _LIBC
# include <config.h>
diff --git a/lib/memrchr.c b/lib/memrchr.c
index fefe16c..99acfd9 100644
--- a/lib/memrchr.c
+++ b/lib/memrchr.c
@@ -1,6 +1,6 @@
/* memrchr -- find the last occurrence of a byte in a memory block
- Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2017 Free Software
+ Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2018 Free Software
Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
@@ -20,7 +20,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#if defined _LIBC
# include <memcopy.h>
diff --git a/lib/minmax.h b/lib/minmax.h
index 6b602a9..33a5305 100644
--- a/lib/minmax.h
+++ b/lib/minmax.h
@@ -1,5 +1,5 @@
/* MIN, MAX macros.
- Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2017 Free Software
+ Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2018 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _MINMAX_H
#define _MINMAX_H
diff --git a/lib/mkostemp.c b/lib/mkostemp.c
index 56c22a4..df9ecf8 100644
--- a/lib/mkostemp.c
+++ b/lib/mkostemp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2017 Free Software
+/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2018 Free Software
Foundation, Inc.
This file is derived from the one in the GNU C Library.
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#if !_LIBC
# include <config.h>
diff --git a/lib/msvc-inval.c b/lib/msvc-inval.c
index 7139e93..0f19a09 100644
--- a/lib/msvc-inval.c
+++ b/lib/msvc-inval.c
@@ -1,5 +1,5 @@
/* Invalid parameter handler for MSVC runtime libraries.
- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ with this program; if not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/msvc-inval.h b/lib/msvc-inval.h
index 6e216d6..8e7ff30 100644
--- a/lib/msvc-inval.h
+++ b/lib/msvc-inval.h
@@ -1,5 +1,5 @@
/* Invalid parameter handler for MSVC runtime libraries.
- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _MSVC_INVAL_H
#define _MSVC_INVAL_H
@@ -95,7 +95,7 @@ extern void gl_msvc_inval_ensure_handler (void);
/* Gnulib can define its own status codes, as described in the page
"Raising Software Exceptions" on microsoft.com
- <http://msdn.microsoft.com/en-us/library/het71c37.aspx>.
+ <https://msdn.microsoft.com/en-us/library/het71c37.aspx>.
Our status codes are composed of
- 0xE0000000, mandatory for all user-defined status codes,
- 0x474E550, a API identifier ("GNU"),
@@ -106,7 +106,7 @@ extern void gl_msvc_inval_ensure_handler (void);
# if defined _MSC_VER
/* A compiler that supports __try/__except, as described in the page
"try-except statement" on microsoft.com
- <http://msdn.microsoft.com/en-us/library/s58ftw19.aspx>.
+ <https://msdn.microsoft.com/en-us/library/s58ftw19.aspx>.
With __try/__except, we can use the multithread-safe exception handling. */
# ifdef __cplusplus
diff --git a/lib/msvc-nothrow.c b/lib/msvc-nothrow.c
index d127eb4..785733e 100644
--- a/lib/msvc-nothrow.c
+++ b/lib/msvc-nothrow.c
@@ -1,6 +1,6 @@
/* Wrappers that don't throw invalid parameter notifications
with MSVC runtime libraries.
- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ with this program; if not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@@ -24,7 +24,9 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-#include "msvc-inval.h"
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+# include "msvc-inval.h"
+#endif
#undef _get_osfhandle
diff --git a/lib/msvc-nothrow.h b/lib/msvc-nothrow.h
index c70efc7..f7a7f8a 100644
--- a/lib/msvc-nothrow.h
+++ b/lib/msvc-nothrow.h
@@ -1,6 +1,6 @@
/* Wrappers that don't throw invalid parameter notifications
with MSVC runtime libraries.
- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _MSVC_NOTHROW_H
#define _MSVC_NOTHROW_H
diff --git a/lib/nl_langinfo.c b/lib/nl_langinfo.c
index 270570f..d98f034 100644
--- a/lib/nl_langinfo.c
+++ b/lib/nl_langinfo.c
@@ -1,6 +1,6 @@
/* nl_langinfo() replacement: query locale dependent information.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@@ -28,6 +28,7 @@
# include <stdio.h>
#endif
+#if !REPLACE_NL_LANGINFO || GNULIB_defined_CODESET
/* Return the codeset of the current locale, if this is easily deducible.
Otherwise, return "". */
static char *
@@ -64,7 +65,7 @@ ctype_codeset (void)
}
}
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* If setlocale is successful, it returns the number of the
codepage, as a string. Otherwise, fall back on Windows API
GetACP, which returns the locale's codepage as a number (although
@@ -76,9 +77,10 @@ ctype_codeset (void)
else
sprintf (buf + 2, "%u", GetACP ());
codeset = memcpy (buf, "CP", 2);
-#endif
+# endif
return codeset;
}
+#endif
#if REPLACE_NL_LANGINFO
@@ -100,6 +102,24 @@ rpl_nl_langinfo (nl_item item)
case T_FMT_AMPM:
return (char *) "%I:%M:%S %p";
# endif
+# if GNULIB_defined_ALTMON
+ case ALTMON_1:
+ case ALTMON_2:
+ case ALTMON_3:
+ case ALTMON_4:
+ case ALTMON_5:
+ case ALTMON_6:
+ case ALTMON_7:
+ case ALTMON_8:
+ case ALTMON_9:
+ case ALTMON_10:
+ case ALTMON_11:
+ case ALTMON_12:
+ /* We don't ship the appropriate localizations with gnulib. Therefore,
+ treat ALTMON_i like MON_i. */
+ item = item - ALTMON_1 + MON_1;
+ break;
+# endif
# if GNULIB_defined_ERA
case ERA:
/* The format is not standardized. In glibc it is a sequence of strings
@@ -228,28 +248,49 @@ nl_langinfo (nl_item item)
return (char *) abdays[item - ABDAY_1];
return nlbuf;
}
- case MON_1:
- case MON_2:
- case MON_3:
- case MON_4:
- case MON_5:
- case MON_6:
- case MON_7:
- case MON_8:
- case MON_9:
- case MON_10:
- case MON_11:
- case MON_12:
- {
- static char const months[][sizeof "September"] = {
- "January", "February", "March", "April", "May", "June", "July",
- "September", "October", "November", "December"
- };
+ {
+ static char const months[][sizeof "September"] = {
+ "January", "February", "March", "April", "May", "June", "July",
+ "September", "October", "November", "December"
+ };
+ case MON_1:
+ case MON_2:
+ case MON_3:
+ case MON_4:
+ case MON_5:
+ case MON_6:
+ case MON_7:
+ case MON_8:
+ case MON_9:
+ case MON_10:
+ case MON_11:
+ case MON_12:
tmm.tm_mon = item - MON_1;
if (!strftime (nlbuf, sizeof nlbuf, "%B", &tmm))
return (char *) months[item - MON_1];
return nlbuf;
- }
+ case ALTMON_1:
+ case ALTMON_2:
+ case ALTMON_3:
+ case ALTMON_4:
+ case ALTMON_5:
+ case ALTMON_6:
+ case ALTMON_7:
+ case ALTMON_8:
+ case ALTMON_9:
+ case ALTMON_10:
+ case ALTMON_11:
+ case ALTMON_12:
+ tmm.tm_mon = item - ALTMON_1;
+ /* The platforms without nl_langinfo() don't support strftime with %OB.
+ We don't even need to try. */
+ #if 0
+ if (!strftime (nlbuf, sizeof nlbuf, "%OB", &tmm))
+ #endif
+ if (!strftime (nlbuf, sizeof nlbuf, "%B", &tmm))
+ return (char *) months[item - ALTMON_1];
+ return nlbuf;
+ }
case ABMON_1:
case ABMON_2:
case ABMON_3:
diff --git a/lib/obstack.c b/lib/obstack.c
index 54b675d..02be6cf 100644
--- a/lib/obstack.c
+++ b/lib/obstack.c
@@ -1,5 +1,5 @@
/* obstack.c - subroutines used implicitly by object stack macros
- Copyright (C) 1988-2017 Free Software Foundation, Inc.
+ Copyright (C) 1988-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
#ifdef _LIBC
diff --git a/lib/obstack.h b/lib/obstack.h
index dd29019..2a11e73 100644
--- a/lib/obstack.h
+++ b/lib/obstack.h
@@ -1,5 +1,5 @@
/* obstack.h - object stack macros
- Copyright (C) 1988-2017 Free Software Foundation, Inc.
+ Copyright (C) 1988-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
/* Summary:
diff --git a/lib/pathmax.h b/lib/pathmax.h
index aa0730e..1eafb49 100644
--- a/lib/pathmax.h
+++ b/lib/pathmax.h
@@ -1,5 +1,5 @@
/* Define PATH_MAX somehow. Requires sys/types.h.
- Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2017 Free Software
+ Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2018 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _PATHMAX_H
# define _PATHMAX_H
@@ -68,7 +68,7 @@
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* The page "Naming Files, Paths, and Namespaces" on msdn.microsoft.com,
section "Maximum Path Length Limitation",
- <http://msdn.microsoft.com/en-us/library/aa365247(v=vs.85).aspx#maxpath>
+ <https://msdn.microsoft.com/en-us/library/aa365247.aspx#maxpath>
explains that the maximum size of a filename, including the terminating
NUL byte, is 260 = 3 + 256 + 1.
This is the same value as
diff --git a/lib/progname.c b/lib/progname.c
index 05b2a7f..382f503 100644
--- a/lib/progname.c
+++ b/lib/progname.c
@@ -1,5 +1,5 @@
/* Program name management.
- Copyright (C) 2001-2003, 2005-2017 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2018 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/progname.h b/lib/progname.h
index f33881c..adc6b01 100644
--- a/lib/progname.h
+++ b/lib/progname.h
@@ -1,5 +1,5 @@
/* Program name management.
- Copyright (C) 2001-2004, 2006, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006, 2009-2018 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef _PROGNAME_H
#define _PROGNAME_H
diff --git a/lib/qcopy-acl.c b/lib/qcopy-acl.c
index fdf0a05..ee482ef 100644
--- a/lib/qcopy-acl.c
+++ b/lib/qcopy-acl.c
@@ -1,6 +1,6 @@
/* Copy access control list from one file to another. -*- coding: utf-8 -*-
- Copyright (C) 2002-2003, 2005-2017 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2018 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
@@ -13,7 +13,7 @@
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/>.
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
Written by Paul Eggert, Andreas Grünbacher, and Bruno Haible. */
diff --git a/lib/qset-acl.c b/lib/qset-acl.c
index 328ee14..e2d4cc5 100644
--- a/lib/qset-acl.c
+++ b/lib/qset-acl.c
@@ -1,6 +1,6 @@
/* qset-acl.c - set access control list equivalent to a mode
- Copyright (C) 2002-2003, 2005-2017 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2018 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
@@ -13,7 +13,7 @@
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/>.
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
Written by Paul Eggert and Andreas Gruenbacher, and Bruno Haible. */
diff --git a/lib/quote.h b/lib/quote.h
index 2e58fb5..eedc283 100644
--- a/lib/quote.h
+++ b/lib/quote.h
@@ -1,6 +1,6 @@
/* quote.h - prototypes for quote.c
- Copyright (C) 1998-2001, 2003, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 1998-2001, 2003, 2009-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef QUOTE_H_
# define QUOTE_H_ 1
diff --git a/lib/quotearg.c b/lib/quotearg.c
index 26903c7..fe68dca 100644
--- a/lib/quotearg.c
+++ b/lib/quotearg.c
@@ -1,6 +1,6 @@
/* quotearg.c - quote arguments for output
- Copyright (C) 1998-2002, 2004-2017 Free Software Foundation, Inc.
+ Copyright (C) 1998-2002, 2004-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Paul Eggert <eggert@twinsun.com> */
@@ -54,6 +54,14 @@
#define INT_BITS (sizeof (int) * CHAR_BIT)
+#ifndef FALLTHROUGH
+# if __GNUC__ < 7
+# define FALLTHROUGH ((void) 0)
+# else
+# define FALLTHROUGH __attribute__ ((__fallthrough__))
+# endif
+#endif
+
struct quoting_options
{
/* Basic quoting style. */
@@ -310,7 +318,7 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
case c_maybe_quoting_style:
quoting_style = c_quoting_style;
elide_outer_quotes = true;
- /* Fall through. */
+ FALLTHROUGH;
case c_quoting_style:
if (!elide_outer_quotes)
STORE ('"');
@@ -349,7 +357,7 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
for your locale.
If you don't know what to put here, please see
- <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+ <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
and use glyphs suitable for your language. */
left_quote = gettext_quote (N_("`"), quoting_style);
right_quote = gettext_quote (N_("'"), quoting_style);
@@ -365,14 +373,14 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
case shell_escape_quoting_style:
backslash_escapes = true;
- /* Fall through. */
+ FALLTHROUGH;
case shell_quoting_style:
elide_outer_quotes = true;
- /* Fall through. */
+ FALLTHROUGH;
case shell_escape_always_quoting_style:
if (!elide_outer_quotes)
backslash_escapes = true;
- /* Fall through. */
+ FALLTHROUGH;
case shell_always_quoting_style:
quoting_style = shell_always_quoting_style;
if (!elide_outer_quotes)
@@ -505,7 +513,7 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
if (quoting_style == shell_always_quoting_style
&& elide_outer_quotes)
goto force_outer_quoting_style;
- /* Fall through. */
+ /* fall through */
c_escape:
if (backslash_escapes)
{
@@ -517,14 +525,14 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
case '{': case '}': /* sometimes special if isolated */
if (! (argsize == SIZE_MAX ? arg[1] == '\0' : argsize == 1))
break;
- /* Fall through. */
+ FALLTHROUGH;
case '#': case '~':
if (i != 0)
break;
- /* Fall through. */
+ FALLTHROUGH;
case ' ':
c_and_shell_quote_compat = true;
- /* Fall through. */
+ FALLTHROUGH;
case '!': /* special in bash */
case '"': case '$': case '&':
case '(': case ')': case '*': case ';':
@@ -879,8 +887,9 @@ quotearg_n_options (int n, char const *arg, size_t argsize,
if (nslots <= n)
{
bool preallocated = (sv == &slotvec0);
+ int nmax = MIN (INT_MAX, MIN (PTRDIFF_MAX, SIZE_MAX) / sizeof *sv) - 1;
- if (MIN (INT_MAX, MIN (PTRDIFF_MAX, SIZE_MAX) / sizeof *sv) <= n)
+ if (nmax < n)
xalloc_die ();
slotvec = sv = xrealloc (preallocated ? NULL : sv, (n + 1) * sizeof *sv);
@@ -1071,3 +1080,10 @@ quote (char const *arg)
{
return quote_n (0, arg);
}
+
+/*
+ * Hey Emacs!
+ * Local Variables:
+ * coding: utf-8
+ * End:
+ */
diff --git a/lib/quotearg.h b/lib/quotearg.h
index b82aa00..0584c56 100644
--- a/lib/quotearg.h
+++ b/lib/quotearg.h
@@ -1,6 +1,6 @@
/* quotearg.h - quote arguments for output
- Copyright (C) 1998-2002, 2004, 2006, 2008-2017 Free Software Foundation,
+ Copyright (C) 1998-2002, 2004, 2006, 2008-2018 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
@@ -14,7 +14,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Paul Eggert <eggert@twinsun.com> */
diff --git a/lib/readlink.c b/lib/readlink.c
index bf0cedc..924e00d 100644
--- a/lib/readlink.c
+++ b/lib/readlink.c
@@ -1,5 +1,5 @@
/* Stub for readlink().
- Copyright (C) 2003-2007, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2003-2007, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/ref-add.sin b/lib/ref-add.sin
index 3913e99..1bbf38f 100644
--- a/lib/ref-add.sin
+++ b/lib/ref-add.sin
@@ -1,6 +1,6 @@
# Add this package to a list of references stored in a text file.
#
-# Copyright (C) 2000, 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2009-2018 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
@@ -13,7 +13,7 @@
# 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/>.
+# with this program; if not, see <https://www.gnu.org/licenses/>.
#
# Written by Bruno Haible <haible@clisp.cons.org>.
#
diff --git a/lib/ref-del.sin b/lib/ref-del.sin
index eeff947..5965092 100644
--- a/lib/ref-del.sin
+++ b/lib/ref-del.sin
@@ -1,6 +1,6 @@
# Remove this package from a list of references stored in a text file.
#
-# Copyright (C) 2000, 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2009-2018 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
@@ -13,7 +13,7 @@
# 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/>.
+# with this program; if not, see <https://www.gnu.org/licenses/>.
#
# Written by Bruno Haible <haible@clisp.cons.org>.
#
diff --git a/lib/regcomp.c b/lib/regcomp.c
index 6aaa6b1..c2c577a 100644
--- a/lib/regcomp.c
+++ b/lib/regcomp.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2017 Free Software Foundation, Inc.
+ Copyright (C) 2002-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
#ifdef _LIBC
# include <locale/weight.h>
@@ -59,7 +59,7 @@ static reg_errcode_t calc_inveclosure (re_dfa_t *dfa);
static Idx fetch_number (re_string_t *input, re_token_t *token,
reg_syntax_t syntax);
static int peek_token (re_token_t *token, re_string_t *input,
- reg_syntax_t syntax) internal_function;
+ reg_syntax_t syntax);
static bin_tree_t *parse (re_string_t *regexp, regex_t *preg,
reg_syntax_t syntax, reg_errcode_t *err);
static bin_tree_t *parse_reg_exp (re_string_t *regexp, regex_t *preg,
@@ -516,6 +516,7 @@ regcomp (regex_t *_Restrict_ preg, const char *_Restrict_ pattern, int cflags)
return (int) ret;
}
#ifdef _LIBC
+libc_hidden_def (__regcomp)
weak_alias (__regcomp, regcomp)
#endif
@@ -658,6 +659,7 @@ regfree (regex_t *preg)
preg->translate = NULL;
}
#ifdef _LIBC
+libc_hidden_def (__regfree)
weak_alias (__regfree, regfree)
#endif
@@ -699,7 +701,7 @@ re_comp (const char *s)
if (re_comp_buf.fastmap == NULL)
{
- re_comp_buf.fastmap = (char *) malloc (SBC_MAX);
+ re_comp_buf.fastmap = re_malloc (char, SBC_MAX);
if (re_comp_buf.fastmap == NULL)
return (char *) gettext (__re_error_msgid
+ __re_error_msgid_idx[(int) REG_ESPACE]);
@@ -935,7 +937,6 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
character used by some operators like "\<", "\>", etc. */
static void
-internal_function
init_word_char (re_dfa_t *dfa)
{
int i = 0;
@@ -944,12 +945,15 @@ init_word_char (re_dfa_t *dfa)
dfa->word_ops_used = 1;
if (BE (dfa->map_notascii == 0, 1))
{
+ /* Avoid uint32_t and uint64_t as some non-GCC platforms lack
+ them, an issue when this code is used in Gnulib. */
bitset_word_t bits0 = 0x00000000;
bitset_word_t bits1 = 0x03ff0000;
bitset_word_t bits2 = 0x87fffffe;
bitset_word_t bits3 = 0x07fffffe;
if (BITSET_WORD_BITS == 64)
{
+ /* Pacify gcc -Woverflow on 32-bit platformns. */
dfa->word_char[0] = bits1 << 31 << 1 | bits0;
dfa->word_char[1] = bits3 << 31 << 1 | bits2;
i = 2;
@@ -1193,7 +1197,7 @@ analyze (regex_t *preg)
break;
if (i == preg->re_nsub)
{
- free (dfa->subexp_map);
+ re_free (dfa->subexp_map);
dfa->subexp_map = NULL;
}
}
@@ -1490,7 +1494,6 @@ link_nfa_nodes (void *extra, bin_tree_t *node)
to their own constraint. */
static reg_errcode_t
-internal_function
duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node,
Idx root_node, unsigned int init_constraint)
{
@@ -1782,7 +1785,6 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root)
We must not use this function inside bracket expressions. */
static void
-internal_function
fetch_token (re_token_t *result, re_string_t *input, reg_syntax_t syntax)
{
re_string_skip_bytes (input, peek_token (result, input, syntax));
@@ -1792,7 +1794,6 @@ fetch_token (re_token_t *result, re_string_t *input, reg_syntax_t syntax)
We must not use this function inside bracket expressions. */
static int
-internal_function
peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
{
unsigned char c;
@@ -2031,7 +2032,6 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
We must not use this function out of bracket expressions. */
static int
-internal_function
peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
{
unsigned char c;
@@ -2078,16 +2078,18 @@ peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
case '.':
token->type = OP_OPEN_COLL_ELEM;
break;
+
case '=':
token->type = OP_OPEN_EQUIV_CLASS;
break;
+
case ':':
if (syntax & RE_CHAR_CLASSES)
{
token->type = OP_OPEN_CHAR_CLASS;
break;
}
- /* else fall through. */
+ FALLTHROUGH;
default:
token->type = CHARACTER;
token->opr.c = c;
@@ -2289,16 +2291,19 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
}
#endif
break;
+
case OP_OPEN_SUBEXP:
tree = parse_sub_exp (regexp, preg, token, syntax, nest + 1, err);
if (BE (*err != REG_NOERROR && tree == NULL, 0))
return NULL;
break;
+
case OP_OPEN_BRACKET:
tree = parse_bracket_exp (regexp, dfa, token, syntax, err);
if (BE (*err != REG_NOERROR && tree == NULL, 0))
return NULL;
break;
+
case OP_BACK_REF:
if (!BE (dfa->completed_bkref_map & (1 << token->opr.idx), 1))
{
@@ -2315,13 +2320,14 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
++dfa->nbackref;
dfa->has_mb_node = 1;
break;
+
case OP_OPEN_DUP_NUM:
if (syntax & RE_CONTEXT_INVALID_DUP)
{
*err = REG_BADRPT;
return NULL;
}
- /* FALLTHROUGH */
+ FALLTHROUGH;
case OP_DUP_ASTERISK:
case OP_DUP_PLUS:
case OP_DUP_QUESTION:
@@ -2335,7 +2341,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
fetch_token (token, regexp, syntax);
return parse_expression (regexp, preg, token, syntax, nest, err);
}
- /* else fall through */
+ FALLTHROUGH;
case OP_CLOSE_SUBEXP:
if ((token->type == OP_CLOSE_SUBEXP) &&
!(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD))
@@ -2343,7 +2349,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
*err = REG_ERPAREN;
return NULL;
}
- /* else fall through */
+ FALLTHROUGH;
case OP_CLOSE_DUP_NUM:
/* We treat it as a normal character. */
@@ -2358,6 +2364,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
return NULL;
}
break;
+
case ANCHOR:
if ((token->opr.ctx_type
& (WORD_DELIM | NOT_WORD_DELIM | WORD_FIRST | WORD_LAST))
@@ -2402,6 +2409,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
it must not be "<ANCHOR(^)><REPEAT(*)>". */
fetch_token (token, regexp, syntax);
return tree;
+
case OP_PERIOD:
tree = create_token_tree (dfa, NULL, NULL, token);
if (BE (tree == NULL, 0))
@@ -2412,6 +2420,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
if (dfa->mb_cur_max > 1)
dfa->has_mb_node = 1;
break;
+
case OP_WORD:
case OP_NOTWORD:
tree = build_charclass_op (dfa, regexp->trans,
@@ -2421,6 +2430,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
if (BE (*err != REG_NOERROR && tree == NULL, 0))
return NULL;
break;
+
case OP_SPACE:
case OP_NOTSPACE:
tree = build_charclass_op (dfa, regexp->trans,
@@ -2430,12 +2440,15 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
if (BE (*err != REG_NOERROR && tree == NULL, 0))
return NULL;
break;
+
case OP_ALT:
case END_OF_RE:
return NULL;
+
case BACK_SLASH:
*err = REG_EESCAPE;
return NULL;
+
default:
/* Must not happen? */
#ifdef DEBUG
@@ -2693,7 +2706,6 @@ parse_byte (unsigned char b, re_charset_t *mbcset)
update it. */
static reg_errcode_t
-internal_function
# ifdef RE_ENABLE_I18N
build_range_exp (const reg_syntax_t syntax,
bitset_t sbcset,
@@ -2819,7 +2831,6 @@ build_range_exp (const reg_syntax_t syntax,
pointer argument since we may update it. */
static reg_errcode_t
-internal_function
# ifdef RE_ENABLE_I18N
build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset,
Idx *coll_sym_alloc, const unsigned char *name)
diff --git a/lib/regex.c b/lib/regex.c
index b46308b..499e1f0 100644
--- a/lib/regex.c
+++ b/lib/regex.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2017 Free Software Foundation, Inc.
+ Copyright (C) 2002-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
#ifndef _LIBC
# include <config.h>
diff --git a/lib/regex.h b/lib/regex.h
index 18b8cbd..cf9a40c 100644
--- a/lib/regex.h
+++ b/lib/regex.h
@@ -1,6 +1,6 @@
/* Definitions for data structures and routines for the regular
expression library.
- Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2017 Free Software
+ Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2018 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
#ifndef _REGEX_H
#define _REGEX_H 1
diff --git a/lib/regex_internal.c b/lib/regex_internal.c
index 9546b78..df27f69 100644
--- a/lib/regex_internal.c
+++ b/lib/regex_internal.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2017 Free Software Foundation, Inc.
+ Copyright (C) 2002-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -15,19 +15,19 @@
You should have received a copy of the GNU General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
static void re_string_construct_common (const char *str, Idx len,
re_string_t *pstr,
RE_TRANSLATE_TYPE trans, bool icase,
- const re_dfa_t *dfa) internal_function;
+ const re_dfa_t *dfa);
static re_dfastate_t *create_ci_newstate (const re_dfa_t *dfa,
const re_node_set *nodes,
- re_hashval_t hash) internal_function;
+ re_hashval_t hash);
static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa,
const re_node_set *nodes,
unsigned int context,
- re_hashval_t hash) internal_function;
+ re_hashval_t hash);
/* Functions for string operation. */
@@ -35,7 +35,7 @@ static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa,
re_string_reconstruct before using the object. */
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
re_string_allocate (re_string_t *pstr, const char *str, Idx len, Idx init_len,
RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa)
{
@@ -63,7 +63,7 @@ re_string_allocate (re_string_t *pstr, const char *str, Idx len, Idx init_len,
/* This function allocate the buffers, and initialize them. */
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
re_string_construct (re_string_t *pstr, const char *str, Idx len,
RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa)
{
@@ -126,7 +126,7 @@ re_string_construct (re_string_t *pstr, const char *str, Idx len,
/* Helper functions for re_string_allocate, and re_string_construct. */
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len)
{
#ifdef RE_ENABLE_I18N
@@ -166,7 +166,6 @@ re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len)
static void
-internal_function
re_string_construct_common (const char *str, Idx len, re_string_t *pstr,
RE_TRANSLATE_TYPE trans, bool icase,
const re_dfa_t *dfa)
@@ -198,7 +197,6 @@ re_string_construct_common (const char *str, Idx len, re_string_t *pstr,
built and starts from PSTR->VALID_LEN. */
static void
-internal_function
build_wcs_buffer (re_string_t *pstr)
{
#ifdef _LIBC
@@ -267,7 +265,7 @@ build_wcs_buffer (re_string_t *pstr)
but for REG_ICASE. */
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
build_wcs_upper_buffer (re_string_t *pstr)
{
mbstate_t prev_st;
@@ -484,7 +482,6 @@ build_wcs_upper_buffer (re_string_t *pstr)
Return the index. */
static Idx
-internal_function
re_string_skip_chars (re_string_t *pstr, Idx new_raw_idx, wint_t *last_wc)
{
mbstate_t prev_st;
@@ -525,7 +522,6 @@ re_string_skip_chars (re_string_t *pstr, Idx new_raw_idx, wint_t *last_wc)
This function is used in case of REG_ICASE. */
static void
-internal_function
build_upper_buffer (re_string_t *pstr)
{
Idx char_idx, end_idx;
@@ -545,7 +541,6 @@ build_upper_buffer (re_string_t *pstr)
/* Apply TRANS to the buffer in PSTR. */
static void
-internal_function
re_string_translate_buffer (re_string_t *pstr)
{
Idx buf_idx, end_idx;
@@ -566,7 +561,7 @@ re_string_translate_buffer (re_string_t *pstr)
convert to upper case in case of REG_ICASE, apply translation. */
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
{
Idx offset;
@@ -829,7 +824,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
}
static unsigned char
-internal_function __attribute__ ((pure))
+__attribute__ ((pure))
re_string_peek_byte_case (const re_string_t *pstr, Idx idx)
{
int ch;
@@ -866,7 +861,6 @@ re_string_peek_byte_case (const re_string_t *pstr, Idx idx)
}
static unsigned char
-internal_function
re_string_fetch_byte_case (re_string_t *pstr)
{
if (BE (!pstr->mbs_allocated, 1))
@@ -904,7 +898,6 @@ re_string_fetch_byte_case (re_string_t *pstr)
}
static void
-internal_function
re_string_destruct (re_string_t *pstr)
{
#ifdef RE_ENABLE_I18N
@@ -918,7 +911,6 @@ re_string_destruct (re_string_t *pstr)
/* Return the context at IDX in INPUT. */
static unsigned int
-internal_function
re_string_context_at (const re_string_t *input, Idx idx, int eflags)
{
int c;
@@ -963,7 +955,7 @@ re_string_context_at (const re_string_t *input, Idx idx, int eflags)
/* Functions for set operation. */
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
re_node_set_alloc (re_node_set *set, Idx size)
{
set->alloc = size;
@@ -975,7 +967,7 @@ re_node_set_alloc (re_node_set *set, Idx size)
}
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
re_node_set_init_1 (re_node_set *set, Idx elem)
{
set->alloc = 1;
@@ -991,7 +983,7 @@ re_node_set_init_1 (re_node_set *set, Idx elem)
}
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
re_node_set_init_2 (re_node_set *set, Idx elem1, Idx elem2)
{
set->alloc = 2;
@@ -1021,7 +1013,7 @@ re_node_set_init_2 (re_node_set *set, Idx elem1, Idx elem2)
}
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
re_node_set_init_copy (re_node_set *dest, const re_node_set *src)
{
dest->nelem = src->nelem;
@@ -1046,7 +1038,7 @@ re_node_set_init_copy (re_node_set *dest, const re_node_set *src)
Note: We assume dest->elems is NULL, when dest->alloc is 0. */
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1,
const re_node_set *src2)
{
@@ -1137,7 +1129,7 @@ re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1,
DEST. Return value indicate the error code or REG_NOERROR if succeeded. */
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
re_node_set_init_union (re_node_set *dest, const re_node_set *src1,
const re_node_set *src2)
{
@@ -1190,7 +1182,7 @@ re_node_set_init_union (re_node_set *dest, const re_node_set *src1,
DEST. Return value indicate the error code or REG_NOERROR if succeeded. */
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
re_node_set_merge (re_node_set *dest, const re_node_set *src)
{
Idx is, id, sbase, delta;
@@ -1273,7 +1265,7 @@ re_node_set_merge (re_node_set *dest, const re_node_set *src)
Return true if successful. */
static bool
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
re_node_set_insert (re_node_set *set, Idx elem)
{
Idx idx;
@@ -1325,7 +1317,7 @@ re_node_set_insert (re_node_set *set, Idx elem)
Return true if successful. */
static bool
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
re_node_set_insert_last (re_node_set *set, Idx elem)
{
/* Realloc if we need. */
@@ -1348,7 +1340,7 @@ re_node_set_insert_last (re_node_set *set, Idx elem)
Return true if SET1 and SET2 are equivalent. */
static bool
-internal_function __attribute__ ((pure))
+__attribute__ ((pure))
re_node_set_compare (const re_node_set *set1, const re_node_set *set2)
{
Idx i;
@@ -1363,7 +1355,7 @@ re_node_set_compare (const re_node_set *set1, const re_node_set *set2)
/* Return (idx + 1) if SET contains the element ELEM, return 0 otherwise. */
static Idx
-internal_function __attribute__ ((pure))
+__attribute__ ((pure))
re_node_set_contains (const re_node_set *set, Idx elem)
{
__re_size_t idx, right, mid;
@@ -1385,7 +1377,6 @@ re_node_set_contains (const re_node_set *set, Idx elem)
}
static void
-internal_function
re_node_set_remove_at (re_node_set *set, Idx idx)
{
if (idx < 0 || idx >= set->nelem)
@@ -1400,7 +1391,6 @@ re_node_set_remove_at (re_node_set *set, Idx idx)
Or return -1 if an error occurred. */
static Idx
-internal_function
re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
{
if (BE (dfa->nodes_len >= dfa->nodes_alloc, 0))
@@ -1454,7 +1444,6 @@ re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
}
static re_hashval_t
-internal_function
calc_state_hash (const re_node_set *nodes, unsigned int context)
{
re_hashval_t hash = nodes->nelem + context;
@@ -1474,7 +1463,7 @@ calc_state_hash (const re_node_set *nodes, unsigned int context)
optimization. */
static re_dfastate_t *
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa,
const re_node_set *nodes)
{
@@ -1522,7 +1511,7 @@ re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa,
optimization. */
static re_dfastate_t *
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa,
const re_node_set *nodes, unsigned int context)
{
@@ -1618,7 +1607,7 @@ free_state (re_dfastate_t *state)
Return the new state if succeeded, otherwise return NULL. */
static re_dfastate_t *
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
re_hashval_t hash)
{
@@ -1668,7 +1657,7 @@ create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
Return the new state if succeeded, otherwise return NULL. */
static re_dfastate_t *
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
unsigned int context, re_hashval_t hash)
{
diff --git a/lib/regex_internal.h b/lib/regex_internal.h
index 3580c45..88add80 100644
--- a/lib/regex_internal.h
+++ b/lib/regex_internal.h
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2017 Free Software Foundation, Inc.
+ Copyright (C) 2002-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
#ifndef _REGEX_INTERNAL_H
#define _REGEX_INTERNAL_H 1
@@ -102,6 +102,7 @@
__dcgettext (_libc_intl_domainname, msgid, LC_MESSAGES)
# endif
#else
+# undef gettext
# define gettext(msgid) (msgid)
#endif
@@ -437,23 +438,19 @@ struct re_dfa_t;
typedef struct re_dfa_t re_dfa_t;
#ifndef _LIBC
-# define internal_function
# define IS_IN(libc) false
#endif
static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr,
- Idx new_buf_len)
- internal_function;
+ Idx new_buf_len);
#ifdef RE_ENABLE_I18N
-static void build_wcs_buffer (re_string_t *pstr) internal_function;
-static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr)
- internal_function;
+static void build_wcs_buffer (re_string_t *pstr);
+static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr);
#endif /* RE_ENABLE_I18N */
-static void build_upper_buffer (re_string_t *pstr) internal_function;
-static void re_string_translate_buffer (re_string_t *pstr) internal_function;
+static void build_upper_buffer (re_string_t *pstr);
+static void re_string_translate_buffer (re_string_t *pstr);
static unsigned int re_string_context_at (const re_string_t *input, Idx idx,
- int eflags)
- internal_function __attribute__ ((pure));
+ int eflags) __attribute__ ((pure));
#define re_string_peek_byte(pstr, offset) \
((pstr)->mbs[(pstr)->cur_idx + offset])
@@ -830,7 +827,7 @@ bitset_mask (bitset_t dest, const bitset_t src)
#ifdef RE_ENABLE_I18N
/* Functions for re_string. */
static int
-internal_function __attribute__ ((pure, unused))
+__attribute__ ((pure, unused))
re_string_char_size_at (const re_string_t *pstr, Idx idx)
{
int byte_idx;
@@ -843,7 +840,7 @@ re_string_char_size_at (const re_string_t *pstr, Idx idx)
}
static wint_t
-internal_function __attribute__ ((pure, unused))
+__attribute__ ((pure, unused))
re_string_wchar_at (const re_string_t *pstr, Idx idx)
{
if (pstr->mb_cur_max == 1)
@@ -856,7 +853,7 @@ re_string_wchar_at (const re_string_t *pstr, Idx idx)
# endif
static int
-internal_function __attribute__ ((pure, unused))
+__attribute__ ((pure, unused))
re_string_elem_size_at (const re_string_t *pstr, Idx idx)
{
# ifdef _LIBC
@@ -898,4 +895,12 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx)
# define __attribute_warn_unused_result__ /* empty */
#endif
+#ifndef FALLTHROUGH
+# if __GNUC__ < 7
+# define FALLTHROUGH ((void) 0)
+# else
+# define FALLTHROUGH __attribute__ ((__fallthrough__))
+# endif
+#endif
+
#endif /* _REGEX_INTERNAL_H */
diff --git a/lib/regexec.c b/lib/regexec.c
index 45bc796..fc18850 100644
--- a/lib/regexec.c
+++ b/lib/regexec.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2017 Free Software Foundation, Inc.
+ Copyright (C) 2002-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -15,192 +15,162 @@
You should have received a copy of the GNU General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags,
- Idx n) internal_function;
-static void match_ctx_clean (re_match_context_t *mctx) internal_function;
-static void match_ctx_free (re_match_context_t *cache) internal_function;
+ Idx n);
+static void match_ctx_clean (re_match_context_t *mctx);
+static void match_ctx_free (re_match_context_t *cache);
static reg_errcode_t match_ctx_add_entry (re_match_context_t *cache, Idx node,
- Idx str_idx, Idx from, Idx to)
- internal_function;
-static Idx search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx)
- internal_function;
+ Idx str_idx, Idx from, Idx to);
+static Idx search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx);
static reg_errcode_t match_ctx_add_subtop (re_match_context_t *mctx, Idx node,
- Idx str_idx) internal_function;
+ Idx str_idx);
static re_sub_match_last_t * match_ctx_add_sublast (re_sub_match_top_t *subtop,
- Idx node, Idx str_idx)
- internal_function;
+ Idx node, Idx str_idx);
static void sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts,
re_dfastate_t **limited_sts, Idx last_node,
- Idx last_str_idx)
- internal_function;
+ Idx last_str_idx);
static reg_errcode_t re_search_internal (const regex_t *preg,
const char *string, Idx length,
Idx start, Idx last_start, Idx stop,
size_t nmatch, regmatch_t pmatch[],
- int eflags) internal_function;
+ int eflags);
static regoff_t re_search_2_stub (struct re_pattern_buffer *bufp,
const char *string1, Idx length1,
const char *string2, Idx length2,
Idx start, regoff_t range,
struct re_registers *regs,
- Idx stop, bool ret_len) internal_function;
+ Idx stop, bool ret_len);
static regoff_t re_search_stub (struct re_pattern_buffer *bufp,
const char *string, Idx length, Idx start,
regoff_t range, Idx stop,
struct re_registers *regs,
- bool ret_len) internal_function;
+ bool ret_len);
static unsigned re_copy_regs (struct re_registers *regs, regmatch_t *pmatch,
- Idx nregs, int regs_allocated) internal_function;
-static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx)
- internal_function;
+ Idx nregs, int regs_allocated);
+static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx);
static Idx check_matching (re_match_context_t *mctx, bool fl_longest_match,
- Idx *p_match_first) internal_function;
+ Idx *p_match_first);
static Idx check_halt_state_context (const re_match_context_t *mctx,
- const re_dfastate_t *state, Idx idx)
- internal_function;
+ const re_dfastate_t *state, Idx idx);
static void update_regs (const re_dfa_t *dfa, regmatch_t *pmatch,
regmatch_t *prev_idx_match, Idx cur_node,
- Idx cur_idx, Idx nmatch) internal_function;
+ Idx cur_idx, Idx nmatch);
static reg_errcode_t push_fail_stack (struct re_fail_stack_t *fs,
Idx str_idx, Idx dest_node, Idx nregs,
regmatch_t *regs,
- re_node_set *eps_via_nodes)
- internal_function;
+ re_node_set *eps_via_nodes);
static reg_errcode_t set_regs (const regex_t *preg,
const re_match_context_t *mctx,
size_t nmatch, regmatch_t *pmatch,
- bool fl_backtrack) internal_function;
-static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs)
- internal_function;
+ bool fl_backtrack);
+static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs);
#ifdef RE_ENABLE_I18N
static int sift_states_iter_mb (const re_match_context_t *mctx,
re_sift_context_t *sctx,
- Idx node_idx, Idx str_idx, Idx max_str_idx)
- internal_function;
+ Idx node_idx, Idx str_idx, Idx max_str_idx);
#endif /* RE_ENABLE_I18N */
static reg_errcode_t sift_states_backward (const re_match_context_t *mctx,
- re_sift_context_t *sctx)
- internal_function;
+ re_sift_context_t *sctx);
static reg_errcode_t build_sifted_states (const re_match_context_t *mctx,
re_sift_context_t *sctx, Idx str_idx,
- re_node_set *cur_dest)
- internal_function;
+ re_node_set *cur_dest);
static reg_errcode_t update_cur_sifted_state (const re_match_context_t *mctx,
re_sift_context_t *sctx,
Idx str_idx,
- re_node_set *dest_nodes)
- internal_function;
+ re_node_set *dest_nodes);
static reg_errcode_t add_epsilon_src_nodes (const re_dfa_t *dfa,
re_node_set *dest_nodes,
- const re_node_set *candidates)
- internal_function;
+ const re_node_set *candidates);
static bool check_dst_limits (const re_match_context_t *mctx,
const re_node_set *limits,
Idx dst_node, Idx dst_idx, Idx src_node,
- Idx src_idx) internal_function;
+ Idx src_idx);
static int check_dst_limits_calc_pos_1 (const re_match_context_t *mctx,
int boundaries, Idx subexp_idx,
- Idx from_node, Idx bkref_idx)
- internal_function;
+ Idx from_node, Idx bkref_idx);
static int check_dst_limits_calc_pos (const re_match_context_t *mctx,
Idx limit, Idx subexp_idx,
Idx node, Idx str_idx,
- Idx bkref_idx) internal_function;
+ Idx bkref_idx);
static reg_errcode_t check_subexp_limits (const re_dfa_t *dfa,
re_node_set *dest_nodes,
const re_node_set *candidates,
re_node_set *limits,
struct re_backref_cache_entry *bkref_ents,
- Idx str_idx) internal_function;
+ Idx str_idx);
static reg_errcode_t sift_states_bkref (const re_match_context_t *mctx,
re_sift_context_t *sctx,
- Idx str_idx, const re_node_set *candidates)
- internal_function;
+ Idx str_idx, const re_node_set *candidates);
static reg_errcode_t merge_state_array (const re_dfa_t *dfa,
re_dfastate_t **dst,
- re_dfastate_t **src, Idx num)
- internal_function;
+ re_dfastate_t **src, Idx num);
static re_dfastate_t *find_recover_state (reg_errcode_t *err,
- re_match_context_t *mctx) internal_function;
+ re_match_context_t *mctx);
static re_dfastate_t *transit_state (reg_errcode_t *err,
re_match_context_t *mctx,
- re_dfastate_t *state) internal_function;
+ re_dfastate_t *state);
static re_dfastate_t *merge_state_with_log (reg_errcode_t *err,
re_match_context_t *mctx,
- re_dfastate_t *next_state)
- internal_function;
+ re_dfastate_t *next_state);
static reg_errcode_t check_subexp_matching_top (re_match_context_t *mctx,
re_node_set *cur_nodes,
- Idx str_idx) internal_function;
+ Idx str_idx);
#if 0
static re_dfastate_t *transit_state_sb (reg_errcode_t *err,
re_match_context_t *mctx,
- re_dfastate_t *pstate)
- internal_function;
+ re_dfastate_t *pstate);
#endif
#ifdef RE_ENABLE_I18N
static reg_errcode_t transit_state_mb (re_match_context_t *mctx,
- re_dfastate_t *pstate)
- internal_function;
+ re_dfastate_t *pstate);
#endif /* RE_ENABLE_I18N */
static reg_errcode_t transit_state_bkref (re_match_context_t *mctx,
- const re_node_set *nodes)
- internal_function;
+ const re_node_set *nodes);
static reg_errcode_t get_subexp (re_match_context_t *mctx,
- Idx bkref_node, Idx bkref_str_idx)
- internal_function;
+ Idx bkref_node, Idx bkref_str_idx);
static reg_errcode_t get_subexp_sub (re_match_context_t *mctx,
const re_sub_match_top_t *sub_top,
re_sub_match_last_t *sub_last,
- Idx bkref_node, Idx bkref_str)
- internal_function;
+ Idx bkref_node, Idx bkref_str);
static Idx find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes,
- Idx subexp_idx, int type) internal_function;
+ Idx subexp_idx, int type);
static reg_errcode_t check_arrival (re_match_context_t *mctx,
state_array_t *path, Idx top_node,
Idx top_str, Idx last_node, Idx last_str,
- int type) internal_function;
+ int type);
static reg_errcode_t check_arrival_add_next_nodes (re_match_context_t *mctx,
Idx str_idx,
re_node_set *cur_nodes,
- re_node_set *next_nodes)
- internal_function;
+ re_node_set *next_nodes);
static reg_errcode_t check_arrival_expand_ecl (const re_dfa_t *dfa,
re_node_set *cur_nodes,
- Idx ex_subexp, int type)
- internal_function;
+ Idx ex_subexp, int type);
static reg_errcode_t check_arrival_expand_ecl_sub (const re_dfa_t *dfa,
re_node_set *dst_nodes,
Idx target, Idx ex_subexp,
- int type) internal_function;
+ int type);
static reg_errcode_t expand_bkref_cache (re_match_context_t *mctx,
re_node_set *cur_nodes, Idx cur_str,
- Idx subexp_num, int type)
- internal_function;
-static bool build_trtable (const re_dfa_t *dfa,
- re_dfastate_t *state) internal_function;
+ Idx subexp_num, int type);
+static bool build_trtable (const re_dfa_t *dfa, re_dfastate_t *state);
#ifdef RE_ENABLE_I18N
static int check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
- const re_string_t *input, Idx idx)
- internal_function;
+ const re_string_t *input, Idx idx);
# ifdef _LIBC
static unsigned int find_collation_sequence_value (const unsigned char *mbs,
- size_t name_len)
- internal_function;
+ size_t name_len);
# endif /* _LIBC */
#endif /* RE_ENABLE_I18N */
static Idx group_nodes_into_DFAstates (const re_dfa_t *dfa,
const re_dfastate_t *state,
re_node_set *states_node,
- bitset_t *states_ch) internal_function;
+ bitset_t *states_ch);
static bool check_node_accept (const re_match_context_t *mctx,
- const re_token_t *node, Idx idx)
- internal_function;
-static reg_errcode_t extend_buffers (re_match_context_t *mctx, int min_len)
- internal_function;
+ const re_token_t *node, Idx idx);
+static reg_errcode_t extend_buffers (re_match_context_t *mctx, int min_len);
/* Entry point for POSIX code. */
@@ -252,6 +222,8 @@ regexec (const regex_t *_Restrict_ preg, const char *_Restrict_ string,
}
#ifdef _LIBC
+libc_hidden_def (__regexec)
+
# include <shlib-compat.h>
versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4);
@@ -346,7 +318,6 @@ weak_alias (__re_search_2, re_search_2)
#endif
static regoff_t
-internal_function
re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1,
Idx length1, const char *string2, Idx length2, Idx start,
regoff_t range, struct re_registers *regs,
@@ -395,7 +366,6 @@ re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1,
otherwise the position of the match is returned. */
static regoff_t
-internal_function
re_search_stub (struct re_pattern_buffer *bufp, const char *string, Idx length,
Idx start, regoff_t range, Idx stop, struct re_registers *regs,
bool ret_len)
@@ -485,7 +455,6 @@ re_search_stub (struct re_pattern_buffer *bufp, const char *string, Idx length,
}
static unsigned
-internal_function
re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs,
int regs_allocated)
{
@@ -611,7 +580,7 @@ re_exec (const char *s)
(0 <= LAST_START && LAST_START <= LENGTH) */
static reg_errcode_t
-__attribute_warn_unused_result__ internal_function
+__attribute_warn_unused_result__
re_search_internal (const regex_t *preg, const char *string, Idx length,
Idx start, Idx last_start, Idx stop, size_t nmatch,
regmatch_t pmatch[], int eflags)
@@ -945,7 +914,7 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
}
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
prune_impossible_nodes (re_match_context_t *mctx)
{
const re_dfa_t *const dfa = mctx->dfa;
@@ -1041,7 +1010,7 @@ prune_impossible_nodes (re_match_context_t *mctx)
since initial states may have constraints like "\<", "^", etc.. */
static inline re_dfastate_t *
-__attribute__ ((always_inline)) internal_function
+__attribute__ ((always_inline))
acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx,
Idx idx)
{
@@ -1083,7 +1052,7 @@ acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx,
index of the buffer. */
static Idx
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
check_matching (re_match_context_t *mctx, bool fl_longest_match,
Idx *p_match_first)
{
@@ -1216,7 +1185,6 @@ check_matching (re_match_context_t *mctx, bool fl_longest_match,
/* Check NODE match the current context. */
static bool
-internal_function
check_halt_node_context (const re_dfa_t *dfa, Idx node, unsigned int context)
{
re_token_type_t type = dfa->nodes[node].type;
@@ -1235,7 +1203,6 @@ check_halt_node_context (const re_dfa_t *dfa, Idx node, unsigned int context)
match the context, return the node. */
static Idx
-internal_function
check_halt_state_context (const re_match_context_t *mctx,
const re_dfastate_t *state, Idx idx)
{
@@ -1257,7 +1224,6 @@ check_halt_state_context (const re_match_context_t *mctx,
return -1 in case of errors. */
static Idx
-internal_function
proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs,
Idx *pidx, Idx node, re_node_set *eps_via_nodes,
struct re_fail_stack_t *fs)
@@ -1359,7 +1325,7 @@ proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs,
}
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node,
Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes)
{
@@ -1368,8 +1334,8 @@ push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node,
if (fs->num == fs->alloc)
{
struct re_fail_stack_ent_t *new_array;
- new_array = realloc (fs->stack, (sizeof (struct re_fail_stack_ent_t)
- * fs->alloc * 2));
+ new_array = re_realloc (fs->stack, struct re_fail_stack_ent_t,
+ fs->alloc * 2);
if (new_array == NULL)
return REG_ESPACE;
fs->alloc *= 2;
@@ -1386,7 +1352,6 @@ push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node,
}
static Idx
-internal_function
pop_fail_stack (struct re_fail_stack_t *fs, Idx *pidx, Idx nregs,
regmatch_t *regs, re_node_set *eps_via_nodes)
{
@@ -1406,7 +1371,7 @@ pop_fail_stack (struct re_fail_stack_t *fs, Idx *pidx, Idx nregs,
pmatch[i].rm_so == pmatch[i].rm_eo == -1 for 0 < i < nmatch. */
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch,
regmatch_t *pmatch, bool fl_backtrack)
{
@@ -1513,7 +1478,6 @@ set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch,
}
static reg_errcode_t
-internal_function
free_fail_stack_return (struct re_fail_stack_t *fs)
{
if (fs)
@@ -1530,7 +1494,6 @@ free_fail_stack_return (struct re_fail_stack_t *fs)
}
static void
-internal_function
update_regs (const re_dfa_t *dfa, regmatch_t *pmatch,
regmatch_t *prev_idx_match, Idx cur_node, Idx cur_idx, Idx nmatch)
{
@@ -1602,7 +1565,6 @@ update_regs (const re_dfa_t *dfa, regmatch_t *pmatch,
((state) != NULL && re_node_set_contains (&(state)->nodes, node))
static reg_errcode_t
-internal_function
sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx)
{
reg_errcode_t err;
@@ -1660,7 +1622,7 @@ sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx)
}
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx,
Idx str_idx, re_node_set *cur_dest)
{
@@ -1722,7 +1684,6 @@ build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx,
/* Helper functions. */
static reg_errcode_t
-internal_function
clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx)
{
Idx top = mctx->state_log_top;
@@ -1748,7 +1709,6 @@ clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx)
}
static reg_errcode_t
-internal_function
merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst,
re_dfastate_t **src, Idx num)
{
@@ -1775,7 +1735,6 @@ merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst,
}
static reg_errcode_t
-internal_function
update_cur_sifted_state (const re_match_context_t *mctx,
re_sift_context_t *sctx, Idx str_idx,
re_node_set *dest_nodes)
@@ -1823,7 +1782,7 @@ update_cur_sifted_state (const re_match_context_t *mctx,
}
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes,
const re_node_set *candidates)
{
@@ -1852,7 +1811,6 @@ add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes,
}
static reg_errcode_t
-internal_function
sub_epsilon_src_nodes (const re_dfa_t *dfa, Idx node, re_node_set *dest_nodes,
const re_node_set *candidates)
{
@@ -1901,7 +1859,6 @@ sub_epsilon_src_nodes (const re_dfa_t *dfa, Idx node, re_node_set *dest_nodes,
}
static bool
-internal_function
check_dst_limits (const re_match_context_t *mctx, const re_node_set *limits,
Idx dst_node, Idx dst_idx, Idx src_node, Idx src_idx)
{
@@ -1937,7 +1894,6 @@ check_dst_limits (const re_match_context_t *mctx, const re_node_set *limits,
}
static int
-internal_function
check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries,
Idx subexp_idx, Idx from_node, Idx bkref_idx)
{
@@ -2019,7 +1975,6 @@ check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries,
}
static int
-internal_function
check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit,
Idx subexp_idx, Idx from_node, Idx str_idx,
Idx bkref_idx)
@@ -2049,7 +2004,6 @@ check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit,
which are against limitations from DEST_NODES. */
static reg_errcode_t
-internal_function
check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes,
const re_node_set *candidates, re_node_set *limits,
struct re_backref_cache_entry *bkref_ents, Idx str_idx)
@@ -2137,7 +2091,7 @@ check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes,
}
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx,
Idx str_idx, const re_node_set *candidates)
{
@@ -2237,7 +2191,6 @@ sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx,
#ifdef RE_ENABLE_I18N
static int
-internal_function
sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx,
Idx node_idx, Idx str_idx, Idx max_str_idx)
{
@@ -2267,7 +2220,7 @@ sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx,
update the destination of STATE_LOG. */
static re_dfastate_t *
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
transit_state (reg_errcode_t *err, re_match_context_t *mctx,
re_dfastate_t *state)
{
@@ -2325,7 +2278,6 @@ transit_state (reg_errcode_t *err, re_match_context_t *mctx,
/* Update the state_log if we need */
static re_dfastate_t *
-internal_function
merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx,
re_dfastate_t *next_state)
{
@@ -2404,7 +2356,6 @@ merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx,
multi-byte match, then look in the log for a state
from which to restart matching. */
static re_dfastate_t *
-internal_function
find_recover_state (reg_errcode_t *err, re_match_context_t *mctx)
{
re_dfastate_t *cur_state;
@@ -2435,7 +2386,6 @@ find_recover_state (reg_errcode_t *err, re_match_context_t *mctx)
corresponding back references. */
static reg_errcode_t
-internal_function
check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes,
Idx str_idx)
{
@@ -2508,7 +2458,6 @@ transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx,
#ifdef RE_ENABLE_I18N
static reg_errcode_t
-internal_function
transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate)
{
const re_dfa_t *const dfa = mctx->dfa;
@@ -2579,7 +2528,6 @@ transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate)
#endif /* RE_ENABLE_I18N */
static reg_errcode_t
-internal_function
transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
{
const re_dfa_t *const dfa = mctx->dfa;
@@ -2693,7 +2641,7 @@ transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
delay these checking for prune_impossible_nodes(). */
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx)
{
const re_dfa_t *const dfa = mctx->dfa;
@@ -2843,7 +2791,6 @@ get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx)
and SUB_LAST. */
static reg_errcode_t
-internal_function
get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top,
re_sub_match_last_t *sub_last, Idx bkref_node, Idx bkref_str)
{
@@ -2872,7 +2819,6 @@ get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top,
E.g. RE: (a){2} */
static Idx
-internal_function
find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes,
Idx subexp_idx, int type)
{
@@ -2894,7 +2840,7 @@ find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes,
Return REG_NOERROR if it can arrive, or REG_NOMATCH otherwise. */
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
Idx top_str, Idx last_node, Idx last_str, int type)
{
@@ -3059,7 +3005,7 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
Can't we unify them? */
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx,
re_node_set *cur_nodes, re_node_set *next_nodes)
{
@@ -3140,7 +3086,6 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx,
*/
static reg_errcode_t
-internal_function
check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes,
Idx ex_subexp, int type)
{
@@ -3193,7 +3138,7 @@ check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes,
problematic append it to DST_NODES. */
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes,
Idx target, Idx ex_subexp, int type)
{
@@ -3238,7 +3183,7 @@ check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes,
in MCTX->BKREF_ENTS. */
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes,
Idx cur_str, Idx subexp_num, int type)
{
@@ -3327,7 +3272,6 @@ expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes,
Return true if successful. */
static bool
-internal_function
build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
{
reg_errcode_t err;
@@ -3375,7 +3319,7 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
if (BE (ndests <= 0, 0))
{
if (dests_node_malloced)
- free (dests_alloc);
+ re_free (dests_alloc);
/* Return false in case of an error, true otherwise. */
if (ndests == 0)
{
@@ -3405,18 +3349,17 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
alloca (ndests * 3 * sizeof (re_dfastate_t *));
else
{
- dest_states = (re_dfastate_t **)
- malloc (ndests * 3 * sizeof (re_dfastate_t *));
+ dest_states = re_malloc (re_dfastate_t *, ndests * 3);
if (BE (dest_states == NULL, 0))
{
out_free:
if (dest_states_malloced)
- free (dest_states);
+ re_free (dest_states);
re_node_set_free (&follows);
for (i = 0; i < ndests; ++i)
re_node_set_free (dests_node + i);
if (dests_node_malloced)
- free (dests_alloc);
+ re_free (dests_alloc);
return false;
}
dest_states_malloced = true;
@@ -3547,14 +3490,14 @@ out_free:
}
if (dest_states_malloced)
- free (dest_states);
+ re_free (dest_states);
re_node_set_free (&follows);
for (i = 0; i < ndests; ++i)
re_node_set_free (dests_node + i);
if (dests_node_malloced)
- free (dests_alloc);
+ re_free (dests_alloc);
return true;
}
@@ -3565,7 +3508,6 @@ out_free:
to DEST_CH[i]. This function return the number of destinations. */
static Idx
-internal_function
group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
re_node_set *dests_node, bitset_t *dests_ch)
{
@@ -3762,7 +3704,6 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
# endif
static int
-internal_function
check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
const re_string_t *input, Idx str_idx)
{
@@ -3992,7 +3933,6 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
# ifdef _LIBC
static unsigned int
-internal_function
find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len)
{
uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
@@ -4056,7 +3996,6 @@ find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len)
byte of the INPUT. */
static bool
-internal_function
check_node_accept (const re_match_context_t *mctx, const re_token_t *node,
Idx idx)
{
@@ -4078,7 +4017,7 @@ check_node_accept (const re_match_context_t *mctx, const re_token_t *node,
case OP_UTF8_PERIOD:
if (ch >= ASCII_CHARS)
return false;
- /* FALLTHROUGH */
+ FALLTHROUGH;
#endif
case OP_PERIOD:
if ((ch == '\n' && !(mctx->dfa->syntax & RE_DOT_NEWLINE))
@@ -4106,7 +4045,7 @@ check_node_accept (const re_match_context_t *mctx, const re_token_t *node,
/* Extend the buffers, if the buffers have run out. */
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
extend_buffers (re_match_context_t *mctx, int min_len)
{
reg_errcode_t ret;
@@ -4172,7 +4111,7 @@ extend_buffers (re_match_context_t *mctx, int min_len)
/* Initialize MCTX. */
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
match_ctx_init (re_match_context_t *mctx, int eflags, Idx n)
{
mctx->eflags = eflags;
@@ -4207,7 +4146,6 @@ match_ctx_init (re_match_context_t *mctx, int eflags, Idx n)
of the input, or changes the input string. */
static void
-internal_function
match_ctx_clean (re_match_context_t *mctx)
{
Idx st_idx;
@@ -4227,7 +4165,7 @@ match_ctx_clean (re_match_context_t *mctx)
re_free (top->path->array);
re_free (top->path);
}
- free (top);
+ re_free (top);
}
mctx->nsub_tops = 0;
@@ -4237,7 +4175,6 @@ match_ctx_clean (re_match_context_t *mctx)
/* Free all the memory associated with MCTX. */
static void
-internal_function
match_ctx_free (re_match_context_t *mctx)
{
/* First, free all the memory associated with MCTX->SUB_TOPS. */
@@ -4252,7 +4189,7 @@ match_ctx_free (re_match_context_t *mctx)
*/
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from,
Idx to)
{
@@ -4301,7 +4238,6 @@ match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from,
found. Note that MCTX->BKREF_ENTS is already sorted by MCTX->STR_IDX. */
static Idx
-internal_function
search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx)
{
Idx left, right, mid, last;
@@ -4324,7 +4260,7 @@ search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx)
at STR_IDX. */
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx)
{
#ifdef DEBUG
@@ -4354,7 +4290,6 @@ match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx)
at STR_IDX, whose corresponding OP_OPEN_SUBEXP is SUB_TOP. */
static re_sub_match_last_t *
-internal_function
match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx)
{
re_sub_match_last_t *new_entry;
@@ -4381,7 +4316,6 @@ match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx)
}
static void
-internal_function
sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts,
re_dfastate_t **limited_sts, Idx last_node, Idx last_str_idx)
{
diff --git a/lib/rename.c b/lib/rename.c
index b67059f..53fa5fc 100644
--- a/lib/rename.c
+++ b/lib/rename.c
@@ -1,6 +1,6 @@
/* Work around rename bugs in some systems.
- Copyright (C) 2001-2003, 2005-2006, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2006, 2009-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Volker Borchert, Eric Blake. */
diff --git a/lib/rmdir.c b/lib/rmdir.c
index 864c795..7dc7aec 100644
--- a/lib/rmdir.c
+++ b/lib/rmdir.c
@@ -1,6 +1,6 @@
/* Work around rmdir bugs.
- Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2017 Free Software
+ Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2018 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -14,7 +14,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/same-inode.h b/lib/same-inode.h
index 7cece6d..ad8f7d7 100644
--- a/lib/same-inode.h
+++ b/lib/same-inode.h
@@ -1,6 +1,6 @@
/* Determine whether two stat buffers are known to refer to the same file.
- Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2018 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
@@ -13,21 +13,31 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef SAME_INODE_H
# define SAME_INODE_H 1
-# ifdef __VMS
+# include <sys/types.h>
+
+# if defined __VMS && __CRTL_VER < 80200000
# 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__
-/* On MinGW, struct stat lacks necessary info, so always return 0.
- Callers can use !a.st_ino to deduce that the information is unknown. */
-# define SAME_INODE(a, b) 0
+ /* 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/lib/se-selinux.in.h b/lib/se-selinux.in.h
index cd19951..f7610b3 100644
--- a/lib/se-selinux.in.h
+++ b/lib/se-selinux.in.h
@@ -1,5 +1,5 @@
/* Replacement <selinux/selinux.h> for platforms that lack it.
- Copyright (C) 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 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
@@ -12,28 +12,27 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
-#ifndef _@GUARD_PREFIX@_SELINUX_SELINUX_H
-# define _@GUARD_PREFIX@_SELINUX_SELINUX_H
-
-# if __GNUC__ >= 3
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
-# endif
+#endif
@PRAGMA_COLUMNS@
-# if HAVE_SELINUX_SELINUX_H
+#if HAVE_SELINUX_SELINUX_H
#@INCLUDE_NEXT@ @NEXT_SELINUX_SELINUX_H@
-# else
+#else
+# if !defined _@GUARD_PREFIX@_SELINUX_SELINUX_H
+# define _@GUARD_PREFIX@_SELINUX_SELINUX_H
# include <sys/types.h>
# include <errno.h>
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
+# ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+# endif
_GL_INLINE_HEADER_BEGIN
# ifndef SE_SELINUX_INLINE
# define SE_SELINUX_INLINE _GL_INLINE
@@ -114,10 +113,7 @@ matchpathcon_init_prefix (char const *path _GL_UNUSED_PARAMETER,
# define GNULIB_defined_security_types 1
# endif
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
-_GL_INLINE_HEADER_BEGIN
+_GL_INLINE_HEADER_END
# endif
-#endif /* _@GUARD_PREFIX@_SELINUX_SELINUX_H */
+#endif
diff --git a/lib/secure_getenv.c b/lib/secure_getenv.c
deleted file mode 100644
index df53dea..0000000
--- a/lib/secure_getenv.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Look up an environment variable, returning NULL in insecure situations.
-
- Copyright 2013-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 <stdlib.h>
-
-#if !HAVE___SECURE_GETENV
-# if HAVE_ISSETUGID || (HAVE_GETUID && HAVE_GETEUID && HAVE_GETGID && HAVE_GETEGID)
-# include <unistd.h>
-# endif
-#endif
-
-char *
-secure_getenv (char const *name)
-{
-#if HAVE___SECURE_GETENV /* glibc */
- return __secure_getenv (name);
-#elif HAVE_ISSETUGID /* OS X, FreeBSD, NetBSD, OpenBSD */
- if (issetugid ())
- return NULL;
- return getenv (name);
-#elif HAVE_GETUID && HAVE_GETEUID && HAVE_GETGID && HAVE_GETEGID /* other Unix */
- if (geteuid () != getuid () || getegid () != getgid ())
- return NULL;
- return getenv (name);
-#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* native Windows */
- /* On native Windows, there is no such concept as setuid or setgid binaries.
- - Programs launched as system services have high privileges, but they don't
- inherit environment variables from a user.
- - Programs launched by a user with "Run as Administrator" have high
- privileges and use the environment variables, but the user has been asked
- whether he agrees.
- - Programs launched by a user without "Run as Administrator" cannot gain
- high privileges, therefore there is no risk. */
- return getenv (name);
-#else
- return NULL;
-#endif
-}
diff --git a/lib/set-acl.c b/lib/set-acl.c
index aad7c38..830beb1 100644
--- a/lib/set-acl.c
+++ b/lib/set-acl.c
@@ -1,6 +1,6 @@
/* set-acl.c - set access control list equivalent to a mode
- Copyright (C) 2002-2003, 2005-2017 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2018 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
@@ -13,7 +13,7 @@
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/>.
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
Written by Paul Eggert and Andreas Gruenbacher, and Bruno Haible. */
diff --git a/lib/set-permissions.c b/lib/set-permissions.c
index 75bb2dc..4b7371c 100644
--- a/lib/set-permissions.c
+++ b/lib/set-permissions.c
@@ -1,6 +1,6 @@
/* Set permissions of a file. -*- coding: utf-8 -*-
- Copyright (C) 2002-2003, 2005-2017 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2018 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
@@ -13,7 +13,7 @@
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/>.
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
Written by Paul Eggert, Andreas Grünbacher, and Bruno Haible. */
diff --git a/lib/stat-time.c b/lib/stat-time.c
new file mode 100644
index 0000000..81b83dd
--- /dev/null
+++ b/lib/stat-time.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_STAT_TIME_INLINE _GL_EXTERN_INLINE
+#include "stat-time.h"
diff --git a/lib/stat-time.h b/lib/stat-time.h
new file mode 100644
index 0000000..104f537
--- /dev/null
+++ b/lib/stat-time.h
@@ -0,0 +1,252 @@
+/* stat-related time functions.
+
+ Copyright (C) 2005, 2007, 2009-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert. */
+
+#ifndef STAT_TIME_H
+#define STAT_TIME_H 1
+
+#include "intprops.h"
+
+#include <errno.h>
+#include <stddef.h>
+#include <sys/stat.h>
+#include <time.h>
+
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_STAT_TIME_INLINE
+# define _GL_STAT_TIME_INLINE _GL_INLINE
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* STAT_TIMESPEC (ST, ST_XTIM) is the ST_XTIM member for *ST of type
+ struct timespec, if available. If not, then STAT_TIMESPEC_NS (ST,
+ ST_XTIM) is the nanosecond component of the ST_XTIM member for *ST,
+ if available. ST_XTIM can be st_atim, st_ctim, st_mtim, or st_birthtim
+ for access, status change, data modification, or birth (creation)
+ time respectively.
+
+ These macros are private to stat-time.h. */
+#if _GL_WINDOWS_STAT_TIMESPEC || defined HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC
+# if _GL_WINDOWS_STAT_TIMESPEC || defined TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC
+# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim)
+# else
+# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.tv_nsec)
+# endif
+#elif defined HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC
+# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim##espec)
+#elif defined HAVE_STRUCT_STAT_ST_ATIMENSEC
+# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim##ensec)
+#elif defined HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC
+# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.st__tim.tv_nsec)
+#endif
+
+/* Return the nanosecond component of *ST's access time. */
+_GL_STAT_TIME_INLINE long int _GL_ATTRIBUTE_PURE
+get_stat_atime_ns (struct stat const *st)
+{
+# if defined STAT_TIMESPEC
+ return STAT_TIMESPEC (st, st_atim).tv_nsec;
+# elif defined STAT_TIMESPEC_NS
+ return STAT_TIMESPEC_NS (st, st_atim);
+# else
+ return 0;
+# endif
+}
+
+/* Return the nanosecond component of *ST's status change time. */
+_GL_STAT_TIME_INLINE long int _GL_ATTRIBUTE_PURE
+get_stat_ctime_ns (struct stat const *st)
+{
+# if defined STAT_TIMESPEC
+ return STAT_TIMESPEC (st, st_ctim).tv_nsec;
+# elif defined STAT_TIMESPEC_NS
+ return STAT_TIMESPEC_NS (st, st_ctim);
+# else
+ return 0;
+# endif
+}
+
+/* Return the nanosecond component of *ST's data modification time. */
+_GL_STAT_TIME_INLINE long int _GL_ATTRIBUTE_PURE
+get_stat_mtime_ns (struct stat const *st)
+{
+# if defined STAT_TIMESPEC
+ return STAT_TIMESPEC (st, st_mtim).tv_nsec;
+# elif defined STAT_TIMESPEC_NS
+ return STAT_TIMESPEC_NS (st, st_mtim);
+# else
+ return 0;
+# endif
+}
+
+/* Return the nanosecond component of *ST's birth time. */
+_GL_STAT_TIME_INLINE long int _GL_ATTRIBUTE_PURE
+get_stat_birthtime_ns (struct stat const *st _GL_UNUSED)
+{
+# if defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC
+ return STAT_TIMESPEC (st, st_birthtim).tv_nsec;
+# elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC
+ return STAT_TIMESPEC_NS (st, st_birthtim);
+# else
+ return 0;
+# endif
+}
+
+/* Return *ST's access time. */
+_GL_STAT_TIME_INLINE struct timespec _GL_ATTRIBUTE_PURE
+get_stat_atime (struct stat const *st)
+{
+#ifdef STAT_TIMESPEC
+ return STAT_TIMESPEC (st, st_atim);
+#else
+ struct timespec t;
+ t.tv_sec = st->st_atime;
+ t.tv_nsec = get_stat_atime_ns (st);
+ return t;
+#endif
+}
+
+/* Return *ST's status change time. */
+_GL_STAT_TIME_INLINE struct timespec _GL_ATTRIBUTE_PURE
+get_stat_ctime (struct stat const *st)
+{
+#ifdef STAT_TIMESPEC
+ return STAT_TIMESPEC (st, st_ctim);
+#else
+ struct timespec t;
+ t.tv_sec = st->st_ctime;
+ t.tv_nsec = get_stat_ctime_ns (st);
+ return t;
+#endif
+}
+
+/* Return *ST's data modification time. */
+_GL_STAT_TIME_INLINE struct timespec _GL_ATTRIBUTE_PURE
+get_stat_mtime (struct stat const *st)
+{
+#ifdef STAT_TIMESPEC
+ return STAT_TIMESPEC (st, st_mtim);
+#else
+ struct timespec t;
+ t.tv_sec = st->st_mtime;
+ t.tv_nsec = get_stat_mtime_ns (st);
+ return t;
+#endif
+}
+
+/* Return *ST's birth time, if available; otherwise return a value
+ with tv_sec and tv_nsec both equal to -1. */
+_GL_STAT_TIME_INLINE struct timespec _GL_ATTRIBUTE_PURE
+get_stat_birthtime (struct stat const *st _GL_UNUSED)
+{
+ struct timespec t;
+
+#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \
+ || defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC)
+ t = STAT_TIMESPEC (st, st_birthtim);
+#elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC
+ t.tv_sec = st->st_birthtime;
+ t.tv_nsec = st->st_birthtimensec;
+#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* Native Windows platforms (but not Cygwin) put the "file creation
+ time" in st_ctime (!). See
+ <https://msdn.microsoft.com/en-us/library/14h5k7ff(VS.80).aspx>. */
+# if _GL_WINDOWS_STAT_TIMESPEC
+ t = st->st_ctim;
+# else
+ t.tv_sec = st->st_ctime;
+ t.tv_nsec = 0;
+# endif
+#else
+ /* Birth time is not supported. */
+ t.tv_sec = -1;
+ t.tv_nsec = -1;
+#endif
+
+#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \
+ || defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC \
+ || defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC)
+ /* FreeBSD and NetBSD sometimes signal the absence of knowledge by
+ using zero. Attempt to work around this problem. Alas, this can
+ report failure even for valid timestamps. Also, NetBSD
+ sometimes returns junk in the birth time fields; work around this
+ bug if it is detected. */
+ if (! (t.tv_sec && 0 <= t.tv_nsec && t.tv_nsec < 1000000000))
+ {
+ t.tv_sec = -1;
+ t.tv_nsec = -1;
+ }
+#endif
+
+ return t;
+}
+
+/* If a stat-like function returned RESULT, normalize the timestamps
+ in *ST, in case this platform suffers from the Solaris 11 bug where
+ tv_nsec might be negative. Return the adjusted RESULT, setting
+ errno to EOVERFLOW if normalization overflowed. This function
+ is intended to be private to this .h file. */
+_GL_STAT_TIME_INLINE int
+stat_time_normalize (int result, struct stat *st _GL_UNUSED)
+{
+#if defined __sun && defined STAT_TIMESPEC
+ if (result == 0)
+ {
+ long int timespec_resolution = 1000000000;
+ short int const ts_off[] = { offsetof (struct stat, st_atim),
+ offsetof (struct stat, st_mtim),
+ offsetof (struct stat, st_ctim) };
+ int i;
+ for (i = 0; i < sizeof ts_off / sizeof *ts_off; i++)
+ {
+ struct timespec *ts = (struct timespec *) ((char *) st + ts_off[i]);
+ long int q = ts->tv_nsec / timespec_resolution;
+ long int r = ts->tv_nsec % timespec_resolution;
+ if (r < 0)
+ {
+ r += timespec_resolution;
+ q--;
+ }
+ ts->tv_nsec = r;
+ /* Overflow is possible, as Solaris 11 stat can yield
+ tv_sec == TYPE_MINIMUM (time_t) && tv_nsec == -1000000000.
+ INT_ADD_WRAPV is OK, since time_t is signed on Solaris. */
+ if (INT_ADD_WRAPV (q, ts->tv_sec, &ts->tv_sec))
+ {
+ errno = EOVERFLOW;
+ return -1;
+ }
+ }
+ }
+#endif
+ return result;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+_GL_INLINE_HEADER_END
+
+#endif
diff --git a/lib/stat-w32.c b/lib/stat-w32.c
new file mode 100644
index 0000000..5d76a46
--- /dev/null
+++ b/lib/stat-w32.c
@@ -0,0 +1,421 @@
+/* Core of implementation of fstat and stat for native Windows.
+ Copyright (C) 2017-2018 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 <https://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible. */
+
+#include <config.h>
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+/* Ensure that <windows.h> defines FILE_ID_INFO. */
+#undef _WIN32_WINNT
+#define _WIN32_WINNT _WIN32_WINNT_WIN8
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <limits.h>
+#include <string.h>
+#include <unistd.h>
+#include <windows.h>
+
+/* Specification. */
+#include "stat-w32.h"
+
+#include "pathmax.h"
+#include "verify.h"
+
+#if _GL_WINDOWS_STAT_INODES == 2
+/* GetFileInformationByHandleEx was introduced only in Windows Vista. */
+typedef DWORD (WINAPI * GetFileInformationByHandleExFuncType) (HANDLE hFile,
+ FILE_INFO_BY_HANDLE_CLASS fiClass,
+ LPVOID lpBuffer,
+ DWORD dwBufferSize);
+static GetFileInformationByHandleExFuncType GetFileInformationByHandleExFunc = NULL;
+#endif
+/* GetFinalPathNameByHandle was introduced only in Windows Vista. */
+typedef DWORD (WINAPI * GetFinalPathNameByHandleFuncType) (HANDLE hFile,
+ LPTSTR lpFilePath,
+ DWORD lenFilePath,
+ DWORD dwFlags);
+static GetFinalPathNameByHandleFuncType GetFinalPathNameByHandleFunc = NULL;
+static BOOL initialized = FALSE;
+
+static void
+initialize (void)
+{
+ HMODULE kernel32 = LoadLibrary ("kernel32.dll");
+ if (kernel32 != NULL)
+ {
+#if _GL_WINDOWS_STAT_INODES == 2
+ GetFileInformationByHandleExFunc =
+ (GetFileInformationByHandleExFuncType) GetProcAddress (kernel32, "GetFileInformationByHandleEx");
+#endif
+ GetFinalPathNameByHandleFunc =
+ (GetFinalPathNameByHandleFuncType) GetProcAddress (kernel32, "GetFinalPathNameByHandleA");
+ }
+ initialized = TRUE;
+}
+
+/* Converts a FILETIME to GMT time since 1970-01-01 00:00:00. */
+#if _GL_WINDOWS_STAT_TIMESPEC
+struct timespec
+_gl_convert_FILETIME_to_timespec (const FILETIME *ft)
+{
+ struct timespec result;
+ /* FILETIME: <https://msdn.microsoft.com/en-us/library/ms724284.aspx> */
+ unsigned long long since_1601 =
+ ((unsigned long long) ft->dwHighDateTime << 32)
+ | (unsigned long long) ft->dwLowDateTime;
+ if (since_1601 == 0)
+ {
+ result.tv_sec = 0;
+ result.tv_nsec = 0;
+ }
+ else
+ {
+ /* Between 1601-01-01 and 1970-01-01 there were 280 normal years and 89
+ leap years, in total 134774 days. */
+ unsigned long long since_1970 =
+ since_1601 - (unsigned long long) 134774 * (unsigned long long) 86400 * (unsigned long long) 10000000;
+ result.tv_sec = since_1970 / (unsigned long long) 10000000;
+ result.tv_nsec = (unsigned long) (since_1970 % (unsigned long long) 10000000) * 100;
+ }
+ return result;
+}
+#else
+time_t
+_gl_convert_FILETIME_to_POSIX (const FILETIME *ft)
+{
+ /* FILETIME: <https://msdn.microsoft.com/en-us/library/ms724284.aspx> */
+ unsigned long long since_1601 =
+ ((unsigned long long) ft->dwHighDateTime << 32)
+ | (unsigned long long) ft->dwLowDateTime;
+ if (since_1601 == 0)
+ return 0;
+ else
+ {
+ /* Between 1601-01-01 and 1970-01-01 there were 280 normal years and 89
+ leap years, in total 134774 days. */
+ unsigned long long since_1970 =
+ since_1601 - (unsigned long long) 134774 * (unsigned long long) 86400 * (unsigned long long) 10000000;
+ return since_1970 / (unsigned long long) 10000000;
+ }
+}
+#endif
+
+/* Fill *BUF with information about the file designated by H.
+ PATH is the file name, if known, otherwise NULL.
+ Return 0 if successful, or -1 with errno set upon failure. */
+int
+_gl_fstat_by_handle (HANDLE h, const char *path, struct stat *buf)
+{
+ /* GetFileType
+ <https://msdn.microsoft.com/en-us/library/aa364960.aspx> */
+ DWORD type = GetFileType (h);
+ if (type == FILE_TYPE_DISK)
+ {
+ if (!initialized)
+ initialize ();
+
+ /* st_mode can be determined through
+ GetFileAttributesEx
+ <https://msdn.microsoft.com/en-us/library/aa364946.aspx>
+ <https://msdn.microsoft.com/en-us/library/aa365739.aspx>
+ or through
+ GetFileInformationByHandle
+ <https://msdn.microsoft.com/en-us/library/aa364952.aspx>
+ <https://msdn.microsoft.com/en-us/library/aa363788.aspx>
+ or through
+ GetFileInformationByHandleEx with argument FileBasicInfo
+ <https://msdn.microsoft.com/en-us/library/aa364953.aspx>
+ <https://msdn.microsoft.com/en-us/library/aa364217.aspx>
+ The latter requires -D_WIN32_WINNT=_WIN32_WINNT_VISTA or higher. */
+ BY_HANDLE_FILE_INFORMATION info;
+ if (! GetFileInformationByHandle (h, &info))
+ goto failed;
+
+ /* Test for error conditions before starting to fill *buf. */
+ if (sizeof (buf->st_size) <= 4 && info.nFileSizeHigh > 0)
+ {
+ errno = EOVERFLOW;
+ return -1;
+ }
+
+#if _GL_WINDOWS_STAT_INODES
+ /* st_ino can be determined through
+ GetFileInformationByHandle
+ <https://msdn.microsoft.com/en-us/library/aa364952.aspx>
+ <https://msdn.microsoft.com/en-us/library/aa363788.aspx>
+ as 64 bits, or through
+ GetFileInformationByHandleEx with argument FileIdInfo
+ <https://msdn.microsoft.com/en-us/library/aa364953.aspx>
+ <https://msdn.microsoft.com/en-us/library/hh802691.aspx>
+ as 128 bits.
+ The latter requires -D_WIN32_WINNT=_WIN32_WINNT_WIN8 or higher. */
+ /* Experiments show that GetFileInformationByHandleEx does not provide
+ much more information than GetFileInformationByHandle:
+ * The dwVolumeSerialNumber from GetFileInformationByHandle is equal
+ to the low 32 bits of the 64-bit VolumeSerialNumber from
+ GetFileInformationByHandleEx, and is apparently sufficient for
+ identifying the device.
+ * The nFileIndex from GetFileInformationByHandle is equal to the low
+ 64 bits of the 128-bit FileId from GetFileInformationByHandleEx,
+ and the high 64 bits of this 128-bit FileId are zero.
+ * On a FAT file system, GetFileInformationByHandleEx fails with error
+ ERROR_INVALID_PARAMETER, whereas GetFileInformationByHandle
+ succeeds.
+ * On a CIFS/SMB file system, GetFileInformationByHandleEx fails with
+ error ERROR_INVALID_LEVEL, whereas GetFileInformationByHandle
+ succeeds. */
+# if _GL_WINDOWS_STAT_INODES == 2
+ if (GetFileInformationByHandleExFunc != NULL)
+ {
+ FILE_ID_INFO id;
+ if (GetFileInformationByHandleExFunc (h, FileIdInfo, &id, sizeof (id)))
+ {
+ buf->st_dev = id.VolumeSerialNumber;
+ verify (sizeof (ino_t) == sizeof (id.FileId));
+ memcpy (&buf->st_ino, &id.FileId, sizeof (ino_t));
+ goto ino_done;
+ }
+ else
+ {
+ switch (GetLastError ())
+ {
+ case ERROR_INVALID_PARAMETER: /* older Windows version, or FAT */
+ case ERROR_INVALID_LEVEL: /* CIFS/SMB file system */
+ goto fallback;
+ default:
+ goto failed;
+ }
+ }
+ }
+ fallback: ;
+ /* Fallback for older Windows versions. */
+ buf->st_dev = info.dwVolumeSerialNumber;
+ buf->st_ino._gl_ino[0] = ((ULONGLONG) info.nFileIndexHigh << 32) | (ULONGLONG) info.nFileIndexLow;
+ buf->st_ino._gl_ino[1] = 0;
+ ino_done: ;
+# else /* _GL_WINDOWS_STAT_INODES == 1 */
+ buf->st_dev = info.dwVolumeSerialNumber;
+ buf->st_ino = ((ULONGLONG) info.nFileIndexHigh << 32) | (ULONGLONG) info.nFileIndexLow;
+# endif
+#else
+ /* st_ino is not wide enough for identifying a file on a device.
+ Without st_ino, st_dev is pointless. */
+ buf->st_dev = 0;
+ buf->st_ino = 0;
+#endif
+
+ /* st_mode. */
+ unsigned int mode =
+ /* XXX How to handle FILE_ATTRIBUTE_REPARSE_POINT ? */
+ ((info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? _S_IFDIR | S_IEXEC_UGO : _S_IFREG)
+ | S_IREAD_UGO
+ | ((info.dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? 0 : S_IWRITE_UGO);
+ if (!(info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
+ {
+ /* Determine whether the file is executable by looking at the file
+ name suffix.
+ If the file name is already known, use it. Otherwise, for
+ non-empty files, it can be determined through
+ GetFinalPathNameByHandle
+ <https://msdn.microsoft.com/en-us/library/aa364962.aspx>
+ or through
+ GetFileInformationByHandleEx with argument FileNameInfo
+ <https://msdn.microsoft.com/en-us/library/aa364953.aspx>
+ <https://msdn.microsoft.com/en-us/library/aa364388.aspx>
+ Both require -D_WIN32_WINNT=_WIN32_WINNT_VISTA or higher. */
+ if (info.nFileSizeHigh > 0 || info.nFileSizeLow > 0)
+ {
+ char fpath[PATH_MAX];
+ if (path != NULL
+ || (GetFinalPathNameByHandleFunc != NULL
+ && GetFinalPathNameByHandleFunc (h, fpath, sizeof (fpath), VOLUME_NAME_NONE)
+ < sizeof (fpath)
+ && (path = fpath, 1)))
+ {
+ const char *last_dot = NULL;
+ const char *p;
+ for (p = path; *p != '\0'; p++)
+ if (*p == '.')
+ last_dot = p;
+ if (last_dot != NULL)
+ {
+ const char *suffix = last_dot + 1;
+ if (_stricmp (suffix, "exe") == 0
+ || _stricmp (suffix, "bat") == 0
+ || _stricmp (suffix, "cmd") == 0
+ || _stricmp (suffix, "com") == 0)
+ mode |= S_IEXEC_UGO;
+ }
+ }
+ else
+ /* Cannot determine file name. Pretend that it is executable. */
+ mode |= S_IEXEC_UGO;
+ }
+ }
+ buf->st_mode = mode;
+
+ /* st_nlink can be determined through
+ GetFileInformationByHandle
+ <https://msdn.microsoft.com/en-us/library/aa364952.aspx>
+ <https://msdn.microsoft.com/en-us/library/aa363788.aspx>
+ or through
+ GetFileInformationByHandleEx with argument FileStandardInfo
+ <https://msdn.microsoft.com/en-us/library/aa364953.aspx>
+ <https://msdn.microsoft.com/en-us/library/aa364401.aspx>
+ The latter requires -D_WIN32_WINNT=_WIN32_WINNT_VISTA or higher. */
+ buf->st_nlink = (info.nNumberOfLinks > SHRT_MAX ? SHRT_MAX : info.nNumberOfLinks);
+
+ /* There's no easy way to map the Windows SID concept to an integer. */
+ buf->st_uid = 0;
+ buf->st_gid = 0;
+
+ /* st_rdev is irrelevant for normal files and directories. */
+ buf->st_rdev = 0;
+
+ /* st_size can be determined through
+ GetFileSizeEx
+ <https://msdn.microsoft.com/en-us/library/aa364957.aspx>
+ or through
+ GetFileAttributesEx
+ <https://msdn.microsoft.com/en-us/library/aa364946.aspx>
+ <https://msdn.microsoft.com/en-us/library/aa365739.aspx>
+ or through
+ GetFileInformationByHandle
+ <https://msdn.microsoft.com/en-us/library/aa364952.aspx>
+ <https://msdn.microsoft.com/en-us/library/aa363788.aspx>
+ or through
+ GetFileInformationByHandleEx with argument FileStandardInfo
+ <https://msdn.microsoft.com/en-us/library/aa364953.aspx>
+ <https://msdn.microsoft.com/en-us/library/aa364401.aspx>
+ The latter requires -D_WIN32_WINNT=_WIN32_WINNT_VISTA or higher. */
+ if (sizeof (buf->st_size) <= 4)
+ /* Range check already done above. */
+ buf->st_size = info.nFileSizeLow;
+ else
+ buf->st_size = ((long long) info.nFileSizeHigh << 32) | (long long) info.nFileSizeLow;
+
+ /* st_atime, st_mtime, st_ctime can be determined through
+ GetFileTime
+ <https://msdn.microsoft.com/en-us/library/ms724320.aspx>
+ or through
+ GetFileAttributesEx
+ <https://msdn.microsoft.com/en-us/library/aa364946.aspx>
+ <https://msdn.microsoft.com/en-us/library/aa365739.aspx>
+ or through
+ GetFileInformationByHandle
+ <https://msdn.microsoft.com/en-us/library/aa364952.aspx>
+ <https://msdn.microsoft.com/en-us/library/aa363788.aspx>
+ or through
+ GetFileInformationByHandleEx with argument FileBasicInfo
+ <https://msdn.microsoft.com/en-us/library/aa364953.aspx>
+ <https://msdn.microsoft.com/en-us/library/aa364217.aspx>
+ The latter requires -D_WIN32_WINNT=_WIN32_WINNT_VISTA or higher. */
+#if _GL_WINDOWS_STAT_TIMESPEC
+ buf->st_atim = _gl_convert_FILETIME_to_timespec (&info.ftLastAccessTime);
+ buf->st_mtim = _gl_convert_FILETIME_to_timespec (&info.ftLastWriteTime);
+ buf->st_ctim = _gl_convert_FILETIME_to_timespec (&info.ftCreationTime);
+#else
+ buf->st_atime = _gl_convert_FILETIME_to_POSIX (&info.ftLastAccessTime);
+ buf->st_mtime = _gl_convert_FILETIME_to_POSIX (&info.ftLastWriteTime);
+ buf->st_ctime = _gl_convert_FILETIME_to_POSIX (&info.ftCreationTime);
+#endif
+
+ return 0;
+ }
+ else if (type == FILE_TYPE_CHAR || type == FILE_TYPE_PIPE)
+ {
+ buf->st_dev = 0;
+#if _GL_WINDOWS_STAT_INODES == 2
+ buf->st_ino._gl_ino[0] = buf->st_ino._gl_ino[1] = 0;
+#else
+ buf->st_ino = 0;
+#endif
+ buf->st_mode = (type == FILE_TYPE_PIPE ? _S_IFIFO : _S_IFCHR);
+ buf->st_nlink = 1;
+ buf->st_uid = 0;
+ buf->st_gid = 0;
+ buf->st_rdev = 0;
+ if (type == FILE_TYPE_PIPE)
+ {
+ /* PeekNamedPipe
+ <https://msdn.microsoft.com/en-us/library/aa365779.aspx> */
+ DWORD bytes_available;
+ if (PeekNamedPipe (h, NULL, 0, NULL, &bytes_available, NULL))
+ buf->st_size = bytes_available;
+ else
+ buf->st_size = 0;
+ }
+ else
+ buf->st_size = 0;
+#if _GL_WINDOWS_STAT_TIMESPEC
+ buf->st_atim.tv_sec = 0; buf->st_atim.tv_nsec = 0;
+ buf->st_mtim.tv_sec = 0; buf->st_mtim.tv_nsec = 0;
+ buf->st_ctim.tv_sec = 0; buf->st_ctim.tv_nsec = 0;
+#else
+ buf->st_atime = 0;
+ buf->st_mtime = 0;
+ buf->st_ctime = 0;
+#endif
+ return 0;
+ }
+ else
+ {
+ errno = ENOENT;
+ return -1;
+ }
+
+ failed:
+ {
+ DWORD error = GetLastError ();
+ #if 0
+ fprintf (stderr, "_gl_fstat_by_handle error 0x%x\n", (unsigned int) error);
+ #endif
+ switch (error)
+ {
+ case ERROR_ACCESS_DENIED:
+ case ERROR_SHARING_VIOLATION:
+ errno = EACCES;
+ break;
+
+ case ERROR_OUTOFMEMORY:
+ errno = ENOMEM;
+ break;
+
+ case ERROR_WRITE_FAULT:
+ case ERROR_READ_FAULT:
+ case ERROR_GEN_FAILURE:
+ errno = EIO;
+ break;
+
+ default:
+ errno = EINVAL;
+ break;
+ }
+ return -1;
+ }
+}
+
+#else
+
+/* This declaration is solely to ensure that after preprocessing
+ this file is never empty. */
+typedef int dummy;
+
+#endif
diff --git a/lib/stat-w32.h b/lib/stat-w32.h
new file mode 100644
index 0000000..9a3ecc1
--- /dev/null
+++ b/lib/stat-w32.h
@@ -0,0 +1,37 @@
+/* Core of implementation of fstat and stat for native Windows.
+ Copyright (C) 2017-2018 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 <https://www.gnu.org/licenses/>. */
+
+#ifndef _STAT_W32_H
+#define _STAT_W32_H 1
+
+/* Converts a FILETIME to GMT time since 1970-01-01 00:00:00. */
+#if _GL_WINDOWS_STAT_TIMESPEC
+extern struct timespec _gl_convert_FILETIME_to_timespec (const FILETIME *ft);
+#else
+extern time_t _gl_convert_FILETIME_to_POSIX (const FILETIME *ft);
+#endif
+
+/* Fill *BUF with information about the file designated by H.
+ PATH is the file name, if known, otherwise NULL.
+ Return 0 if successful, or -1 with errno set upon failure. */
+extern int _gl_fstat_by_handle (HANDLE h, const char *path, struct stat *buf);
+
+/* Bitmasks for st_mode. */
+#define S_IREAD_UGO (_S_IREAD | (_S_IREAD >> 3) | (_S_IREAD >> 6))
+#define S_IWRITE_UGO (_S_IWRITE | (_S_IWRITE >> 3) | (_S_IWRITE >> 6))
+#define S_IEXEC_UGO (_S_IEXEC | (_S_IEXEC >> 3) | (_S_IEXEC >> 6))
+
+#endif /* _STAT_W32_H */
diff --git a/lib/stat.c b/lib/stat.c
index 7e7c2f6..1c5b62e 100644
--- a/lib/stat.c
+++ b/lib/stat.c
@@ -1,5 +1,5 @@
/* Work around platform bugs in stat.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -12,9 +12,9 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
-/* written by Eric Blake */
+/* Written by Eric Blake and Bruno Haible. */
/* If the user's config.h happens to include <sys/stat.h>, let it include only
the system's <sys/stat.h> here, so that orig_stat doesn't recurse to
@@ -28,46 +28,67 @@
#undef __need_system_sys_stat_h
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-# if _GL_WINDOWS_64_BIT_ST_SIZE
-# undef stat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */
-# define stat _stati64
-# define REPLACE_FUNC_STAT_DIR 1
-# undef REPLACE_FUNC_STAT_FILE
-# elif REPLACE_FUNC_STAT_FILE
-/* mingw64 has a broken stat() function, based on _stat(), in libmingwex.a.
- Bypass it. */
-# define stat _stat
-# define REPLACE_FUNC_STAT_DIR 1
-# undef REPLACE_FUNC_STAT_FILE
-# endif
+# define WINDOWS_NATIVE
#endif
+#if !defined WINDOWS_NATIVE
+
static int
orig_stat (const char *filename, struct stat *buf)
{
return stat (filename, buf);
}
+#endif
+
/* Specification. */
/* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc
eliminates this include because of the preliminary #include <sys/stat.h>
above. */
#include "sys/stat.h"
+#include "stat-time.h"
+
#include <errno.h>
#include <limits.h>
#include <stdbool.h>
#include <string.h>
-#include "dosname.h"
+#include "filename.h"
+#include "malloca.h"
#include "verify.h"
-#if REPLACE_FUNC_STAT_DIR
-# include "pathmax.h"
- /* The only known systems where REPLACE_FUNC_STAT_DIR is needed also
- have a constant PATH_MAX. */
-# ifndef PATH_MAX
-# error "Please port this replacement to your platform"
-# endif
+#ifdef WINDOWS_NATIVE
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+# include "stat-w32.h"
+#endif
+
+#ifdef WINDOWS_NATIVE
+/* Return TRUE if the given file name denotes an UNC root. */
+static BOOL
+is_unc_root (const char *rname)
+{
+ /* Test whether it has the syntax '\\server\share'. */
+ if (ISSLASH (rname[0]) && ISSLASH (rname[1]))
+ {
+ /* It starts with two slashes. Find the next slash. */
+ const char *p = rname + 2;
+ const char *q = p;
+ while (*q != '\0' && !ISSLASH (*q))
+ q++;
+ if (q > p && *q != '\0')
+ {
+ /* Found the next slash at q. */
+ q++;
+ const char *r = q;
+ while (*r != '\0' && !ISSLASH (*r))
+ r++;
+ if (r > q && *r == '\0')
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
#endif
/* Store information about NAME into ST. Work around bugs with
@@ -77,62 +98,332 @@ orig_stat (const char *filename, struct stat *buf)
correctly. */
int
-rpl_stat (char const *name, struct stat *st)
+rpl_stat (char const *name, struct stat *buf)
{
- int result = orig_stat (name, st);
-#if REPLACE_FUNC_STAT_FILE
- /* Solaris 9 mistakenly succeeds when given a non-directory with a
- trailing slash. */
- if (result == 0 && !S_ISDIR (st->st_mode))
+#ifdef WINDOWS_NATIVE
+ /* Fill the fields ourselves, because the original stat function returns
+ values for st_atime, st_mtime, st_ctime that depend on the current time
+ zone. See
+ <https://lists.gnu.org/r/bug-gnulib/2017-04/msg00134.html> */
+ /* XXX Should we convert to wchar_t* and prepend '\\?\', in order to work
+ around length limitations
+ <https://msdn.microsoft.com/en-us/library/aa365247.aspx> ? */
+
+ /* POSIX <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13>
+ specifies: "More than two leading <slash> characters shall be treated as
+ a single <slash> character." */
+ if (ISSLASH (name[0]) && ISSLASH (name[1]) && ISSLASH (name[2]))
+ {
+ name += 2;
+ while (ISSLASH (name[1]))
+ name++;
+ }
+
+ size_t len = strlen (name);
+ size_t drive_prefix_len = (HAS_DEVICE (name) ? 2 : 0);
+
+ /* Remove trailing slashes (except the very first one, at position
+ drive_prefix_len), but remember their presence. */
+ size_t rlen;
+ bool check_dir = false;
+
+ rlen = len;
+ while (rlen > drive_prefix_len && ISSLASH (name[rlen-1]))
{
- size_t len = strlen (name);
- if (ISSLASH (name[len - 1]))
+ check_dir = true;
+ if (rlen == drive_prefix_len + 1)
+ break;
+ rlen--;
+ }
+
+ /* Handle '' and 'C:'. */
+ if (!check_dir && rlen == drive_prefix_len)
+ {
+ errno = ENOENT;
+ return -1;
+ }
+
+ /* Handle '\\'. */
+ if (rlen == 1 && ISSLASH (name[0]) && len >= 2)
+ {
+ errno = ENOENT;
+ return -1;
+ }
+
+ const char *rname;
+ char *malloca_rname;
+ if (rlen == len)
+ {
+ rname = name;
+ malloca_rname = NULL;
+ }
+ else
+ {
+ malloca_rname = malloca (rlen + 1);
+ if (malloca_rname == NULL)
{
- errno = ENOTDIR;
+ errno = ENOMEM;
return -1;
}
+ memcpy (malloca_rname, name, rlen);
+ malloca_rname[rlen] = '\0';
+ rname = malloca_rname;
}
-#endif /* REPLACE_FUNC_STAT_FILE */
-#if REPLACE_FUNC_STAT_DIR
- if (result == -1 && errno == ENOENT)
+ /* There are two ways to get at the requested information:
+ - by scanning the parent directory and examining the relevant
+ directory entry,
+ - by opening the file directly.
+ The first approach fails for root directories (e.g. 'C:\') and
+ UNC root directories (e.g. '\\server\share').
+ The second approach fails for some system files (e.g. 'C:\pagefile.sys'
+ and 'C:\hiberfil.sys'): ERROR_SHARING_VIOLATION.
+ The second approach gives more information (in particular, correct
+ st_dev, st_ino, st_nlink fields).
+ So we use the second approach and, as a fallback except for root and
+ UNC root directories, also the first approach. */
+ {
+ int ret;
+
{
- /* Due to mingw's oddities, there are some directories (like
- c:\) where stat() only succeeds with a trailing slash, and
- other directories (like c:\windows) where stat() only
- succeeds without a trailing slash. But we want the two to be
- synonymous, since chdir() manages either style. Likewise, Mingw also
- reports ENOENT for names longer than PATH_MAX, when we want
- ENAMETOOLONG, and for stat("file/"), when we want ENOTDIR.
- Fortunately, mingw PATH_MAX is small enough for stack
- allocation. */
- char fixed_name[PATH_MAX + 1] = {0};
- size_t len = strlen (name);
- bool check_dir = false;
- verify (PATH_MAX <= 4096);
- if (PATH_MAX <= len)
- errno = ENAMETOOLONG;
- else if (len)
+ /* Approach based on the file. */
+
+ /* Open a handle to the file.
+ CreateFile
+ <https://msdn.microsoft.com/en-us/library/aa363858.aspx>
+ <https://msdn.microsoft.com/en-us/library/aa363874.aspx> */
+ HANDLE h =
+ CreateFile (rname,
+ FILE_READ_ATTRIBUTES,
+ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
+ NULL,
+ OPEN_EXISTING,
+ /* FILE_FLAG_POSIX_SEMANTICS (treat file names that differ only
+ in case as different) makes sense only when applied to *all*
+ filesystem operations. */
+ FILE_FLAG_BACKUP_SEMANTICS /* | FILE_FLAG_POSIX_SEMANTICS */,
+ NULL);
+ if (h != INVALID_HANDLE_VALUE)
+ {
+ ret = _gl_fstat_by_handle (h, rname, buf);
+ CloseHandle (h);
+ goto done;
+ }
+ }
+
+ /* Test for root and UNC root directories. */
+ if ((rlen == drive_prefix_len + 1 && ISSLASH (rname[drive_prefix_len]))
+ || is_unc_root (rname))
+ goto failed;
+
+ /* Fallback. */
+ {
+ /* Approach based on the directory entry. */
+
+ if (strchr (rname, '?') != NULL || strchr (rname, '*') != NULL)
+ {
+ /* Other Windows API functions would fail with error
+ ERROR_INVALID_NAME. */
+ if (malloca_rname != NULL)
+ freea (malloca_rname);
+ errno = ENOENT;
+ return -1;
+ }
+
+ /* Get the details about the directory entry. This can be done through
+ FindFirstFile
+ <https://msdn.microsoft.com/en-us/library/aa364418.aspx>
+ <https://msdn.microsoft.com/en-us/library/aa365740.aspx>
+ or through
+ FindFirstFileEx with argument FindExInfoBasic
+ <https://msdn.microsoft.com/en-us/library/aa364419.aspx>
+ <https://msdn.microsoft.com/en-us/library/aa364415.aspx>
+ <https://msdn.microsoft.com/en-us/library/aa365740.aspx> */
+ WIN32_FIND_DATA info;
+ HANDLE h = FindFirstFile (rname, &info);
+ if (h == INVALID_HANDLE_VALUE)
+ goto failed;
+
+ /* Test for error conditions before starting to fill *buf. */
+ if (sizeof (buf->st_size) <= 4 && info.nFileSizeHigh > 0)
+ {
+ FindClose (h);
+ if (malloca_rname != NULL)
+ freea (malloca_rname);
+ errno = EOVERFLOW;
+ return -1;
+ }
+
+# if _GL_WINDOWS_STAT_INODES
+ buf->st_dev = 0;
+# if _GL_WINDOWS_STAT_INODES == 2
+ buf->st_ino._gl_ino[0] = buf->st_ino._gl_ino[1] = 0;
+# else /* _GL_WINDOWS_STAT_INODES == 1 */
+ buf->st_ino = 0;
+# endif
+# else
+ /* st_ino is not wide enough for identifying a file on a device.
+ Without st_ino, st_dev is pointless. */
+ buf->st_dev = 0;
+ buf->st_ino = 0;
+# endif
+
+ /* st_mode. */
+ unsigned int mode =
+ /* XXX How to handle FILE_ATTRIBUTE_REPARSE_POINT ? */
+ ((info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? _S_IFDIR | S_IEXEC_UGO : _S_IFREG)
+ | S_IREAD_UGO
+ | ((info.dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? 0 : S_IWRITE_UGO);
+ if (!(info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
{
- strcpy (fixed_name, name);
- if (ISSLASH (fixed_name[len - 1]))
+ /* Determine whether the file is executable by looking at the file
+ name suffix. */
+ if (info.nFileSizeHigh > 0 || info.nFileSizeLow > 0)
{
- check_dir = true;
- while (len && ISSLASH (fixed_name[len - 1]))
- fixed_name[--len] = '\0';
- if (!len)
- fixed_name[0] = '/';
+ const char *last_dot = NULL;
+ const char *p;
+ for (p = info.cFileName; *p != '\0'; p++)
+ if (*p == '.')
+ last_dot = p;
+ if (last_dot != NULL)
+ {
+ const char *suffix = last_dot + 1;
+ if (_stricmp (suffix, "exe") == 0
+ || _stricmp (suffix, "bat") == 0
+ || _stricmp (suffix, "cmd") == 0
+ || _stricmp (suffix, "com") == 0)
+ mode |= S_IEXEC_UGO;
+ }
}
- else
- fixed_name[len++] = '/';
- result = orig_stat (fixed_name, st);
- if (result == 0 && check_dir && !S_ISDIR (st->st_mode))
+ }
+ buf->st_mode = mode;
+
+ /* st_nlink. Ignore hard links here. */
+ buf->st_nlink = 1;
+
+ /* There's no easy way to map the Windows SID concept to an integer. */
+ buf->st_uid = 0;
+ buf->st_gid = 0;
+
+ /* st_rdev is irrelevant for normal files and directories. */
+ buf->st_rdev = 0;
+
+ /* st_size. */
+ if (sizeof (buf->st_size) <= 4)
+ /* Range check already done above. */
+ buf->st_size = info.nFileSizeLow;
+ else
+ buf->st_size = ((long long) info.nFileSizeHigh << 32) | (long long) info.nFileSizeLow;
+
+ /* st_atime, st_mtime, st_ctime. */
+# if _GL_WINDOWS_STAT_TIMESPEC
+ buf->st_atim = _gl_convert_FILETIME_to_timespec (&info.ftLastAccessTime);
+ buf->st_mtim = _gl_convert_FILETIME_to_timespec (&info.ftLastWriteTime);
+ buf->st_ctim = _gl_convert_FILETIME_to_timespec (&info.ftCreationTime);
+# else
+ buf->st_atime = _gl_convert_FILETIME_to_POSIX (&info.ftLastAccessTime);
+ buf->st_mtime = _gl_convert_FILETIME_to_POSIX (&info.ftLastWriteTime);
+ buf->st_ctime = _gl_convert_FILETIME_to_POSIX (&info.ftCreationTime);
+# endif
+
+ FindClose (h);
+
+ ret = 0;
+ }
+
+ done:
+ if (ret >= 0 && check_dir && !S_ISDIR (buf->st_mode))
+ {
+ errno = ENOTDIR;
+ ret = -1;
+ }
+ if (malloca_rname != NULL)
+ {
+ int saved_errno = errno;
+ freea (malloca_rname);
+ errno = saved_errno;
+ }
+ return ret;
+ }
+
+ failed:
+ {
+ DWORD error = GetLastError ();
+ #if 0
+ fprintf (stderr, "rpl_stat error 0x%x\n", (unsigned int) error);
+ #endif
+
+ if (malloca_rname != NULL)
+ freea (malloca_rname);
+
+ switch (error)
+ {
+ /* Some of these errors probably cannot happen with the specific flags
+ that we pass to CreateFile. But who knows... */
+ case ERROR_FILE_NOT_FOUND: /* The last component of rname does not exist. */
+ case ERROR_PATH_NOT_FOUND: /* Some directory component in rname does not exist. */
+ case ERROR_BAD_PATHNAME: /* rname is such as '\\server'. */
+ case ERROR_BAD_NET_NAME: /* rname is such as '\\server\nonexistentshare'. */
+ case ERROR_INVALID_NAME: /* rname contains wildcards, misplaced colon, etc. */
+ case ERROR_DIRECTORY:
+ errno = ENOENT;
+ break;
+
+ case ERROR_ACCESS_DENIED: /* rname is such as 'C:\System Volume Information\foo'. */
+ case ERROR_SHARING_VIOLATION: /* rname is such as 'C:\pagefile.sys' (second approach only). */
+ /* XXX map to EACCESS or EPERM? */
+ errno = EACCES;
+ break;
+
+ case ERROR_OUTOFMEMORY:
+ errno = ENOMEM;
+ break;
+
+ case ERROR_WRITE_PROTECT:
+ errno = EROFS;
+ break;
+
+ case ERROR_WRITE_FAULT:
+ case ERROR_READ_FAULT:
+ case ERROR_GEN_FAILURE:
+ errno = EIO;
+ break;
+
+ case ERROR_BUFFER_OVERFLOW:
+ case ERROR_FILENAME_EXCED_RANGE:
+ errno = ENAMETOOLONG;
+ break;
+
+ case ERROR_DELETE_PENDING: /* XXX map to EACCESS or EPERM? */
+ errno = EPERM;
+ break;
+
+ default:
+ errno = EINVAL;
+ break;
+ }
+
+ return -1;
+ }
+#else
+ int result = orig_stat (name, buf);
+ if (result == 0)
+ {
+# if REPLACE_FUNC_STAT_FILE
+ /* Solaris 9 mistakenly succeeds when given a non-directory with a
+ trailing slash. */
+ if (!S_ISDIR (buf->st_mode))
+ {
+ size_t len = strlen (name);
+ if (ISSLASH (name[len - 1]))
{
- result = -1;
errno = ENOTDIR;
+ return -1;
}
}
+# endif /* REPLACE_FUNC_STAT_FILE */
+ result = stat_time_normalize (result, buf);
}
-#endif /* REPLACE_FUNC_STAT_DIR */
return result;
+#endif
}
diff --git a/lib/stdalign.in.h b/lib/stdalign.in.h
index 5f56eee..bbfa9ac 100644
--- a/lib/stdalign.in.h
+++ b/lib/stdalign.in.h
@@ -1,6 +1,6 @@
/* A substitute for ISO C11 <stdalign.h>.
- Copyright 2011-2017 Free Software Foundation, Inc.
+ Copyright 2011-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* Written by Paul Eggert and Bruno Haible. */
@@ -53,7 +53,7 @@
#undef _Alignof
/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023
- <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
#if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
|| (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9)))
# ifdef __cplusplus
@@ -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/lib/stdarg.in.h b/lib/stdarg.in.h
index 3785cd1..46af0c2 100644
--- a/lib/stdarg.in.h
+++ b/lib/stdarg.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <stdarg.h>.
- Copyright (C) 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _@GUARD_PREFIX@_STDARG_H
diff --git a/lib/stdbool.in.h b/lib/stdbool.in.h
index 1067ed2..ebf1a2f 100644
--- a/lib/stdbool.in.h
+++ b/lib/stdbool.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2003, 2006-2017 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2003, 2006-2018 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
@@ -12,7 +12,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _GL_STDBOOL_H
#define _GL_STDBOOL_H
@@ -82,9 +82,9 @@ typedef bool _Bool;
/* If @HAVE__BOOL@:
Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when
the built-in _Bool type is used. See
- http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
- http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
- http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
+ https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
+ https://lists.gnu.org/r/bug-coreutils/2005-10/msg00086.html
Similar bugs are likely with other compilers as well; this file
wouldn't be used if <stdbool.h> was working.
So we override the _Bool type.
diff --git a/lib/stddef.in.h b/lib/stddef.in.h
index 5b496a6..8329a9b 100644
--- a/lib/stddef.in.h
+++ b/lib/stddef.in.h
@@ -1,6 +1,6 @@
/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake. */
@@ -85,24 +85,28 @@
a hack in case the configure-time test was done with g++ even though
we are currently compiling with gcc. */
#if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T)
+# if !GNULIB_defined_max_align_t
/* On the x86, the maximum storage alignment of double, long, etc. is 4,
but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8,
and the C11 standard allows this. Work around this problem by
using __alignof__ (which returns 8 for double) rather than _Alignof
(which returns 4), and align each union member accordingly. */
-# ifdef __GNUC__
-# define _GL_STDDEF_ALIGNAS(type) \
- __attribute__ ((__aligned__ (__alignof__ (type))))
-# else
-# define _GL_STDDEF_ALIGNAS(type) /* */
-# endif
+# ifdef __GNUC__
+# define _GL_STDDEF_ALIGNAS(type) \
+ __attribute__ ((__aligned__ (__alignof__ (type))))
+# else
+# define _GL_STDDEF_ALIGNAS(type) /* */
+# endif
typedef union
{
char *__p _GL_STDDEF_ALIGNAS (char *);
double __d _GL_STDDEF_ALIGNAS (double);
long double __ld _GL_STDDEF_ALIGNAS (long double);
long int __i _GL_STDDEF_ALIGNAS (long int);
-} max_align_t;
+} rpl_max_align_t;
+# define max_align_t rpl_max_align_t
+# define GNULIB_defined_max_align_t 1
+# endif
#endif
# endif /* _@GUARD_PREFIX@_STDDEF_H */
diff --git a/lib/stdint.in.h b/lib/stdint.in.h
index d899c1e..94e7c81 100644
--- a/lib/stdint.in.h
+++ b/lib/stdint.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2002, 2004-2017 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2018 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
This file is part of gnulib.
@@ -13,7 +13,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
/*
* ISO C 99 <stdint.h> for platforms that lack it.
@@ -128,8 +128,13 @@
Return an unspecified value if BITS == 0, adding a check to pacify
picky compilers. */
-# define _STDINT_MIN(signed, bits, zero) \
- ((signed) ? ~ _STDINT_MAX (signed, bits, zero) : (zero))
+/* These are separate macros, because if you try to merge these macros into
+ a single one, HP-UX cc rejects the resulting expression in constant
+ expressions. */
+# define _STDINT_UNSIGNED_MIN(bits, zero) \
+ (zero)
+# define _STDINT_SIGNED_MIN(bits, zero) \
+ (~ _STDINT_MAX (1, bits, zero))
# define _STDINT_MAX(signed, bits, zero) \
(((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
@@ -512,15 +517,15 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
# undef PTRDIFF_MAX
# if @APPLE_UNIVERSAL_BUILD@
# ifdef _LP64
-# define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l)
+# define PTRDIFF_MIN _STDINT_SIGNED_MIN (64, 0l)
# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l)
# else
-# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0)
+# define PTRDIFF_MIN _STDINT_SIGNED_MIN (32, 0)
# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0)
# endif
# else
# define PTRDIFF_MIN \
- _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
+ _STDINT_SIGNED_MIN (@BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
# define PTRDIFF_MAX \
_STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
# endif
@@ -528,9 +533,13 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
/* sig_atomic_t limits */
# undef SIG_ATOMIC_MIN
# undef SIG_ATOMIC_MAX
-# define SIG_ATOMIC_MIN \
- _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
- 0@SIG_ATOMIC_T_SUFFIX@)
+# if @HAVE_SIGNED_SIG_ATOMIC_T@
+# define SIG_ATOMIC_MIN \
+ _STDINT_SIGNED_MIN (@BITSIZEOF_SIG_ATOMIC_T@, 0@SIG_ATOMIC_T_SUFFIX@)
+# else
+# define SIG_ATOMIC_MIN \
+ _STDINT_UNSIGNED_MIN (@BITSIZEOF_SIG_ATOMIC_T@, 0@SIG_ATOMIC_T_SUFFIX@)
+# endif
# define SIG_ATOMIC_MAX \
_STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
0@SIG_ATOMIC_T_SUFFIX@)
@@ -566,16 +575,26 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
# endif
# undef WCHAR_MIN
# undef WCHAR_MAX
-# define WCHAR_MIN \
- _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
+# if @HAVE_SIGNED_WCHAR_T@
+# define WCHAR_MIN \
+ _STDINT_SIGNED_MIN (@BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
+# else
+# define WCHAR_MIN \
+ _STDINT_UNSIGNED_MIN (@BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
+# endif
# define WCHAR_MAX \
_STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
/* wint_t limits */
# undef WINT_MIN
# undef WINT_MAX
-# define WINT_MIN \
- _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
+# if @HAVE_SIGNED_WINT_T@
+# define WINT_MIN \
+ _STDINT_SIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
+# else
+# define WINT_MIN \
+ _STDINT_UNSIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
+# endif
# define WINT_MAX \
_STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h
index 75a945e..05c5752 100644
--- a/lib/stdio-impl.h
+++ b/lib/stdio-impl.h
@@ -1,5 +1,5 @@
/* Implementation details of FILE streams.
- Copyright (C) 2007-2008, 2010-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2008, 2010-2018 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
@@ -12,12 +12,18 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Many stdio implementations have the same logic and therefore can share
the same implementation of stdio extension API, except that some fields
have different naming conventions, or their access requires some casts. */
+/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this
+ problem by defining it ourselves. FIXME: Do not rely on glibc
+ internals. */
+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
+# define _IO_IN_BACKUP 0x100
+#endif
/* BSD stdio derived implementations. */
@@ -32,7 +38,7 @@
/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
# if defined __DragonFly__ /* DragonFly */
- /* See <http://www.dragonflybsd.org/cvsweb/src/lib/libc/stdio/priv_stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>. */
+ /* See <https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/lib/libc/stdio/priv_stdio.h>. */
# define fp_ ((struct { struct __FILE_public pub; \
struct { unsigned char *_base; int _size; } _bf; \
void *cookie; \
@@ -49,7 +55,7 @@
fpos_t _offset; \
/* More fields, not relevant here. */ \
} *) fp)
- /* See <http://www.dragonflybsd.org/cvsweb/src/include/stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>. */
+ /* See <https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/include/stdio.h>. */
# define _p pub._p
# define _flags pub._flags
# define _r pub._r
@@ -60,7 +66,7 @@
# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __minix || defined __ANDROID__ /* NetBSD >= 1.5ZA, OpenBSD, Minix 3, Android */
/* See <http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup>
- and <http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup> */
+ and <https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup> */
struct __sfileext
{
struct __sbuf _ub; /* ungetc buffer */
@@ -81,7 +87,7 @@
#ifdef __TANDEM /* NonStop Kernel */
# ifndef _IOERR
/* These values were determined by the program 'stdioext-flags' at
- <http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00165.html>. */
+ <https://lists.gnu.org/r/bug-gnulib/2010-12/msg00165.html>. */
# define _IOERR 0x40
# define _IOREAD 0x80
# define _IOWRT 0x4
@@ -99,6 +105,8 @@
int _file; \
unsigned int _flag; \
} *) fp)
+# elif defined __VMS /* OpenVMS */
+# define fp_ ((struct _iobuf *) fp)
# else
# define fp_ fp
# endif
@@ -130,7 +138,7 @@ struct _gl_real_FILE
# define fp_ ((struct _gl_real_FILE *) fp)
/* These values were determined by a program similar to the one at
- <http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00165.html>. */
+ <https://lists.gnu.org/r/bug-gnulib/2010-12/msg00165.html>. */
# define _IOREAD 0x1
# define _IOWRT 0x2
# define _IORW 0x4
diff --git a/lib/stdio.in.h b/lib/stdio.in.h
index d706377..b9a43bb 100644
--- a/lib/stdio.in.h
+++ b/lib/stdio.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <stdio.h>.
- Copyright (C) 2004, 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2007-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
@@ -111,9 +111,9 @@
#define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \
_GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument))
-/* Solaris 10 declares renameat in <unistd.h>, not in <stdio.h>. */
+/* Solaris 10 and NetBSD 7.0 declare renameat in <unistd.h>, not in <stdio.h>. */
/* But in any case avoid namespace pollution on glibc systems. */
-#if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __sun \
+#if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \
&& ! defined __GLIBC__
# include <unistd.h>
#endif
@@ -152,7 +152,7 @@
/* When also using extern inline, suppress the use of static inline in
standard headers of problematic Apple configurations, as Libc at
least through Libc-825.26 (2013-04-09) mishandles it; see, e.g.,
- <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
+ <https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html>.
Perhaps Apple will fix this some day. */
#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \
&& defined __GNUC__ && defined __STDC__)
@@ -610,7 +610,7 @@ _GL_CXXALIAS_SYS (fwrite, size_t,
(const void *ptr, size_t s, size_t n, FILE *stream));
/* Work around bug 11959 when fortifying glibc 2.4 through 2.15
- <http://sources.redhat.com/bugzilla/show_bug.cgi?id=11959>,
+ <https://sourceware.org/bugzilla/show_bug.cgi?id=11959>,
which sometimes causes an unwanted diagnostic for fwrite calls.
This affects only function declaration attributes under certain
versions of gcc and clang, and is not needed for C++. */
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index b5cf9d3..c8a5d0d 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <stdlib.h>.
- Copyright (C) 1995, 2001-2004, 2006-2017 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-2004, 2006-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
@@ -47,6 +47,9 @@
/* Solaris declares getloadavg() in <sys/loadavg.h>. */
#if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@
+/* OpenIndiana has a bug: <sys/time.h> must be included before
+ <sys/loadavg.h>. */
+# include <sys/time.h>
# include <sys/loadavg.h>
#endif
@@ -597,7 +600,7 @@ _GL_WARN_ON_USE (srandom, "srandom is unportable - "
#endif
#if @GNULIB_RANDOM@
-# if !@HAVE_RANDOM@
+# if !@HAVE_RANDOM@ || !@HAVE_DECL_INITSTATE@
_GL_FUNCDECL_SYS (initstate, char *,
(unsigned int seed, char *buf, size_t buf_size)
_GL_ARG_NONNULL ((2)));
@@ -614,7 +617,7 @@ _GL_WARN_ON_USE (initstate, "initstate is unportable - "
#endif
#if @GNULIB_RANDOM@
-# if !@HAVE_RANDOM@
+# if !@HAVE_RANDOM@ || !@HAVE_DECL_SETSTATE@
_GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (setstate, char *, (char *arg_state));
@@ -765,6 +768,23 @@ _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - "
"use gnulib module realloc-posix for portability");
#endif
+
+#if @GNULIB_REALLOCARRAY@
+# if ! @HAVE_REALLOCARRAY@
+_GL_FUNCDECL_SYS (reallocarray, void *,
+ (void *ptr, size_t nmemb, size_t size));
+# endif
+_GL_CXXALIAS_SYS (reallocarray, void *,
+ (void *ptr, size_t nmemb, size_t size));
+_GL_CXXALIASWARN (reallocarray);
+#elif defined GNULIB_POSIXCHECK
+# undef reallocarray
+# if HAVE_RAW_DECL_REALLOCARRAY
+_GL_WARN_ON_USE (reallocarray, "reallocarray is not portable - "
+ "use gnulib module reallocarray for portability");
+# endif
+#endif
+
#if @GNULIB_REALPATH@
# if @REPLACE_REALPATH@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
diff --git a/lib/streq.h b/lib/streq.h
index d40fc48..bde1b95 100644
--- a/lib/streq.h
+++ b/lib/streq.h
@@ -1,5 +1,5 @@
/* Optimized string comparison.
- Copyright (C) 2001-2002, 2007, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2007, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>. */
diff --git a/lib/strerror-override.c b/lib/strerror-override.c
index fb2c74f..d3ad21e 100644
--- a/lib/strerror-override.c
+++ b/lib/strerror-override.c
@@ -1,6 +1,6 @@
/* strerror-override.c --- POSIX compatible system error routine
- Copyright (C) 2010-2017 Free Software Foundation, Inc.
+ Copyright (C) 2010-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2010. */
diff --git a/lib/strerror-override.h b/lib/strerror-override.h
index c22d303..a96fd08 100644
--- a/lib/strerror-override.h
+++ b/lib/strerror-override.h
@@ -1,6 +1,6 @@
/* strerror-override.h --- POSIX compatible system error routine
- Copyright (C) 2010-2017 Free Software Foundation, Inc.
+ Copyright (C) 2010-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef _GL_STRERROR_OVERRIDE_H
# define _GL_STRERROR_OVERRIDE_H
diff --git a/lib/strerror.c b/lib/strerror.c
index afeb9c8..36397bb 100644
--- a/lib/strerror.c
+++ b/lib/strerror.c
@@ -1,6 +1,6 @@
/* strerror.c --- POSIX compatible system error routine
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/string.in.h b/lib/string.in.h
index 9a6b311..29f4ba6 100644
--- a/lib/string.in.h
+++ b/lib/string.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <string.h>.
- Copyright (C) 1995-1996, 2001-2017 Free Software Foundation, Inc.
+ Copyright (C) 1995-1996, 2001-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
@@ -74,6 +74,23 @@
/* The definition of _GL_WARN_ON_USE is copied here. */
+/* Clear a block of memory. The compiler will not delete a call to
+ this function, even if the block is dead after the call. */
+#if @GNULIB_EXPLICIT_BZERO@
+# if ! @HAVE_EXPLICIT_BZERO@
+_GL_FUNCDECL_SYS (explicit_bzero, void,
+ (void *__dest, size_t __n) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (explicit_bzero, void, (void *__dest, size_t __n));
+_GL_CXXALIASWARN (explicit_bzero);
+#elif defined GNULIB_POSIXCHECK
+# undef explicit_bzero
+# if HAVE_RAW_DECL_EXPLICIT_BZERO
+_GL_WARN_ON_USE (explicit_bzero, "explicit_bzero is unportable - "
+ "use gnulib module explicit_bzero for portability");
+# endif
+#endif
+
/* Find the index of the least-significant set bit. */
#if @GNULIB_FFSL@
# if !@HAVE_FFSL@
diff --git a/lib/stripslash.c b/lib/stripslash.c
index 2d9d166..60c6781 100644
--- a/lib/stripslash.c
+++ b/lib/stripslash.c
@@ -1,6 +1,6 @@
/* stripslash.c -- remove redundant trailing slashes from a file name
- Copyright (C) 1990, 2001, 2003-2006, 2009-2017 Free Software Foundation,
+ Copyright (C) 1990, 2001, 2003-2006, 2009-2018 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
@@ -14,7 +14,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/strverscmp.c b/lib/strverscmp.c
index d759907..4eac791 100644
--- a/lib/strverscmp.c
+++ b/lib/strverscmp.c
@@ -1,5 +1,5 @@
/* Compare strings while treating digits characters numerically.
- Copyright (C) 1997-2017 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jean-François Bignolles <bignolle@ecoledoc.ibp.fr>, 1997.
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
#if !_LIBC
# include <config.h>
diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h
index d5ca343..d96fde1 100644
--- a/lib/sys_stat.in.h
+++ b/lib/sys_stat.in.h
@@ -1,5 +1,5 @@
-/* Provide a more complete sys/stat header file.
- Copyright (C) 2005-2017 Free Software Foundation, Inc.
+/* Provide a more complete sys/stat.h header file.
+ Copyright (C) 2005-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake, Paul Eggert, and Jim Meyering. */
@@ -72,6 +72,75 @@
# define stat _stati64
#endif
+/* Optionally, override 'struct stat' on native Windows. */
+#if @GNULIB_OVERRIDES_STRUCT_STAT@
+
+# undef stat
+# if @GNULIB_STAT@
+# define stat rpl_stat
+# else
+ /* Provoke a clear link error if stat() is used as a function and
+ module 'stat' is not in use. */
+# define stat stat_used_without_requesting_gnulib_module_stat
+# endif
+
+# if !GNULIB_defined_struct_stat
+struct stat
+{
+ dev_t st_dev;
+ ino_t st_ino;
+ mode_t st_mode;
+ nlink_t st_nlink;
+# if 0
+ uid_t st_uid;
+# else /* uid_t is not defined by default on native Windows. */
+ short st_uid;
+# endif
+# if 0
+ gid_t st_gid;
+# else /* gid_t is not defined by default on native Windows. */
+ short st_gid;
+# endif
+ dev_t st_rdev;
+ off_t st_size;
+# if 0
+ blksize_t st_blksize;
+ blkcnt_t st_blocks;
+# endif
+
+# if @WINDOWS_STAT_TIMESPEC@
+ struct timespec st_atim;
+ struct timespec st_mtim;
+ struct timespec st_ctim;
+# else
+ time_t st_atime;
+ time_t st_mtime;
+ time_t st_ctime;
+# endif
+};
+# if @WINDOWS_STAT_TIMESPEC@
+# define st_atime st_atim.tv_sec
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+ /* Indicator, for gnulib internal purposes. */
+# define _GL_WINDOWS_STAT_TIMESPEC 1
+# endif
+# define GNULIB_defined_struct_stat 1
+# endif
+
+/* Other possible values of st_mode. */
+# if 0
+# define _S_IFBLK 0x6000
+# endif
+# if 0
+# define _S_IFLNK 0xA000
+# endif
+# if 0
+# define _S_IFSOCK 0xC000
+# endif
+
+#endif
+
#ifndef S_IFIFO
# ifdef _S_IFIFO
# define S_IFIFO _S_IFIFO
@@ -345,6 +414,9 @@ _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf));
_GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf));
# endif
_GL_CXXALIASWARN (fstat);
+#elif @GNULIB_OVERRIDES_STRUCT_STAT@
+# undef fstat
+# define fstat fstat_used_without_requesting_gnulib_module_fstat
#elif @WINDOWS_64_BIT_ST_SIZE@
/* Above, we define stat to _stati64. */
# define fstat _fstati64
@@ -378,6 +450,9 @@ _GL_CXXALIAS_SYS (fstatat, int,
(int fd, char const *name, struct stat *st, int flags));
# endif
_GL_CXXALIASWARN (fstatat);
+#elif @GNULIB_OVERRIDES_STRUCT_STAT@
+# undef fstatat
+# define fstatat fstatat_used_without_requesting_gnulib_module_fstatat
#elif defined GNULIB_POSIXCHECK
# undef fstatat
# if HAVE_RAW_DECL_FSTATAT
@@ -476,6 +551,9 @@ _GL_CXXALIAS_SYS (lstat, int, (const char *name, struct stat *buf));
# if @HAVE_LSTAT@
_GL_CXXALIASWARN (lstat);
# endif
+#elif @GNULIB_OVERRIDES_STRUCT_STAT@
+# undef lstat
+# define lstat lstat_used_without_requesting_gnulib_module_lstat
#elif defined GNULIB_POSIXCHECK
# undef lstat
# if HAVE_RAW_DECL_LSTAT
@@ -625,63 +703,69 @@ _GL_WARN_ON_USE (mknodat, "mknodat is not portable - "
#if @GNULIB_STAT@
# if @REPLACE_STAT@
-/* We can't use the object-like #define stat rpl_stat, because of
- struct stat. This means that rpl_stat will not be used if the user
- does (stat)(a,b). Oh well. */
-# if defined _AIX && defined stat && defined _LARGE_FILES
- /* With _LARGE_FILES defined, AIX (only) defines stat to stat64,
- so we have to replace stat64() instead of stat(). */
-# undef stat64
-# define stat64(name, st) rpl_stat (name, st)
-# elif @WINDOWS_64_BIT_ST_SIZE@
- /* Above, we define stat to _stati64. */
-# if defined __MINGW32__ && defined _stati64
-# ifndef _USE_32BIT_TIME_T
- /* The system headers define _stati64 to _stat64. */
-# undef _stat64
-# define _stat64(name, st) rpl_stat (name, st)
+# if !@GNULIB_OVERRIDES_STRUCT_STAT@
+ /* We can't use the object-like #define stat rpl_stat, because of
+ struct stat. This means that rpl_stat will not be used if the user
+ does (stat)(a,b). Oh well. */
+# if defined _AIX && defined stat && defined _LARGE_FILES
+ /* With _LARGE_FILES defined, AIX (only) defines stat to stat64,
+ so we have to replace stat64() instead of stat(). */
+# undef stat64
+# define stat64(name, st) rpl_stat (name, st)
+# elif @WINDOWS_64_BIT_ST_SIZE@
+ /* Above, we define stat to _stati64. */
+# if defined __MINGW32__ && defined _stati64
+# ifndef _USE_32BIT_TIME_T
+ /* The system headers define _stati64 to _stat64. */
+# undef _stat64
+# define _stat64(name, st) rpl_stat (name, st)
+# endif
+# elif defined _MSC_VER && defined _stati64
+# ifdef _USE_32BIT_TIME_T
+ /* The system headers define _stati64 to _stat32i64. */
+# undef _stat32i64
+# define _stat32i64(name, st) rpl_stat (name, st)
+# else
+ /* The system headers define _stati64 to _stat64. */
+# undef _stat64
+# define _stat64(name, st) rpl_stat (name, st)
+# endif
+# else
+# undef _stati64
+# define _stati64(name, st) rpl_stat (name, st)
# endif
-# elif defined _MSC_VER && defined _stati64
+# elif defined __MINGW32__ && defined stat
# ifdef _USE_32BIT_TIME_T
- /* The system headers define _stati64 to _stat32i64. */
+ /* The system headers define stat to _stat32i64. */
# undef _stat32i64
# define _stat32i64(name, st) rpl_stat (name, st)
# else
- /* The system headers define _stati64 to _stat64. */
+ /* The system headers define stat to _stat64. */
# undef _stat64
# define _stat64(name, st) rpl_stat (name, st)
# endif
-# else
-# undef _stati64
-# define _stati64(name, st) rpl_stat (name, st)
-# endif
-# elif defined __MINGW32__ && defined stat
-# ifdef _USE_32BIT_TIME_T
- /* The system headers define stat to _stat32i64. */
-# undef _stat32i64
-# define _stat32i64(name, st) rpl_stat (name, st)
-# else
- /* The system headers define stat to _stat64. */
-# undef _stat64
-# define _stat64(name, st) rpl_stat (name, st)
-# endif
-# elif defined _MSC_VER && defined stat
-# ifdef _USE_32BIT_TIME_T
- /* The system headers define stat to _stat32. */
-# undef _stat32
-# define _stat32(name, st) rpl_stat (name, st)
-# else
- /* The system headers define stat to _stat64i32. */
-# undef _stat64i32
-# define _stat64i32(name, st) rpl_stat (name, st)
-# endif
-# else /* !(_AIX ||__MINGW32__ || _MSC_VER) */
-# undef stat
-# define stat(name, st) rpl_stat (name, st)
-# endif /* !_LARGE_FILES */
+# elif defined _MSC_VER && defined stat
+# ifdef _USE_32BIT_TIME_T
+ /* The system headers define stat to _stat32. */
+# undef _stat32
+# define _stat32(name, st) rpl_stat (name, st)
+# else
+ /* The system headers define stat to _stat64i32. */
+# undef _stat64i32
+# define _stat64i32(name, st) rpl_stat (name, st)
+# endif
+# else /* !(_AIX || __MINGW32__ || _MSC_VER) */
+# undef stat
+# define stat(name, st) rpl_stat (name, st)
+# endif /* !_LARGE_FILES */
+# endif /* !@GNULIB_OVERRIDES_STRUCT_STAT@ */
_GL_EXTERN_C int stat (const char *name, struct stat *buf)
_GL_ARG_NONNULL ((1, 2));
# endif
+#elif @GNULIB_OVERRIDES_STRUCT_STAT@
+/* see above:
+ #define stat stat_used_without_requesting_gnulib_module_stat
+ */
#elif defined GNULIB_POSIXCHECK
# undef stat
# if HAVE_RAW_DECL_STAT
diff --git a/lib/sys_time.in.h b/lib/sys_time.in.h
index 57739bc..b4a0e49 100644
--- a/lib/sys_time.in.h
+++ b/lib/sys_time.in.h
@@ -1,6 +1,6 @@
/* Provide a more complete sys/time.h.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* Written by Paul Eggert. */
diff --git a/lib/sys_types.in.h b/lib/sys_types.in.h
index 30ebfbd..7473716 100644
--- a/lib/sys_types.in.h
+++ b/lib/sys_types.in.h
@@ -1,6 +1,6 @@
/* Provide a more complete sys/types.h.
- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
@@ -42,6 +42,48 @@
# define _GL_WINDOWS_64_BIT_OFF_T 1
#endif
+/* Override dev_t and ino_t if distinguishable inodes support is requested
+ on native Windows. */
+#if @WINDOWS_STAT_INODES@
+
+# if @WINDOWS_STAT_INODES@ == 2
+/* Experimental, not useful in Windows 10. */
+
+/* Define dev_t to a 64-bit type. */
+# if !defined GNULIB_defined_dev_t
+typedef unsigned long long int rpl_dev_t;
+# undef dev_t
+# define dev_t rpl_dev_t
+# define GNULIB_defined_dev_t 1
+# endif
+
+/* Define ino_t to a 128-bit type. */
+# if !defined GNULIB_defined_ino_t
+/* MSVC does not have a 128-bit integer type.
+ GCC has a 128-bit integer type __int128, but only on 64-bit targets. */
+typedef struct { unsigned long long int _gl_ino[2]; } rpl_ino_t;
+# undef ino_t
+# define ino_t rpl_ino_t
+# define GNULIB_defined_ino_t 1
+# endif
+
+# else /* @WINDOWS_STAT_INODES@ == 1 */
+
+/* Define ino_t to a 64-bit type. */
+# if !defined GNULIB_defined_ino_t
+typedef unsigned long long int rpl_ino_t;
+# undef ino_t
+# define ino_t rpl_ino_t
+# define GNULIB_defined_ino_t 1
+# endif
+
+# endif
+
+/* Indicator, for gnulib internal purposes. */
+# define _GL_WINDOWS_STAT_INODES @WINDOWS_STAT_INODES@
+
+#endif
+
/* MSVC 9 defines size_t in <stddef.h>, not in <sys/types.h>. */
/* But avoid namespace pollution on glibc systems. */
#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \
diff --git a/lib/tempname.c b/lib/tempname.c
index 2cd9032..da81263 100644
--- a/lib/tempname.c
+++ b/lib/tempname.c
@@ -1,6 +1,6 @@
/* tempname.c - generate the name of a temporary file.
- Copyright (C) 1991-2003, 2005-2007, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 1991-2003, 2005-2007, 2009-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Extracted from glibc sysdeps/posix/tempname.c. See also tmpdir.c. */
@@ -69,7 +69,6 @@
# define __mkdir mkdir
# define __open open
# define __lxstat64(version, file, buf) lstat (file, buf)
-# define __secure_getenv secure_getenv
#endif
#ifdef _LIBC
@@ -279,7 +278,7 @@ try_nocreate (char *tmpl, void *flags _GL_UNUSED)
{
struct_stat64 st;
- if (__lxstat64 (_STAT_VER, tmpl, &st) == 0)
+ if (__lxstat64 (_STAT_VER, tmpl, &st) == 0 || errno == EOVERFLOW)
__set_errno (EEXIST);
return errno == ENOENT ? 0 : -1;
}
diff --git a/lib/tempname.h b/lib/tempname.h
index 1ca9748..4020c73 100644
--- a/lib/tempname.h
+++ b/lib/tempname.h
@@ -1,6 +1,6 @@
/* Create a temporary file or directory.
- Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* header written by Eric Blake */
diff --git a/lib/time.in.h b/lib/time.in.h
index fef8980..a2dca89 100644
--- a/lib/time.in.h
+++ b/lib/time.in.h
@@ -1,6 +1,6 @@
/* A more-standard <time.h>.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
@@ -120,6 +120,24 @@ _GL_CXXALIAS_SYS (nanosleep, int,
_GL_CXXALIASWARN (nanosleep);
# endif
+/* Initialize time conversion information. */
+# if @GNULIB_TZSET@
+# if @REPLACE_TZSET@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef tzset
+# define tzset rpl_tzset
+# endif
+_GL_FUNCDECL_RPL (tzset, void, (void));
+_GL_CXXALIAS_RPL (tzset, void, (void));
+# else
+# if ! @HAVE_TZSET@
+_GL_FUNCDECL_SYS (tzset, void, (void));
+# endif
+_GL_CXXALIAS_SYS (tzset, void, (void));
+# endif
+_GL_CXXALIASWARN (tzset);
+# endif
+
/* Return the 'time_t' representation of TP and normalize TP. */
# if @GNULIB_MKTIME@
# if @REPLACE_MKTIME@
@@ -187,7 +205,7 @@ _GL_CXXALIASWARN (gmtime_r);
/* Convert TIMER to RESULT, assuming local time and UTC respectively. See
<http://www.opengroup.org/susv3xsh/localtime.html> and
<http://www.opengroup.org/susv3xsh/gmtime.html>. */
-# if @GNULIB_GETTIMEOFDAY@
+# if @GNULIB_LOCALTIME@ || @REPLACE_LOCALTIME@
# if @REPLACE_LOCALTIME@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef localtime
@@ -202,7 +220,7 @@ _GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer));
_GL_CXXALIASWARN (localtime);
# endif
-# if @GNULIB_GETTIMEOFDAY@
+# if 0 || @REPLACE_GMTIME@
# if @REPLACE_GMTIME@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef gmtime
@@ -233,6 +251,41 @@ _GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf,
_GL_CXXALIASWARN (strptime);
# endif
+/* Convert *TP to a date and time string. See
+ <http://pubs.opengroup.org/onlinepubs/9699919799/functions/ctime.html>. */
+# if @GNULIB_CTIME@
+# if @REPLACE_CTIME@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define ctime rpl_ctime
+# endif
+_GL_FUNCDECL_RPL (ctime, char *, (time_t const *__tp)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (ctime, char *, (time_t const *__tp));
+# else
+_GL_CXXALIAS_SYS (ctime, char *, (time_t const *__tp));
+# endif
+_GL_CXXALIASWARN (ctime);
+# endif
+
+/* Convert *TP to a date and time string. See
+ <http://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html>. */
+# if @GNULIB_STRFTIME@
+# if @REPLACE_STRFTIME@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define strftime rpl_strftime
+# endif
+_GL_FUNCDECL_RPL (strftime, size_t, (char *__buf, size_t __bufsize,
+ const char *__fmt, const struct tm *__tp)
+ _GL_ARG_NONNULL ((1, 3, 4)));
+_GL_CXXALIAS_RPL (strftime, size_t, (char *__buf, size_t __bufsize,
+ const char *__fmt, const struct tm *__tp));
+# else
+_GL_CXXALIAS_SYS (strftime, size_t, (char *__buf, size_t __bufsize,
+ const char *__fmt, const struct tm *__tp));
+# endif
+_GL_CXXALIASWARN (strftime);
+# endif
+
# if defined _GNU_SOURCE && @GNULIB_TIME_RZ@ && ! @HAVE_TIMEZONE_T@
typedef struct tm_zone *timezone_t;
_GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name));
diff --git a/lib/unistd.in.h b/lib/unistd.in.h
index d5fa34d..beeb8e1 100644
--- a/lib/unistd.in.h
+++ b/lib/unistd.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <unistd.h>.
- Copyright (C) 2003-2017 Free Software Foundation, Inc.
+ Copyright (C) 2003-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _@GUARD_PREFIX@_UNISTD_H
@@ -127,11 +127,17 @@
# include <sys/types.h>
#endif
-/* Get getopt(), optarg, optind, opterr, optopt.
- But avoid namespace pollution on glibc systems. */
-#if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT
-# define __need_getopt
-# include <getopt.h>
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+
+/* Get getopt(), optarg, optind, opterr, optopt. */
+#if @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT
+# include <getopt-cdefs.h>
+# include <getopt-pfx-core.h>
#endif
#ifndef _GL_INLINE_HEADER_BEGIN
@@ -142,13 +148,6 @@ _GL_INLINE_HEADER_BEGIN
# define _GL_UNISTD_INLINE _GL_INLINE
#endif
-/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
-
-/* The definition of _GL_ARG_NONNULL is copied here. */
-
-/* The definition of _GL_WARN_ON_USE is copied here. */
-
-
/* Hide some function declarations from <winsock2.h>. */
#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@
@@ -379,7 +378,7 @@ _GL_WARN_ON_USE (dup2, "dup2 is unportable - "
Close NEWFD first if it is open.
Return newfd if successful, otherwise -1 and errno set.
See the Linux man page at
- <http://www.kernel.org/doc/man-pages/online/pages/man2/dup3.2.html>. */
+ <https://www.kernel.org/doc/man-pages/online/pages/man2/dup3.2.html>. */
# if @HAVE_DUP3@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define dup3 rpl_dup3
@@ -401,6 +400,13 @@ _GL_WARN_ON_USE (dup3, "dup3 is unportable - "
#if @GNULIB_ENVIRON@
+# if defined __CYGWIN__ && !defined __i386__
+/* The 'environ' variable is defined in a DLL. Therefore its declaration needs
+ the '__declspec(dllimport)' attribute, but the system's <unistd.h> lacks it.
+ This leads to a link error on 64-bit Cygwin when the option
+ -Wl,--disable-auto-import is in use. */
+_GL_EXTERN_C __declspec(dllimport) char **environ;
+# endif
# if !@HAVE_DECL_ENVIRON@
/* Set of environment variables and values. An array of strings of the form
"VARIABLE=VALUE", terminated with a NULL. */
@@ -462,13 +468,25 @@ _GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - "
#if @GNULIB_FACCESSAT@
-# if !@HAVE_FACCESSAT@
+# if @REPLACE_FACCESSAT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef faccessat
+# define faccessat rpl_faccessat
+# endif
+_GL_FUNCDECL_RPL (faccessat, int,
+ (int fd, char const *name, int mode, int flag)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (faccessat, int,
+ (int fd, char const *name, int mode, int flag));
+# else
+# if !@HAVE_FACCESSAT@
_GL_FUNCDECL_SYS (faccessat, int,
(int fd, char const *file, int mode, int flag)
_GL_ARG_NONNULL ((2)));
-# endif
+# endif
_GL_CXXALIAS_SYS (faccessat, int,
(int fd, char const *file, int mode, int flag));
+# endif
_GL_CXXALIASWARN (faccessat);
#elif defined GNULIB_POSIXCHECK
# undef faccessat
@@ -1149,7 +1167,7 @@ _GL_WARN_ON_USE (pipe, "pipe is unportable - "
Store the read-end as fd[0] and the write-end as fd[1].
Return 0 upon success, or -1 with errno set upon failure.
See also the Linux man page at
- <http://www.kernel.org/doc/man-pages/online/pages/man2/pipe2.2.html>. */
+ <https://www.kernel.org/doc/man-pages/online/pages/man2/pipe2.2.html>. */
# if @HAVE_PIPE2@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define pipe2 rpl_pipe2
@@ -1457,6 +1475,36 @@ _GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - "
#endif
+#if @GNULIB_TRUNCATE@
+/* Change the size of the file designated by FILENAME to become equal to LENGTH.
+ Return 0 if successful, otherwise -1 and errno set.
+ See the POSIX:2008 specification
+ <http://pubs.opengroup.org/onlinepubs/9699919799/functions/truncate.html>. */
+# if @REPLACE_TRUNCATE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef truncate
+# define truncate rpl_truncate
+# endif
+_GL_FUNCDECL_RPL (truncate, int, (const char *filename, off_t length)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (truncate, int, (const char *filename, off_t length));
+# else
+# if !@HAVE_TRUNCATE@
+_GL_FUNCDECL_SYS (truncate, int, (const char *filename, off_t length)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (truncate, int, (const char *filename, off_t length));
+# endif
+_GL_CXXALIASWARN (truncate);
+#elif defined GNULIB_POSIXCHECK
+# undef truncate
+# if HAVE_RAW_DECL_TRUNCATE
+_GL_WARN_ON_USE (truncate, "truncate is unportable - "
+ "use gnulib module truncate for portability");
+# endif
+#endif
+
+
#if @GNULIB_TTYNAME_R@
/* Store at most BUFLEN characters of the pathname of the terminal FD is
open on in BUF. Return 0 on success, otherwise an error number. */
diff --git a/lib/unlocked-io.h b/lib/unlocked-io.h
index aaf60a0..e3f0fcf 100644
--- a/lib/unlocked-io.h
+++ b/lib/unlocked-io.h
@@ -1,6 +1,6 @@
/* Prefer faster, non-thread-safe stdio functions if available.
- Copyright (C) 2001-2004, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2009-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Jim Meyering. */
diff --git a/lib/unused-parameter.h b/lib/unused-parameter.h
new file mode 100644
index 0000000..40a0ff8
--- /dev/null
+++ b/lib/unused-parameter.h
@@ -0,0 +1,36 @@
+/* A C macro for declaring that specific function parameters are not used.
+ Copyright (C) 2008-2018 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 <https://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/lib/verify.h b/lib/verify.h
index dcba9c8..bc7f99d 100644
--- a/lib/verify.h
+++ b/lib/verify.h
@@ -1,6 +1,6 @@
/* Compile-time assert-like macros.
- Copyright (C) 2005-2006, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */
diff --git a/lib/version-etc-fsf.c b/lib/version-etc-fsf.c
index 6b6f582..098a634 100644
--- a/lib/version-etc-fsf.c
+++ b/lib/version-etc-fsf.c
@@ -1,5 +1,5 @@
/* Variable with FSF copyright information, for version-etc.
- Copyright (C) 1999-2006, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 1999-2006, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Jim Meyering. */
diff --git a/lib/version-etc.c b/lib/version-etc.c
index ce84af3..56dc249 100644
--- a/lib/version-etc.c
+++ b/lib/version-etc.c
@@ -1,5 +1,5 @@
/* Print --version and bug-reporting information in a consistent format.
- Copyright (C) 1999-2017 Free Software Foundation, Inc.
+ Copyright (C) 1999-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Jim Meyering. */
@@ -38,7 +38,7 @@
# define PACKAGE PACKAGE_TARNAME
#endif
-enum { COPYRIGHT_YEAR = 2017 };
+enum { COPYRIGHT_YEAR = 2018 };
/* The three functions below display the --version information the
standard way.
@@ -85,7 +85,7 @@ version_etc_arn (FILE *stream,
fputs (_("\
\n\
-License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\n\
+License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.\n\
This is free software: you are free to change and redistribute it.\n\
There is NO WARRANTY, to the extent permitted by law.\n\
\n\
@@ -250,9 +250,9 @@ emit_bug_reporting_address (void)
#ifdef PACKAGE_URL
printf (_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
#else
- printf (_("%s home page: <http://www.gnu.org/software/%s/>\n"),
+ printf (_("%s home page: <https://www.gnu.org/software/%s/>\n"),
PACKAGE_NAME, PACKAGE);
#endif
- fputs (_("General help using GNU software: <http://www.gnu.org/gethelp/>\n"),
+ fputs (_("General help using GNU software: <https://www.gnu.org/gethelp/>\n"),
stdout);
}
diff --git a/lib/version-etc.h b/lib/version-etc.h
index b931de8..3b06bf9 100644
--- a/lib/version-etc.h
+++ b/lib/version-etc.h
@@ -1,5 +1,5 @@
/* Print --version and bug-reporting information in a consistent format.
- Copyright (C) 1999, 2003, 2005, 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2003, 2005, 2009-2018 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
@@ -12,7 +12,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Jim Meyering. */
diff --git a/lib/warn-on-use.h b/lib/warn-on-use.h
new file mode 100644
index 0000000..e76c384
--- /dev/null
+++ b/lib/warn-on-use.h
@@ -0,0 +1,109 @@
+/* A C macro for emitting warnings if a function is used.
+ Copyright (C) 2010-2018 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 <https://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/lib/wchar.in.h b/lib/wchar.in.h
index c8f99f5..51a5dda 100644
--- a/lib/wchar.in.h
+++ b/lib/wchar.in.h
@@ -1,6 +1,6 @@
/* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake. */
@@ -31,7 +31,7 @@
@PRAGMA_COLUMNS@
#if (((defined __need_mbstate_t || defined __need_wint_t) \
- && !defined __MINGW32__ && !defined __KLIBC__) \
+ && !defined __MINGW32__) \
|| (defined __hpux \
&& ((defined _INTTYPES_INCLUDED && !defined strtoimax) \
|| defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) \
@@ -113,12 +113,16 @@
# define WEOF -1
# endif
#else
-/* mingw and MSVC define wint_t as 'unsigned short' in <crtdefs.h>.
- This is too small: ISO C 99 section 7.24.1.(2) says that wint_t must be
- "unchanged by default argument promotions". Override it. */
+/* mingw and MSVC define wint_t as 'unsigned short' in <crtdefs.h> or
+ <stddef.h>. This is too small: ISO C 99 section 7.24.1.(2) says that
+ wint_t must be "unchanged by default argument promotions". Override it. */
# if @GNULIB_OVERRIDES_WINT_T@
# if !GNULIB_defined_wint_t
-# include <crtdefs.h>
+# if @HAVE_CRTDEFS_H@
+# include <crtdefs.h>
+# else
+# include <stddef.h>
+# endif
typedef unsigned int rpl_wint_t;
# undef wint_t
# define wint_t rpl_wint_t
@@ -448,11 +452,6 @@ _GL_CXXALIAS_RPL (wcwidth, int, (wchar_t));
# if !@HAVE_DECL_WCWIDTH@
/* wcwidth exists but is not declared. */
_GL_FUNCDECL_SYS (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE);
-# elif defined __KLIBC__
-/* On OS/2 kLIBC, wcwidth is a macro that expands to the name of a
- static inline function. The implementation of wcwidth in wcwidth.c
- causes a "conflicting types" error. */
-# undef wcwidth
# endif
_GL_CXXALIAS_SYS (wcwidth, int, (wchar_t));
# endif
@@ -1036,6 +1035,38 @@ _GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - "
#endif
+/* Convert *TP to a date and time wide string. See
+ <http://pubs.opengroup.org/onlinepubs/9699919799/functions/wcsftime.html>. */
+#if @GNULIB_WCSFTIME@
+# if @REPLACE_WCSFTIME@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef wcsftime
+# define wcsftime rpl_wcsftime
+# endif
+_GL_FUNCDECL_RPL (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize,
+ const wchar_t *__fmt, const struct tm *__tp)
+ _GL_ARG_NONNULL ((1, 3, 4)));
+_GL_CXXALIAS_RPL (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize,
+ const wchar_t *__fmt, const struct tm *__tp));
+# else
+# if !@HAVE_WCSFTIME@
+_GL_FUNCDECL_SYS (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize,
+ const wchar_t *__fmt, const struct tm *__tp)
+ _GL_ARG_NONNULL ((1, 3, 4)));
+# endif
+_GL_CXXALIAS_SYS (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize,
+ const wchar_t *__fmt, const struct tm *__tp));
+# endif
+_GL_CXXALIASWARN (wcsftime);
+#elif defined GNULIB_POSIXCHECK
+# undef wcsftime
+# if HAVE_RAW_DECL_WCSFTIME
+_GL_WARN_ON_USE (wcsftime, "wcsftime is unportable - "
+ "use gnulib module wcsftime for portability");
+# endif
+#endif
+
+
#endif /* _@GUARD_PREFIX@_WCHAR_H */
#endif /* _@GUARD_PREFIX@_WCHAR_H */
#endif
diff --git a/lib/wcrtomb.c b/lib/wcrtomb.c
index f956ecf..8f01972 100644
--- a/lib/wcrtomb.c
+++ b/lib/wcrtomb.c
@@ -1,5 +1,5 @@
/* Convert wide character to multibyte character.
- Copyright (C) 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/wctob.c b/lib/wctob.c
index ab320cf..070f97a 100644
--- a/lib/wctob.c
+++ b/lib/wctob.c
@@ -1,5 +1,5 @@
/* Convert wide character to unibyte character.
- Copyright (C) 2008, 2010-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2010-2018 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/wctomb-impl.h b/lib/wctomb-impl.h
index f76b595..58c3c0c 100644
--- a/lib/wctomb-impl.h
+++ b/lib/wctomb-impl.h
@@ -1,5 +1,5 @@
/* Convert wide character to multibyte character.
- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
int
wctomb (char *s, wchar_t wc)
diff --git a/lib/wctomb.c b/lib/wctomb.c
index 724ce4f..47addc4 100644
--- a/lib/wctomb.c
+++ b/lib/wctomb.c
@@ -1,5 +1,5 @@
/* Convert wide character to multibyte character.
- Copyright (C) 2011-2017 Free Software Foundation, Inc.
+ Copyright (C) 2011-2018 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/wctype.in.h b/lib/wctype.in.h
index d106cf2..1092016 100644
--- a/lib/wctype.in.h
+++ b/lib/wctype.in.h
@@ -1,6 +1,6 @@
/* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
- Copyright (C) 2006-2017 Free Software Foundation, Inc.
+ Copyright (C) 2006-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible and Paul Eggert. */
@@ -56,11 +56,13 @@
# include <wchar.h>
#endif
-/* mingw has declarations of towupper and towlower in <ctype.h> as
- well <wctype.h>. Include <ctype.h> in advance to avoid rpl_ prefix
- being added to the declarations. */
-#ifdef __MINGW32__
+/* Native Windows (mingw, MSVC) have declarations of towupper, towlower, and
+ isw* functions in <ctype.h>, <wchar.h> as well as in <wctype.h>. Include
+ <ctype.h>, <wchar.h> in advance to avoid rpl_ prefix being added to the
+ declarations. */
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
# include <ctype.h>
+# include <wchar.h>
#endif
/* Include the original <wctype.h> if it exists.
@@ -105,12 +107,16 @@ _GL_INLINE_HEADER_BEGIN
# define WEOF -1
# endif
#else
-/* mingw and MSVC define wint_t as 'unsigned short' in <crtdefs.h>.
- This is too small: ISO C 99 section 7.24.1.(2) says that wint_t must be
- "unchanged by default argument promotions". Override it. */
+/* mingw and MSVC define wint_t as 'unsigned short' in <crtdefs.h> or
+ <stddef.h>. This is too small: ISO C 99 section 7.24.1.(2) says that
+ wint_t must be "unchanged by default argument promotions". Override it. */
# if @GNULIB_OVERRIDES_WINT_T@
# if !GNULIB_defined_wint_t
-# include <crtdefs.h>
+# if @HAVE_CRTDEFS_H@
+# include <crtdefs.h>
+# else
+# include <stddef.h>
+# endif
typedef unsigned int rpl_wint_t;
# undef wint_t
# define wint_t rpl_wint_t
diff --git a/lib/xalloc-die.c b/lib/xalloc-die.c
index 3a64aa5..bfe6109 100644
--- a/lib/xalloc-die.c
+++ b/lib/xalloc-die.c
@@ -1,6 +1,6 @@
/* Report a memory allocation failure and exit.
- Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2017 Free Software
+ Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2018 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -14,7 +14,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/xalloc-oversized.h b/lib/xalloc-oversized.h
index ff0efc6..3426e10 100644
--- a/lib/xalloc-oversized.h
+++ b/lib/xalloc-oversized.h
@@ -1,6 +1,6 @@
/* xalloc-oversized.h -- memory allocation size checking
- Copyright (C) 1990-2000, 2003-2004, 2006-2017 Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2003-2004, 2006-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef XALLOC_OVERSIZED_H_
#define XALLOC_OVERSIZED_H_
@@ -44,7 +44,7 @@ typedef size_t __xalloc_count_type;
#if 7 <= __GNUC__
# define xalloc_oversized(n, s) \
__builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1)
-#elif 5 <= __GNUC__ && !__STRICT_ANSI__
+#elif 5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__
# define xalloc_oversized(n, s) \
(__builtin_constant_p (n) && __builtin_constant_p (s) \
? __xalloc_oversized (n, s) \
diff --git a/lib/xalloc.h b/lib/xalloc.h
index 484b67f..2a51b84 100644
--- a/lib/xalloc.h
+++ b/lib/xalloc.h
@@ -1,6 +1,6 @@
/* xalloc.h -- malloc with out-of-memory checking
- Copyright (C) 1990-2000, 2003-2004, 2006-2017 Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2003-2004, 2006-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef XALLOC_H_
#define XALLOC_H_
@@ -194,6 +194,8 @@ x2nrealloc (void *p, size_t *pn, size_t s)
n = DEFAULT_MXFAST / s;
n += !n;
}
+ if (xalloc_oversized (n, s))
+ xalloc_die ();
}
else
{
diff --git a/lib/xmalloc.c b/lib/xmalloc.c
index a4d308d..9a30d67 100644
--- a/lib/xmalloc.c
+++ b/lib/xmalloc.c
@@ -1,6 +1,6 @@
/* xmalloc.c -- malloc with out of memory checking
- Copyright (C) 1990-2000, 2002-2006, 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2002-2006, 2008-2018 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
@@ -13,7 +13,7 @@
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/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/m4/00gnulib.m4 b/m4/00gnulib.m4
index bb3512f..bd24796 100644
--- a/m4/00gnulib.m4
+++ b/m4/00gnulib.m4
@@ -1,5 +1,5 @@
# 00gnulib.m4 serial 3
-dnl Copyright (C) 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/absolute-header.m4 b/m4/absolute-header.m4
index c73adc8..4e67e5f 100644
--- a/m4/absolute-header.m4
+++ b/m4/absolute-header.m4
@@ -1,5 +1,5 @@
# absolute-header.m4 serial 16
-dnl Copyright (C) 2006-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/acl.m4 b/m4/acl.m4
index bf988d5..485cf9a 100644
--- a/m4/acl.m4
+++ b/m4/acl.m4
@@ -1,7 +1,7 @@
# acl.m4 - check for access control list (ACL) primitives
# serial 22
-# Copyright (C) 2002, 2004-2017 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/m4/alloca.m4 b/m4/alloca.m4
index 7f0604c..b9d94e8 100644
--- a/m4/alloca.m4
+++ b/m4/alloca.m4
@@ -1,5 +1,5 @@
# alloca.m4 serial 14
-dnl Copyright (C) 2002-2004, 2006-2007, 2009-2017 Free Software Foundation,
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2018 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -44,12 +44,12 @@ AC_DEFUN([gl_FUNC_ALLOCA],
AC_DEFUN([gl_PREREQ_ALLOCA], [:])
# This works around a bug in autoconf <= 2.68.
-# See <http://lists.gnu.org/archive/html/bug-gnulib/2011-06/msg00277.html>.
+# See <https://lists.gnu.org/r/bug-gnulib/2011-06/msg00277.html>.
m4_version_prereq([2.69], [] ,[
# This is taken from the following Autoconf patch:
-# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=6cd9f12520b0d6f76d3230d7565feba1ecf29497
+# https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=6cd9f12520b0d6f76d3230d7565feba1ecf29497
# _AC_LIBOBJ_ALLOCA
# -----------------
diff --git a/m4/arpa_inet_h.m4 b/m4/arpa_inet_h.m4
new file mode 100644
index 0000000..e73dc69
--- /dev/null
+++ b/m4/arpa_inet_h.m4
@@ -0,0 +1,57 @@
+# arpa_inet_h.m4 serial 13
+dnl Copyright (C) 2006, 2008-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Simon Josefsson and Bruno Haible
+
+AC_DEFUN([gl_HEADER_ARPA_INET],
+[
+ dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+ dnl once only, before all statements that occur in other macros.
+ AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS])
+
+ AC_CHECK_HEADERS_ONCE([arpa/inet.h])
+ if test $ac_cv_header_arpa_inet_h = yes; then
+ HAVE_ARPA_INET_H=1
+ else
+ HAVE_ARPA_INET_H=0
+ fi
+ AC_SUBST([HAVE_ARPA_INET_H])
+ dnl <arpa/inet.h> is always overridden, because of GNULIB_POSIXCHECK.
+ gl_CHECK_NEXT_HEADERS([arpa/inet.h])
+
+ AC_REQUIRE([gl_FEATURES_H])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[
+/* On some systems, this header is not self-consistent. */
+#if !(defined __GLIBC__ || defined __UCLIBC__)
+# include <sys/socket.h>
+#endif
+#ifdef __TANDEM
+# include <netdb.h>
+#endif
+#include <arpa/inet.h>
+ ]], [inet_ntop inet_pton])
+])
+
+AC_DEFUN([gl_ARPA_INET_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS])
+ gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+])
+
+AC_DEFUN([gl_ARPA_INET_H_DEFAULTS],
+[
+ GNULIB_INET_NTOP=0; AC_SUBST([GNULIB_INET_NTOP])
+ GNULIB_INET_PTON=0; AC_SUBST([GNULIB_INET_PTON])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_DECL_INET_NTOP=1; AC_SUBST([HAVE_DECL_INET_NTOP])
+ HAVE_DECL_INET_PTON=1; AC_SUBST([HAVE_DECL_INET_PTON])
+ REPLACE_INET_NTOP=0; AC_SUBST([REPLACE_INET_NTOP])
+ REPLACE_INET_PTON=0; AC_SUBST([REPLACE_INET_PTON])
+])
diff --git a/m4/asm-underscore.m4 b/m4/asm-underscore.m4
new file mode 100644
index 0000000..58a5299
--- /dev/null
+++ b/m4/asm-underscore.m4
@@ -0,0 +1,72 @@
+# asm-underscore.m4 serial 4
+dnl Copyright (C) 2010-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible. Based on as-underscore.m4 in GNU clisp.
+
+# gl_ASM_SYMBOL_PREFIX
+# Tests for the prefix of C symbols at the assembly language level and the
+# linker level. This prefix is either an underscore or empty. Defines the
+# C macro USER_LABEL_PREFIX to this prefix, and sets ASM_SYMBOL_PREFIX to
+# a stringified variant of this prefix.
+
+AC_DEFUN([gl_ASM_SYMBOL_PREFIX],
+[
+ AC_REQUIRE([AC_PROG_EGREP])
+ dnl We don't use GCC's __USER_LABEL_PREFIX__ here, because
+ dnl 1. It works only for GCC.
+ dnl 2. It is incorrectly defined on some platforms, in some GCC versions.
+ AC_REQUIRE([gl_C_ASM])
+ AC_CACHE_CHECK(
+ [whether C symbols are prefixed with underscore at the linker level],
+ [gl_cv_prog_as_underscore],
+ [cat > conftest.c <<EOF
+#ifdef __cplusplus
+extern "C" int foo (void);
+#endif
+int foo(void) { return 0; }
+EOF
+ # Look for the assembly language name in the .s file.
+ AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1
+ if LC_ALL=C $EGREP '(^|[[^a-zA-Z0-9_]])_foo([[^a-zA-Z0-9_]]|$)' conftest.$gl_asmext >/dev/null; then
+ gl_cv_prog_as_underscore=yes
+ else
+ gl_cv_prog_as_underscore=no
+ fi
+ rm -f conftest*
+ ])
+ if test $gl_cv_prog_as_underscore = yes; then
+ USER_LABEL_PREFIX=_
+ else
+ USER_LABEL_PREFIX=
+ fi
+ AC_DEFINE_UNQUOTED([USER_LABEL_PREFIX], [$USER_LABEL_PREFIX],
+ [Define to the prefix of C symbols at the assembler and linker level,
+ either an underscore or empty.])
+ ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
+ AC_SUBST([ASM_SYMBOL_PREFIX])
+])
+
+# gl_C_ASM
+# Determines how to produce an assembly language file from C source code.
+# Sets the variables:
+# gl_asmext - the extension of assembly language output,
+# gl_c_asm_opt - the C compiler option that produces assembly language output.
+
+AC_DEFUN([gl_C_ASM],
+[
+ AC_EGREP_CPP([MicrosoftCompiler],
+ [
+#ifdef _MSC_VER
+MicrosoftCompiler
+#endif
+ ],
+ [gl_asmext='asm'
+ gl_c_asm_opt='-c -Fa'
+ ],
+ [gl_asmext='s'
+ gl_c_asm_opt='-S'
+ ])
+])
diff --git a/m4/assert.m4 b/m4/assert.m4
index 3485b7d..0cad039 100644
--- a/m4/assert.m4
+++ b/m4/assert.m4
@@ -1,6 +1,6 @@
#serial 7
-# Copyright (C) 1998-1999, 2001, 2004, 2008-2017 Free Software Foundation, Inc.
+# Copyright (C) 1998-1999, 2001, 2004, 2008-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/m4/btowc.m4 b/m4/btowc.m4
index 1021809..8acdffc 100644
--- a/m4/btowc.m4
+++ b/m4/btowc.m4
@@ -1,5 +1,5 @@
-# btowc.m4 serial 10
-dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
+# btowc.m4 serial 11
+dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -10,7 +10,7 @@ AC_DEFUN([gl_FUNC_BTOWC],
dnl Check whether <wchar.h> is usable at all, first. Otherwise the test
dnl program below may lead to an endless loop. See
- dnl <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>.
+ dnl <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>.
AC_REQUIRE([gl_WCHAR_H_INLINE_OK])
AC_CHECK_FUNCS_ONCE([btowc])
@@ -50,6 +50,8 @@ changequote(,)dnl
case "$host_os" in
# Guess no on Cygwin.
cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_btowc_nul="guessing yes" ;;
# Guess yes otherwise.
*) gl_cv_func_btowc_nul="guessing yes" ;;
esac
@@ -65,10 +67,12 @@ changequote([,])dnl
dnl is present.
changequote(,)dnl
case "$host_os" in
- # Guess no on IRIX.
- irix*) gl_cv_func_btowc_eof="guessing no" ;;
- # Guess yes otherwise.
- *) gl_cv_func_btowc_eof="guessing yes" ;;
+ # Guess no on IRIX.
+ irix*) gl_cv_func_btowc_eof="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_btowc_eof="guessing yes" ;;
esac
changequote([,])dnl
if test $LOCALE_FR != none; then
diff --git a/m4/builtin-expect.m4 b/m4/builtin-expect.m4
index aa3364b..a1eaf96 100644
--- a/m4/builtin-expect.m4
+++ b/m4/builtin-expect.m4
@@ -1,6 +1,6 @@
dnl Check for __builtin_expect.
-dnl Copyright 2016-2017 Free Software Foundation, Inc.
+dnl Copyright 2016-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/canonicalize.m4 b/m4/canonicalize.m4
index c04ff8d..9de4f13 100644
--- a/m4/canonicalize.m4
+++ b/m4/canonicalize.m4
@@ -1,6 +1,6 @@
-# canonicalize.m4 serial 28
+# canonicalize.m4 serial 29
-dnl Copyright (C) 2003-2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -113,6 +113,8 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_realpath_works="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_func_realpath_works="guessing no" ;;
esac
diff --git a/m4/close-stream.m4 b/m4/close-stream.m4
index 65a1acc..c9bf62e 100644
--- a/m4/close-stream.m4
+++ b/m4/close-stream.m4
@@ -1,5 +1,5 @@
#serial 4
-dnl Copyright (C) 2006-2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/close.m4 b/m4/close.m4
index 005a43a..f11b17e 100644
--- a/m4/close.m4
+++ b/m4/close.m4
@@ -1,5 +1,5 @@
-# close.m4 serial 8
-dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
+# close.m4 serial 9
+dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,10 +7,12 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_CLOSE],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- AC_REQUIRE([gl_MSVC_INVAL])
- if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
- REPLACE_CLOSE=1
- fi
+ m4_ifdef([gl_MSVC_INVAL], [
+ AC_REQUIRE([gl_MSVC_INVAL])
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ REPLACE_CLOSE=1
+ fi
+ ])
m4_ifdef([gl_PREREQ_SYS_H_WINSOCK2], [
gl_PREREQ_SYS_H_WINSOCK2
if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
diff --git a/m4/closedir.m4 b/m4/closedir.m4
index 40765b1..338b5a7 100644
--- a/m4/closedir.m4
+++ b/m4/closedir.m4
@@ -1,5 +1,5 @@
-# closedir.m4 serial 5
-dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
+# closedir.m4 serial 6
+dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_CLOSEDIR],
[
AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_FUNCS([closedir])
if test $ac_cv_func_closedir = no; then
diff --git a/m4/closeout.m4 b/m4/closeout.m4
index 3c3aa2f..6442406 100644
--- a/m4/closeout.m4
+++ b/m4/closeout.m4
@@ -1,5 +1,5 @@
# closeout.m4 serial 6
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2017 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2018 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/configmake.m4 b/m4/configmake.m4
index b783296..e0b5835 100644
--- a/m4/configmake.m4
+++ b/m4/configmake.m4
@@ -1,5 +1,5 @@
# configmake.m4 serial 2
-dnl Copyright (C) 2010-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/ctype.m4 b/m4/ctype.m4
index 3791f46..85a7e3e 100644
--- a/m4/ctype.m4
+++ b/m4/ctype.m4
@@ -1,5 +1,5 @@
# ctype_h.m4 serial 6
-dnl Copyright (C) 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/dirent_h.m4 b/m4/dirent_h.m4
index 1f9c4f3..b054a92 100644
--- a/m4/dirent_h.m4
+++ b/m4/dirent_h.m4
@@ -1,5 +1,5 @@
# dirent_h.m4 serial 16
-dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/dirfd.m4 b/m4/dirfd.m4
index b4ec3d1..48589b9 100644
--- a/m4/dirfd.m4
+++ b/m4/dirfd.m4
@@ -1,8 +1,8 @@
-# serial 24 -*- Autoconf -*-
+# serial 26 -*- Autoconf -*-
dnl Find out how to get the file descriptor associated with an open DIR*.
-# Copyright (C) 2001-2006, 2008-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2006, 2008-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -12,6 +12,7 @@ dnl From Jim Meyering
AC_DEFUN([gl_FUNC_DIRFD],
[
AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
dnl Persuade glibc <dirent.h> to declare dirfd().
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
@@ -25,15 +26,15 @@ AC_DEFUN([gl_FUNC_DIRFD],
fi
AC_CACHE_CHECK([whether dirfd is a macro],
- gl_cv_func_dirfd_macro,
+ [gl_cv_func_dirfd_macro],
[AC_EGREP_CPP([dirent_header_defines_dirfd], [
#include <sys/types.h>
#include <dirent.h>
#ifdef dirfd
dirent_header_defines_dirfd
#endif],
- gl_cv_func_dirfd_macro=yes,
- gl_cv_func_dirfd_macro=no)])
+ [gl_cv_func_dirfd_macro=yes],
+ [gl_cv_func_dirfd_macro=no])])
# Use the replacement if we have no function or macro with that name,
# or if OS/2 kLIBC whose dirfd() does not work.
diff --git a/m4/dirname.m4 b/m4/dirname.m4
index 46f5394..820b047 100644
--- a/m4/dirname.m4
+++ b/m4/dirname.m4
@@ -1,5 +1,5 @@
#serial 10 -*- autoconf -*-
-dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/double-slash-root.m4 b/m4/double-slash-root.m4
index c80f9ea..e99d4a3 100644
--- a/m4/double-slash-root.m4
+++ b/m4/double-slash-root.m4
@@ -1,5 +1,5 @@
# double-slash-root.m4 serial 4 -*- Autoconf -*-
-dnl Copyright (C) 2006, 2008-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/dup2.m4 b/m4/dup2.m4
index bdb9ae2..c785d37 100644
--- a/m4/dup2.m4
+++ b/m4/dup2.m4
@@ -1,5 +1,5 @@
#serial 25
-dnl Copyright (C) 2002, 2005, 2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005, 2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/eealloc.m4 b/m4/eealloc.m4
index 96b9bca..a5a4e26 100644
--- a/m4/eealloc.m4
+++ b/m4/eealloc.m4
@@ -1,5 +1,5 @@
# eealloc.m4 serial 3
-dnl Copyright (C) 2003, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/environ.m4 b/m4/environ.m4
index 3b9fa5f..68b67ea 100644
--- a/m4/environ.m4
+++ b/m4/environ.m4
@@ -1,5 +1,5 @@
# environ.m4 serial 6
-dnl Copyright (C) 2001-2004, 2006-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2004, 2006-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/errno_h.m4 b/m4/errno_h.m4
index 9f0f2f2..9dbdedd 100644
--- a/m4/errno_h.m4
+++ b/m4/errno_h.m4
@@ -1,5 +1,5 @@
# errno_h.m4 serial 12
-dnl Copyright (C) 2004, 2006, 2008-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2008-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/error.m4 b/m4/error.m4
index 57c6f12..280fdce 100644
--- a/m4/error.m4
+++ b/m4/error.m4
@@ -1,6 +1,6 @@
#serial 14
-# Copyright (C) 1996-1998, 2001-2004, 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 1996-1998, 2001-2004, 2009-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/m4/extensions.m4 b/m4/extensions.m4
index c60f537..71a854f 100644
--- a/m4/extensions.m4
+++ b/m4/extensions.m4
@@ -1,7 +1,7 @@
-# serial 15 -*- Autoconf -*-
+# serial 18 -*- Autoconf -*-
# Enable extensions on systems that normally disable them.
-# Copyright (C) 2003, 2006-2017 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -68,6 +68,14 @@ dnl configure.ac when using autoheader 2.62.
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
+/* Enable NetBSD extensions on NetBSD. */
+#ifndef _NETBSD_SOURCE
+# undef _NETBSD_SOURCE
+#endif
+/* Enable OpenBSD extensions on NetBSD. */
+#ifndef _OPENBSD_SOURCE
+# undef _OPENBSD_SOURCE
+#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
@@ -110,6 +118,11 @@ dnl configure.ac when using autoheader 2.62.
#ifndef _XOPEN_SOURCE
# undef _XOPEN_SOURCE
#endif
+/* Enable X/Open compliant socket functions that do not require linking
+ with -lxnet on HP-UX 11.11. */
+#ifndef _HPUX_ALT_XOPEN_SOCKET_API
+# undef _HPUX_ALT_XOPEN_SOCKET_API
+#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
@@ -128,6 +141,8 @@ dnl configure.ac when using autoheader 2.62.
AC_DEFINE([_ALL_SOURCE])
AC_DEFINE([_DARWIN_C_SOURCE])
AC_DEFINE([_GNU_SOURCE])
+ AC_DEFINE([_NETBSD_SOURCE])
+ AC_DEFINE([_OPENBSD_SOURCE])
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
AC_DEFINE([__STDC_WANT_IEC_60559_ATTRIBS_EXT__])
AC_DEFINE([__STDC_WANT_IEC_60559_BFP_EXT__])
@@ -153,6 +168,7 @@ dnl configure.ac when using autoheader 2.62.
[ac_cv_should_define__xopen_source=yes])])])
test $ac_cv_should_define__xopen_source = yes &&
AC_DEFINE([_XOPEN_SOURCE], [500])
+ AC_DEFINE([_HPUX_ALT_XOPEN_SOCKET_API])
])# AC_USE_SYSTEM_EXTENSIONS
# gl_USE_SYSTEM_EXTENSIONS
diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4
index 00f9609..da8a2cc 100644
--- a/m4/extern-inline.m4
+++ b/m4/extern-inline.m4
@@ -1,6 +1,6 @@
dnl 'extern inline' a la ISO C99.
-dnl Copyright 2012-2017 Free Software Foundation, Inc.
+dnl Copyright 2012-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -11,7 +11,7 @@ AC_DEFUN([gl_EXTERN_INLINE],
[/* Please see the Gnulib manual for how to use these macros.
Suppress extern inline with HP-UX cc, as it appears to be broken; see
- <http://lists.gnu.org/archive/html/bug-texinfo/2013-02/msg00030.html>.
+ <https://lists.gnu.org/r/bug-texinfo/2013-02/msg00030.html>.
Suppress extern inline with Sun C in standards-conformance mode, as it
mishandles inline functions that call each other. E.g., for 'inline void f
@@ -28,16 +28,16 @@ AC_DEFUN([gl_EXTERN_INLINE],
from calling static functions. This bug is known to occur on:
OS X 10.8 and earlier; see:
- http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html
+ https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html
DragonFly; see
http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
FreeBSD; see:
- http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html
+ https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html
OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
- for clang but remains for g++; see <http://trac.macports.org/ticket/41033>.
+ for clang but remains for g++; see <https://trac.macports.org/ticket/41033>.
Assume DragonFly and FreeBSD will be similar. */
#if (((defined __APPLE__ && defined __MACH__) \
|| defined __DragonFly__ || defined __FreeBSD__) \
diff --git a/m4/fcntl-o.m4 b/m4/fcntl-o.m4
index 3c3b63c..4dc3daa 100644
--- a/m4/fcntl-o.m4
+++ b/m4/fcntl-o.m4
@@ -1,5 +1,5 @@
-# fcntl-o.m4 serial 4
-dnl Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc.
+# fcntl-o.m4 serial 5
+dnl Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -18,6 +18,7 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
[AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
[AC_REQUIRE([AC_GNU_SOURCE])])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_HEADERS_ONCE([unistd.h])
AC_CHECK_FUNCS_ONCE([symlink])
AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h],
@@ -116,7 +117,13 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
*) gl_cv_header_working_fcntl_h='no';;
esac],
- [gl_cv_header_working_fcntl_h=cross-compiling])])
+ [case "$host_os" in
+ # Guess 'no' on native Windows.
+ mingw*) gl_cv_header_working_fcntl_h='no' ;;
+ *) gl_cv_header_working_fcntl_h=cross-compiling ;;
+ esac
+ ])
+ ])
case $gl_cv_header_working_fcntl_h in #(
*O_NOATIME* | no | cross-compiling) ac_val=0;; #(
diff --git a/m4/fcntl.m4 b/m4/fcntl.m4
new file mode 100644
index 0000000..46b2445
--- /dev/null
+++ b/m4/fcntl.m4
@@ -0,0 +1,126 @@
+# fcntl.m4 serial 9
+dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# For now, this module ensures that fcntl()
+# - supports F_DUPFD correctly
+# - supports or emulates F_DUPFD_CLOEXEC
+# - supports F_GETFD
+# Still to be ported to mingw:
+# - F_SETFD
+# - F_GETFL, F_SETFL
+# - F_GETOWN, F_SETOWN
+# - F_GETLK, F_SETLK, F_SETLKW
+AC_DEFUN([gl_FUNC_FCNTL],
+[
+ dnl Persuade glibc to expose F_DUPFD_CLOEXEC.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CHECK_FUNCS_ONCE([fcntl])
+ if test $ac_cv_func_fcntl = no; then
+ gl_REPLACE_FCNTL
+ else
+ dnl cygwin 1.5.x F_DUPFD has wrong errno, and allows negative target
+ dnl haiku alpha 2 F_DUPFD has wrong errno
+ AC_CACHE_CHECK([whether fcntl handles F_DUPFD correctly],
+ [gl_cv_func_fcntl_f_dupfd_works],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <errno.h>
+ #include <fcntl.h>
+ #include <limits.h>
+ #include <sys/resource.h>
+ #include <unistd.h>
+ #ifndef RLIM_SAVED_CUR
+ # define RLIM_SAVED_CUR RLIM_INFINITY
+ #endif
+ #ifndef RLIM_SAVED_MAX
+ # define RLIM_SAVED_MAX RLIM_INFINITY
+ #endif
+ ]],
+ [[int result = 0;
+ int bad_fd = INT_MAX;
+ struct rlimit rlim;
+ if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
+ && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
+ && rlim.rlim_cur != RLIM_INFINITY
+ && rlim.rlim_cur != RLIM_SAVED_MAX
+ && rlim.rlim_cur != RLIM_SAVED_CUR)
+ bad_fd = rlim.rlim_cur;
+ if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
+ if (errno != EINVAL) result |= 2;
+ if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
+ if (errno != EINVAL) result |= 8;
+ /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
+ {
+ int fd;
+ fd = open (".", O_RDONLY);
+ if (fd == -1)
+ result |= 16;
+ else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
+ result |= 32;
+
+ close (fd);
+ }
+ return result;]])],
+ [gl_cv_func_fcntl_f_dupfd_works=yes],
+ [gl_cv_func_fcntl_f_dupfd_works=no],
+ [case $host_os in
+ aix* | cygwin* | haiku*)
+ gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
+ *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
+ esac])])
+ case $gl_cv_func_fcntl_f_dupfd_works in
+ *yes) ;;
+ *) gl_REPLACE_FCNTL
+ AC_DEFINE([FCNTL_DUPFD_BUGGY], [1], [Define this to 1 if F_DUPFD
+ behavior does not match POSIX]) ;;
+ esac
+
+ dnl Many systems lack F_DUPFD_CLOEXEC
+ AC_CACHE_CHECK([whether fcntl understands F_DUPFD_CLOEXEC],
+ [gl_cv_func_fcntl_f_dupfd_cloexec],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <fcntl.h>
+#ifndef F_DUPFD_CLOEXEC
+choke me
+#endif
+ ]])],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifdef __linux__
+/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
+ it to support the semantics on older kernels that failed with EINVAL. */
+choke me
+#endif
+ ]])],
+ [gl_cv_func_fcntl_f_dupfd_cloexec=yes],
+ [gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"])],
+ [gl_cv_func_fcntl_f_dupfd_cloexec=no])])
+ if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
+ gl_REPLACE_FCNTL
+ dnl No witness macro needed for this bug.
+ fi
+ fi
+ dnl Replace fcntl() for supporting the gnulib-defined fchdir() function,
+ dnl to keep fchdir's bookkeeping up-to-date.
+ m4_ifdef([gl_FUNC_FCHDIR], [
+ gl_TEST_FCHDIR
+ if test $HAVE_FCHDIR = 0; then
+ gl_REPLACE_FCNTL
+ fi
+ ])
+])
+
+AC_DEFUN([gl_REPLACE_FCNTL],
+[
+ AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([fcntl])
+ if test $ac_cv_func_fcntl = no; then
+ HAVE_FCNTL=0
+ else
+ REPLACE_FCNTL=1
+ fi
+])
diff --git a/m4/fcntl_h.m4 b/m4/fcntl_h.m4
index 09c21ef..9fd3ab1 100644
--- a/m4/fcntl_h.m4
+++ b/m4/fcntl_h.m4
@@ -1,6 +1,6 @@
# serial 15
# Configure fcntl.h.
-dnl Copyright (C) 2006-2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/fdopen.m4 b/m4/fdopen.m4
index 8e8619c..bff80ab 100644
--- a/m4/fdopen.m4
+++ b/m4/fdopen.m4
@@ -1,5 +1,5 @@
-# fdopen.m4 serial 3
-dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
+# fdopen.m4 serial 4
+dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -8,10 +8,13 @@ AC_DEFUN([gl_FUNC_FDOPEN],
[
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
- AC_REQUIRE([gl_MSVC_INVAL])
- if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
- REPLACE_FDOPEN=1
- else
+ m4_ifdef([gl_MSVC_INVAL], [
+ AC_REQUIRE([gl_MSVC_INVAL])
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ REPLACE_FDOPEN=1
+ fi
+ ])
+ if test $REPLACE_FDOPEN = 0; then
dnl Test whether fdopen() sets errno when it fails due to a bad fd argument.
AC_CACHE_CHECK([whether fdopen sets errno], [gl_cv_func_fdopen_works],
[
diff --git a/m4/fflush.m4 b/m4/fflush.m4
index 1d1f1ba..9098b10 100644
--- a/m4/fflush.m4
+++ b/m4/fflush.m4
@@ -1,6 +1,6 @@
-# fflush.m4 serial 15
+# fflush.m4 serial 17
-# Copyright (C) 2007-2017 Free Software Foundation, Inc.
+# Copyright (C) 2007-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,9 +14,10 @@ AC_DEFUN([gl_FUNC_FFLUSH],
[
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
gl_FUNC_FFLUSH_STDIN
- if test $gl_cv_func_fflush_stdin != yes; then
- REPLACE_FFLUSH=1
- fi
+ case "$gl_cv_func_fflush_stdin" in
+ *yes) ;;
+ *) REPLACE_FFLUSH=1 ;;
+ esac
])
dnl Determine whether fflush works on input streams.
@@ -24,6 +25,7 @@ dnl Sets gl_cv_func_fflush_stdin.
AC_DEFUN([gl_FUNC_FFLUSH_STDIN],
[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_HEADERS_ONCE([unistd.h])
AC_CACHE_CHECK([whether fflush works on input streams],
[gl_cv_func_fflush_stdin],
@@ -44,16 +46,16 @@ AC_DEFUN([gl_FUNC_FFLUSH_STDIN],
return 1;
fd = fileno (f);
if (fd < 0 || fread (buffer, 1, 5, f) != 5)
- return 2;
+ { fclose (f); return 2; }
/* For deterministic results, ensure f read a bigger buffer. */
if (lseek (fd, 0, SEEK_CUR) == 5)
- return 3;
+ { fclose (f); return 3; }
/* POSIX requires fflush-fseek to set file offset of fd. This fails
on BSD systems and on mingw. */
if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
- return 4;
+ { fclose (f); return 4; }
if (lseek (fd, 0, SEEK_CUR) != 5)
- return 5;
+ { fclose (f); return 5; }
/* Verify behaviour of fflush after ungetc. See
<http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
/* Verify behaviour of fflush after a backup ungetc. This fails on
@@ -62,23 +64,31 @@ AC_DEFUN([gl_FUNC_FFLUSH_STDIN],
ungetc (c, f);
fflush (f);
if (fgetc (f) != c)
- return 6;
+ { fclose (f); return 6; }
/* Verify behaviour of fflush after a non-backup ungetc. This fails
on glibc 2.8 and on BSD systems. */
c = fgetc (f);
ungetc ('@', f);
fflush (f);
if (fgetc (f) != c)
- return 7;
+ { fclose (f); return 7; }
+ fclose (f);
return 0;
- ]])], [gl_cv_func_fflush_stdin=yes], [gl_cv_func_fflush_stdin=no],
- [gl_cv_func_fflush_stdin=cross])
+ ]])],
+ [gl_cv_func_fflush_stdin=yes],
+ [gl_cv_func_fflush_stdin=no],
+ [case "$host_os" in
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
+ *) gl_cv_func_fflush_stdin=cross ;;
+ esac
+ ])
rm conftest.txt
])
- case $gl_cv_func_fflush_stdin in
- yes) gl_func_fflush_stdin=1 ;;
- no) gl_func_fflush_stdin=0 ;;
- *) gl_func_fflush_stdin='(-1)' ;;
+ case "$gl_cv_func_fflush_stdin" in
+ *yes) gl_func_fflush_stdin=1 ;;
+ *no) gl_func_fflush_stdin=0 ;;
+ *) gl_func_fflush_stdin='(-1)' ;;
esac
AC_DEFINE_UNQUOTED([FUNC_FFLUSH_STDIN], [$gl_func_fflush_stdin],
[Define to 1 if fflush is known to work on stdin as per POSIX.1-2008,
diff --git a/m4/flexmember.m4 b/m4/flexmember.m4
index 35580ac..db93cf3 100644
--- a/m4/flexmember.m4
+++ b/m4/flexmember.m4
@@ -1,7 +1,7 @@
-# serial 4
+# serial 5
# Check for flexible array member support.
-# Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -17,12 +17,15 @@ AC_DEFUN([AC_C_FLEXIBLE_ARRAY_MEMBER],
[[#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
- struct s { int n; double d[]; };]],
+ struct m { struct m *next, **list; char name[]; };
+ struct s { struct s *p; struct m *m; int n; double d[]; };]],
[[int m = getchar ();
size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
nbytes += sizeof (struct s) - 1;
nbytes -= nbytes % sizeof (struct s);
struct s *p = malloc (nbytes);
+ p->p = p;
+ p->m = NULL;
p->d[0] = 0.0;
return p->d != (double *) NULL;]])],
[ac_cv_c_flexmember=yes],
diff --git a/m4/fpending.m4 b/m4/fpending.m4
index 3a5e934..c897073 100644
--- a/m4/fpending.m4
+++ b/m4/fpending.m4
@@ -1,6 +1,6 @@
# serial 22
-# Copyright (C) 2000-2001, 2004-2017 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2004-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/m4/fpurge.m4 b/m4/fpurge.m4
index 57be1b9..99d1fc4 100644
--- a/m4/fpurge.m4
+++ b/m4/fpurge.m4
@@ -1,5 +1,5 @@
-# fpurge.m4 serial 7
-dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
+# fpurge.m4 serial 8
+dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -14,23 +14,40 @@ AC_DEFUN([gl_FUNC_FPURGE],
HAVE_FPURGE=1
# Detect BSD bug. Only cygwin 1.7 is known to be immune.
AC_CACHE_CHECK([whether fpurge works], [gl_cv_func_fpurge_works],
- [AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
-]], [FILE *f = fopen ("conftest.txt", "w+");
- if (!f) return 1;
- if (fputc ('a', f) != 'a') return 2;
- rewind (f);
- if (fgetc (f) != 'a') return 3;
- if (fgetc (f) != EOF) return 4;
- if (fpurge (f) != 0) return 5;
- if (putc ('b', f) != 'b') return 6;
- if (fclose (f) != 0) return 7;
- if ((f = fopen ("conftest.txt", "r")) == NULL) return 8;
- if (fgetc (f) != 'a') return 9;
- if (fgetc (f) != 'b') return 10;
- if (fgetc (f) != EOF) return 11;
- if (fclose (f) != 0) return 12;
- if (remove ("conftest.txt") != 0) return 13;
- return 0;])],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdio.h>
+]],
+ [FILE *f = fopen ("conftest.txt", "w+");
+ if (!f)
+ return 1;
+ if (fputc ('a', f) != 'a')
+ { fclose (f); return 2; }
+ rewind (f);
+ if (fgetc (f) != 'a')
+ { fclose (f); return 3; }
+ if (fgetc (f) != EOF)
+ { fclose (f); return 4; }
+ if (fpurge (f) != 0)
+ { fclose (f); return 5; }
+ if (putc ('b', f) != 'b')
+ { fclose (f); return 6; }
+ if (fclose (f) != 0)
+ return 7;
+ if ((f = fopen ("conftest.txt", "r")) == NULL)
+ return 8;
+ if (fgetc (f) != 'a')
+ { fclose (f); return 9; }
+ if (fgetc (f) != 'b')
+ { fclose (f); return 10; }
+ if (fgetc (f) != EOF)
+ { fclose (f); return 11; }
+ if (fclose (f) != 0)
+ return 12;
+ if (remove ("conftest.txt") != 0)
+ return 13;
+ return 0;
+ ])],
[gl_cv_func_fpurge_works=yes], [gl_cv_func_fpurge_works=no],
[gl_cv_func_fpurge_works='guessing no'])])
if test "x$gl_cv_func_fpurge_works" != xyes; then
diff --git a/m4/freading.m4 b/m4/freading.m4
index 52079ff..59a3528 100644
--- a/m4/freading.m4
+++ b/m4/freading.m4
@@ -1,5 +1,5 @@
# freading.m4 serial 1
-dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/fseek.m4 b/m4/fseek.m4
index 4664ac1..4a9ac7e 100644
--- a/m4/fseek.m4
+++ b/m4/fseek.m4
@@ -1,5 +1,5 @@
# fseek.m4 serial 4
-dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/fseeko.m4 b/m4/fseeko.m4
index fdb565b..8967cf1 100644
--- a/m4/fseeko.m4
+++ b/m4/fseeko.m4
@@ -1,5 +1,5 @@
-# fseeko.m4 serial 17
-dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
+# fseeko.m4 serial 18
+dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -37,9 +37,10 @@ AC_DEFUN([gl_FUNC_FSEEKO],
fi
m4_ifdef([gl_FUNC_FFLUSH_STDIN], [
gl_FUNC_FFLUSH_STDIN
- if test $gl_cv_func_fflush_stdin != yes; then
- REPLACE_FSEEKO=1
- fi
+ case "$gl_cv_func_fflush_stdin" in
+ *yes) ;;
+ *) REPLACE_FSEEKO=1 ;;
+ esac
])
fi
])
diff --git a/m4/fstat.m4 b/m4/fstat.m4
index 14c871a..f7fc383 100644
--- a/m4/fstat.m4
+++ b/m4/fstat.m4
@@ -1,22 +1,22 @@
-# fstat.m4 serial 4
-dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
+# fstat.m4 serial 6
+dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_FSTAT],
[
+ AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
- AC_REQUIRE([gl_MSVC_INVAL])
- if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
- REPLACE_FSTAT=1
- fi
-
- AC_REQUIRE([gl_HEADER_SYS_STAT_H])
- if test $WINDOWS_64_BIT_ST_SIZE = 1; then
- REPLACE_FSTAT=1
- fi
+ case "$host_os" in
+ mingw* | solaris*)
+ dnl On MinGW, the original stat() returns st_atime, st_mtime,
+ dnl st_ctime values that are affected by the time zone.
+ dnl Solaris stat can return a negative tv_nsec.
+ REPLACE_FSTAT=1
+ ;;
+ esac
dnl Replace fstat() for supporting the gnulib-defined open() on directories.
m4_ifdef([gl_FUNC_FCHDIR], [
@@ -32,5 +32,8 @@ AC_DEFUN([gl_FUNC_FSTAT],
])
])
-# Prerequisites of lib/fstat.c.
-AC_DEFUN([gl_PREREQ_FSTAT], [:])
+# Prerequisites of lib/fstat.c and lib/stat-w32.c.
+AC_DEFUN([gl_PREREQ_FSTAT], [
+ AC_REQUIRE([gl_HEADER_SYS_STAT_H])
+ :
+])
diff --git a/m4/ftell.m4 b/m4/ftell.m4
index b8336ce..0ae8a92 100644
--- a/m4/ftell.m4
+++ b/m4/ftell.m4
@@ -1,5 +1,5 @@
# ftell.m4 serial 3
-dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/ftello.m4 b/m4/ftello.m4
index 0867c2a..b8fc70d 100644
--- a/m4/ftello.m4
+++ b/m4/ftello.m4
@@ -1,5 +1,5 @@
-# ftello.m4 serial 11
-dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
+# ftello.m4 serial 13
+dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -53,6 +53,8 @@ changequote(,)dnl
case "$host_os" in
# Guess no on Solaris.
solaris*) gl_cv_func_ftello_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_ftello_works="guessing yes" ;;
# Guess yes otherwise.
*) gl_cv_func_ftello_works="guessing yes" ;;
esac
@@ -73,7 +75,7 @@ main (void)
if (fp == NULL)
return 70;
if (fwrite ("foogarsh", 1, 8, fp) < 8)
- return 71;
+ { fclose (fp); return 71; }
if (fclose (fp))
return 72;
@@ -84,19 +86,19 @@ main (void)
if (fp == NULL)
return 73;
if (fseek (fp, -1, SEEK_END))
- return 74;
+ { fclose (fp); return 74; }
if (!(getc (fp) == 'h'))
- return 1;
+ { fclose (fp); return 1; }
if (!(getc (fp) == EOF))
- return 2;
+ { fclose (fp); return 2; }
if (!(ftell (fp) == 8))
- return 3;
+ { fclose (fp); return 3; }
if (!(ftell (fp) == 8))
- return 4;
+ { fclose (fp); return 4; }
if (!(putc ('!', fp) == '!'))
- return 5;
+ { fclose (fp); return 5; }
if (!(ftell (fp) == 9))
- return 6;
+ { fclose (fp); return 6; }
if (!(fclose (fp) == 0))
return 7;
fp = fopen (TESTFILE, "r");
@@ -105,9 +107,9 @@ main (void)
{
char buf[10];
if (!(fread (buf, 1, 10, fp) == 9))
- return 10;
+ { fclose (fp); return 10; }
if (!(memcmp (buf, "foogarsh!", 9) == 0))
- return 11;
+ { fclose (fp); return 11; }
}
if (!(fclose (fp) == 0))
return 12;
diff --git a/m4/ftruncate.m4 b/m4/ftruncate.m4
new file mode 100644
index 0000000..ffeb4e6
--- /dev/null
+++ b/m4/ftruncate.m4
@@ -0,0 +1,40 @@
+# serial 20
+
+# See if we need to emulate a missing ftruncate function using chsize.
+
+# Copyright (C) 2000-2001, 2003-2007, 2009-2018 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FTRUNCATE],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([ftruncate])
+ if test $ac_cv_func_ftruncate = yes; then
+ m4_ifdef([gl_LARGEFILE], [
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ case "$host_os" in
+ mingw*)
+ dnl Native Windows, and Large File Support is requested.
+ dnl The MSVCRT _chsize() function only accepts a 32-bit file size,
+ dnl and the mingw64 ftruncate64() function is unreliable (it may
+ dnl delete the file, see
+ dnl <http://mingw-w64.sourcearchive.com/documentation/2.0-1/ftruncate64_8c_source.html>).
+ dnl Use gnulib's ftruncate() implementation instead.
+ REPLACE_FTRUNCATE=1
+ ;;
+ esac
+ ], [
+ :
+ ])
+ else
+ HAVE_FTRUNCATE=0
+ fi
+])
+
+# Prerequisites of lib/ftruncate.c.
+AC_DEFUN([gl_PREREQ_FTRUNCATE],
+[
+ AC_CHECK_FUNCS([chsize])
+])
diff --git a/m4/fwriting.m4 b/m4/fwriting.m4
index 083ac20..2da1653 100644
--- a/m4/fwriting.m4
+++ b/m4/fwriting.m4
@@ -1,5 +1,5 @@
# fwriting.m4 serial 2
-dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/getcwd.m4 b/m4/getcwd.m4
index ec6b637..2875fe5 100644
--- a/m4/getcwd.m4
+++ b/m4/getcwd.m4
@@ -1,12 +1,12 @@
# getcwd.m4 - check for working getcwd that is compatible with glibc
-# Copyright (C) 2001, 2003-2007, 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-2007, 2009-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# Written by Paul Eggert.
-# serial 13
+# serial 15
AC_DEFUN([gl_FUNC_GETCWD_NULL],
[
@@ -37,9 +37,9 @@ AC_DEFUN([gl_FUNC_GETCWD_NULL],
if (! f)
return 2;
if (f[0] != '/')
- return 3;
+ { free (f); return 3; }
if (f[1] != '\0')
- return 4;
+ { free (f); return 4; }
free (f);
return 0;
}
@@ -48,12 +48,12 @@ AC_DEFUN([gl_FUNC_GETCWD_NULL],
[gl_cv_func_getcwd_null=yes],
[gl_cv_func_getcwd_null=no],
[[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_getcwd_null="guessing yes";;
- # Guess yes on Cygwin.
- cygwin*) gl_cv_func_getcwd_null="guessing yes";;
- # If we don't know, assume the worst.
- *) gl_cv_func_getcwd_null="guessing no";;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
+ # Guess yes on Cygwin.
+ cygwin*) gl_cv_func_getcwd_null="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_getcwd_null="guessing no";;
esac
]])])
])
diff --git a/m4/getdelim.m4 b/m4/getdelim.m4
index 24adb94..e50af81 100644
--- a/m4/getdelim.m4
+++ b/m4/getdelim.m4
@@ -1,6 +1,6 @@
-# getdelim.m4 serial 11
+# getdelim.m4 serial 12
-dnl Copyright (C) 2005-2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2018 Free Software Foundation, Inc.
dnl
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -39,7 +39,7 @@ AC_DEFUN([gl_FUNC_GETDELIM],
size_t siz = 0;
int len = getdelim (&line, &siz, '\n', in);
if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
- return 2;
+ { free (line); fclose (in); return 2; }
}
{
/* Test result for a NULL buffer and a non-zero size.
@@ -47,7 +47,7 @@ AC_DEFUN([gl_FUNC_GETDELIM],
char *line = NULL;
size_t siz = (size_t)(~0) / 4;
if (getdelim (&line, &siz, '\n', in) == -1)
- return 3;
+ { fclose (in); return 3; }
free (line);
}
fclose (in);
diff --git a/m4/getdtablesize.m4 b/m4/getdtablesize.m4
index 1af2a24..4cc1a8f 100644
--- a/m4/getdtablesize.m4
+++ b/m4/getdtablesize.m4
@@ -1,5 +1,5 @@
-# getdtablesize.m4 serial 6
-dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
+# getdtablesize.m4 serial 7
+dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -12,29 +12,43 @@ AC_DEFUN([gl_FUNC_GETDTABLESIZE],
AC_CHECK_DECLS_ONCE([getdtablesize])
if test $ac_cv_func_getdtablesize = yes &&
test $ac_cv_have_decl_getdtablesize = yes; then
- # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
- # up to an unchangeable hard limit; all other platforms correctly
- # require setrlimit before getdtablesize() can report a larger value.
AC_CACHE_CHECK([whether getdtablesize works],
[gl_cv_func_getdtablesize_works],
- [AC_RUN_IFELSE([
- AC_LANG_PROGRAM([[#include <unistd.h>]],
- [int size = getdtablesize();
- if (dup2 (0, getdtablesize()) != -1)
- return 1;
- if (size != getdtablesize())
- return 2;
- ])],
- [gl_cv_func_getdtablesize_works=yes],
- [gl_cv_func_getdtablesize_works=no],
- [case "$host_os" in
- cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
- gl_cv_func_getdtablesize_works="guessing no" ;;
- *) gl_cv_func_getdtablesize_works="guessing yes" ;;
- esac])
+ [dnl There are two concepts: the "maximum possible file descriptor value + 1"
+ dnl and the "maximum number of open file descriptors in a process".
+ dnl Per SUSv2 and POSIX, getdtablesize() should return the first one.
+ dnl On most platforms, the first and the second concept are the same.
+ dnl On OpenVMS, however, they are different and getdtablesize() returns
+ dnl the second one; thus the test below fails. But we don't care
+ dnl because there's no good way to write a replacement getdtablesize().
+ case "$host_os" in
+ vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
+ *)
+ dnl Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft
+ dnl limit up to an unchangeable hard limit; all other platforms
+ dnl correctly require setrlimit before getdtablesize() can report
+ dnl a larger value.
+ AC_RUN_IFELSE([
+ AC_LANG_PROGRAM([[#include <unistd.h>]],
+ [int size = getdtablesize();
+ if (dup2 (0, getdtablesize()) != -1)
+ return 1;
+ if (size != getdtablesize())
+ return 2;
+ ])],
+ [gl_cv_func_getdtablesize_works=yes],
+ [gl_cv_func_getdtablesize_works=no],
+ [case "$host_os" in
+ cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
+ gl_cv_func_getdtablesize_works="guessing no" ;;
+ *) gl_cv_func_getdtablesize_works="guessing yes" ;;
+ esac
+ ])
+ ;;
+ esac
])
case "$gl_cv_func_getdtablesize_works" in
- *yes) ;;
+ *yes | "no (limitation)") ;;
*) REPLACE_GETDTABLESIZE=1 ;;
esac
else
diff --git a/m4/getopt.m4 b/m4/getopt.m4
index 7a94626..0496250 100644
--- a/m4/getopt.m4
+++ b/m4/getopt.m4
@@ -1,5 +1,5 @@
-# getopt.m4 serial 44
-dnl Copyright (C) 2002-2006, 2008-2017 Free Software Foundation, Inc.
+# getopt.m4 serial 46
+dnl Copyright (C) 2002-2006, 2008-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -32,9 +32,16 @@ AC_DEFUN([gl_FUNC_GETOPT_POSIX],
# getopt_long_only.
AC_DEFUN([gl_FUNC_GETOPT_GNU],
[
+ dnl Set the variable gl_getopt_required, so that all invocations of
+ dnl gl_GETOPT_CHECK_HEADERS in the scope of the current configure file
+ dnl will check for getopt with GNU extensions.
+ dnl This means that if one gnulib-tool invocation requests getopt-posix
+ dnl and another gnulib-tool invocation requests getopt-gnu, it is as if
+ dnl both had requested getopt-gnu.
m4_divert_text([INIT_PREPARE], [gl_getopt_required=GNU])
- AC_REQUIRE([gl_FUNC_GETOPT_POSIX])
+ dnl No need to invoke gl_FUNC_GETOPT_POSIX here; this is automatically
+ dnl done through the module dependency getopt-gnu -> getopt-posix.
])
# Determine whether to replace the entire getopt facility.
@@ -354,15 +361,19 @@ dnl is ambiguous with environment values that contain newlines.
AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
[
- GETOPT_H=getopt.h
+ AC_CHECK_HEADERS_ONCE([sys/cdefs.h])
+ if test $ac_cv_header_sys_cdefs_h = yes; then
+ HAVE_SYS_CDEFS_H=1
+ else
+ HAVE_SYS_CDEFS_H=0
+ fi
+ AC_SUBST([HAVE_SYS_CDEFS_H])
+
AC_DEFINE([__GETOPT_PREFIX], [[rpl_]],
[Define to rpl_ if the getopt replacement functions and variables
should be used.])
+ GETOPT_H=getopt.h
+ GETOPT_CDEFS_H=getopt-cdefs.h
AC_SUBST([GETOPT_H])
-])
-
-# Prerequisites of lib/getopt*.
-AC_DEFUN([gl_PREREQ_GETOPT],
-[
- AC_CHECK_DECLS_ONCE([getenv])
+ AC_SUBST([GETOPT_CDEFS_H])
])
diff --git a/m4/getpagesize.m4 b/m4/getpagesize.m4
index f891200..6492c78 100644
--- a/m4/getpagesize.m4
+++ b/m4/getpagesize.m4
@@ -1,5 +1,5 @@
# getpagesize.m4 serial 9
-dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2017 Free Software Foundation,
+dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2018 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/getprogname.m4 b/m4/getprogname.m4
index efc06e7..3a9ba8b 100644
--- a/m4/getprogname.m4
+++ b/m4/getprogname.m4
@@ -1,6 +1,6 @@
# getprogname.m4 - check for getprogname or replacements for it
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4
index 4f501e5..198695e 100644
--- a/m4/gettimeofday.m4
+++ b/m4/gettimeofday.m4
@@ -1,6 +1,6 @@
-# serial 21
+# serial 25
-# Copyright (C) 2001-2003, 2005, 2007, 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003, 2005, 2007, 2009-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -9,9 +9,10 @@ dnl From Jim Meyering.
AC_DEFUN([gl_FUNC_GETTIMEOFDAY],
[
+ AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS])
AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([gl_HEADER_SYS_TIME_H])
- AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS])
AC_CHECK_FUNCS_ONCE([gettimeofday])
gl_gettimeofday_timezone=void
@@ -54,19 +55,11 @@ int gettimeofday (struct timeval *restrict, struct timezone *restrict);
if test $REPLACE_STRUCT_TIMEVAL = 1; then
REPLACE_GETTIMEOFDAY=1
fi
- m4_ifdef([gl_FUNC_TZSET_CLOBBER], [
- gl_FUNC_TZSET_CLOBBER
- case "$gl_cv_func_tzset_clobber" in
- *yes)
- REPLACE_GETTIMEOFDAY=1
- gl_GETTIMEOFDAY_REPLACE_LOCALTIME
- AC_DEFINE([tzset], [rpl_tzset],
- [Define to rpl_tzset if the wrapper function should be used.])
- AC_DEFINE([TZSET_CLOBBERS_LOCALTIME], [1],
- [Define if tzset clobbers localtime's static buffer.])
- ;;
- esac
- ])
+ dnl On mingw, the original gettimeofday has only a precision of 15.6
+ dnl milliseconds. So override it.
+ case "$host_os" in
+ mingw*) REPLACE_GETTIMEOFDAY=1 ;;
+ esac
fi
AC_DEFINE_UNQUOTED([GETTIMEOFDAY_TIMEZONE], [$gl_gettimeofday_timezone],
[Define this to 'void' or 'struct timezone' to match the system's
@@ -85,6 +78,7 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
[
AC_REQUIRE([gl_HEADER_SYS_TIME_H])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS])
AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer],
[gl_cv_func_gettimeofday_clobber],
@@ -109,30 +103,24 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
[gl_cv_func_gettimeofday_clobber=yes],
[# When cross-compiling:
case "$host_os" in
- # Guess all is fine on glibc systems.
- *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
+ # Guess all is fine on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
esac
])])
case "$gl_cv_func_gettimeofday_clobber" in
*yes)
REPLACE_GETTIMEOFDAY=1
- gl_GETTIMEOFDAY_REPLACE_LOCALTIME
AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1],
[Define if gettimeofday clobbers the localtime buffer.])
+ gl_LOCALTIME_BUFFER_NEEDED
;;
esac
])
-AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [
- REPLACE_GMTIME=1
- REPLACE_LOCALTIME=1
-])
-
# Prerequisites of lib/gettimeofday.c.
-AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [
- AC_CHECK_HEADERS([sys/timeb.h])
- AC_CHECK_FUNCS([_ftime])
-])
+AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [:])
diff --git a/m4/glibc21.m4 b/m4/glibc21.m4
index 2e30ed6..126aa1a 100644
--- a/m4/glibc21.m4
+++ b/m4/glibc21.m4
@@ -1,5 +1,5 @@
# glibc21.m4 serial 5
-dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2017 Free Software Foundation,
+dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2018 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index 7d9b40b..de65f6b 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1,5 +1,5 @@
-# gnulib-common.m4 serial 36
-dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
+# gnulib-common.m4 serial 38
+dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -228,13 +228,13 @@ m4_ifndef([AS_VAR_IF],
# This is like AC_PROG_CC_C99, except that
# - AC_PROG_CC_C99 did not exist in Autoconf versions < 2.60,
# - AC_PROG_CC_C99 does not mix well with AC_PROG_CC_STDC
-# <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00367.html>,
+# <https://lists.gnu.org/r/bug-gnulib/2011-09/msg00367.html>,
# but many more packages use AC_PROG_CC_STDC than AC_PROG_CC_C99
-# <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00441.html>.
+# <https://lists.gnu.org/r/bug-gnulib/2011-09/msg00441.html>.
# Remaining problems:
# - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options
# to CC twice
-# <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00431.html>.
+# <https://lists.gnu.org/r/bug-gnulib/2011-09/msg00431.html>.
# - AC_PROG_CC_STDC is likely to change now that C11 is an ISO standard.
AC_DEFUN([gl_PROG_CC_C99],
[
@@ -256,7 +256,8 @@ AC_DEFUN([gl_PROG_AR_RANLIB],
dnl library formats. In particular, the GNU binutils programs ar and ranlib
dnl produce libraries that work only with gcc, not with cc.
AC_REQUIRE([AC_PROG_CC])
- AC_BEFORE([$0], [AM_PROG_AR])
+ dnl The '][' hides this use from 'aclocal'.
+ AC_BEFORE([$0], [A][M_PROG_AR])
AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler],
[
AC_EGREP_CPP([Amsterdam],
@@ -288,7 +289,9 @@ Amsterdam
dnl __ACK__. It may seem like its easier to avoid calling the macro here,
dnl but we need to AC_SUBST both AR/ARFLAGS (thus those must have some good
dnl default value and automake should usually know them).
- m4_ifdef([AM_PROG_AR], [AM_PROG_AR], [:])
+ dnl
+ dnl The '][' hides this use from 'aclocal'.
+ m4_ifdef([A][M_PROG_AR], [A][M_PROG_AR], [:])
fi
dnl In case the code above has not helped with setting AR/ARFLAGS, use
@@ -456,7 +459,9 @@ m4_ifndef([AC_PROG_SED],
else
ac_cv_path_SED=$SED
fi
+ ])
SED="$ac_cv_path_SED"
AC_SUBST([SED])dnl
rm -f conftest.sed
-])])])
+])
+])
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index b7070fd..f958ac1 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -1,5 +1,5 @@
# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2017 Free Software Foundation, Inc.
+# Copyright (C) 2002-2018 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
@@ -12,7 +12,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this file. If not, see <http://www.gnu.org/licenses/>.
+# along with this file. If not, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License,
# this file may be distributed as part of a program that
@@ -44,6 +44,8 @@ AC_DEFUN([gl_EARLY],
AC_REQUIRE([AM_PROG_CC_C_O])
# Code from module absolute-header:
+ # Code from module accept:
+ # Code from module accept-tests:
# Code from module acl:
# Code from module acl-permissions:
# Code from module acl-tests:
@@ -53,9 +55,13 @@ AC_DEFUN([gl_EARLY],
# Code from module alloca-opt:
# Code from module alloca-opt-tests:
# Code from module announce-gen:
+ # Code from module arpa_inet:
+ # Code from module arpa_inet-tests:
# Code from module assert:
# Code from module binary-io:
# Code from module binary-io-tests:
+ # Code from module bind:
+ # Code from module bind-tests:
# Code from module btowc:
# Code from module btowc-tests:
# Code from module builtin-expect:
@@ -69,12 +75,16 @@ AC_DEFUN([gl_EARLY],
# Code from module canonicalize-lgpl-tests:
# Code from module chdir:
# Code from module chdir-tests:
+ # Code from module cloexec:
+ # Code from module cloexec-tests:
# Code from module close:
# Code from module close-stream:
# Code from module close-tests:
# Code from module closedir:
# Code from module closeout:
# Code from module configmake:
+ # Code from module connect:
+ # Code from module connect-tests:
# Code from module ctype:
# Code from module ctype-tests:
# Code from module dfa:
@@ -96,8 +106,10 @@ AC_DEFUN([gl_EARLY],
# Code from module exitfail:
# Code from module extensions:
# Code from module extern-inline:
+ # Code from module fcntl:
# Code from module fcntl-h:
# Code from module fcntl-h-tests:
+ # Code from module fcntl-tests:
# Code from module fd-hook:
# Code from module fdl:
# Code from module fdopen:
@@ -130,6 +142,8 @@ AC_DEFUN([gl_EARLY],
# Code from module ftello:
AC_REQUIRE([AC_FUNC_FSEEKO])
# Code from module ftello-tests:
+ # Code from module ftruncate:
+ # Code from module ftruncate-tests:
# Code from module fwrite-tests:
# Code from module fwriting:
# Code from module fwriting-tests:
@@ -158,14 +172,19 @@ AC_DEFUN([gl_EARLY],
# Code from module gnupload:
# Code from module hard-locale:
# Code from module havelib:
+ # Code from module host-cpu-c-abi:
# Code from module ignore-value:
# Code from module ignore-value-tests:
# Code from module include_next:
+ # Code from module inet_pton:
+ # Code from module inet_pton-tests:
# Code from module intprops:
# Code from module intprops-tests:
# Code from module inttypes:
# Code from module inttypes-incomplete:
# Code from module inttypes-tests:
+ # Code from module ioctl:
+ # Code from module ioctl-tests:
# Code from module isblank:
# Code from module isblank-tests:
# Code from module langinfo:
@@ -176,6 +195,8 @@ AC_DEFUN([gl_EARLY],
# Code from module limits-h-tests:
# Code from module link:
# Code from module link-tests:
+ # Code from module listen:
+ # Code from module listen-tests:
# Code from module localcharset:
# Code from module locale:
# Code from module locale-tests:
@@ -183,6 +204,7 @@ AC_DEFUN([gl_EARLY],
# Code from module localeconv-tests:
# Code from module localename:
# Code from module localename-tests:
+ # Code from module localtime-buffer:
# Code from module lock:
# Code from module lseek:
# Code from module lseek-tests:
@@ -208,6 +230,10 @@ AC_DEFUN([gl_EARLY],
# Code from module msvc-inval:
# Code from module msvc-nothrow:
# Code from module multiarch:
+ # Code from module nanosleep:
+ # Code from module nanosleep-tests:
+ # Code from module netinet_in:
+ # Code from module netinet_in-tests:
# Code from module nl_langinfo:
# Code from module nl_langinfo-tests:
# Code from module nocrash:
@@ -218,6 +244,10 @@ AC_DEFUN([gl_EARLY],
# Code from module opendir:
# Code from module pathmax:
# Code from module pathmax-tests:
+ # Code from module perror:
+ # Code from module perror-tests:
+ # Code from module pipe-posix:
+ # Code from module pipe-posix-tests:
# Code from module progname:
# Code from module putenv:
# Code from module qcopy-acl:
@@ -226,6 +256,8 @@ AC_DEFUN([gl_EARLY],
# Code from module quotearg:
# Code from module quotearg-simple:
# Code from module quotearg-simple-tests:
+ # Code from module raise:
+ # Code from module raise-tests:
# Code from module read-file:
# Code from module read-file-tests:
# Code from module readdir:
@@ -240,21 +272,39 @@ AC_DEFUN([gl_EARLY],
# Code from module rmdir:
# Code from module rmdir-tests:
# Code from module same-inode:
- # Code from module secure_getenv:
+ # Code from module select:
+ # Code from module select-tests:
# Code from module selinux-h:
# Code from module setenv:
# Code from module setenv-tests:
# Code from module setlocale:
# Code from module setlocale-tests:
+ # Code from module setsockopt:
+ # Code from module setsockopt-tests:
+ # Code from module sigaction:
+ # Code from module sigaction-tests:
+ # Code from module signal-h:
+ # Code from module signal-h-tests:
+ # Code from module sigprocmask:
+ # Code from module sigprocmask-tests:
+ # Code from module sleep:
+ # Code from module sleep-tests:
# Code from module snippet/_Noreturn:
# Code from module snippet/arg-nonnull:
# Code from module snippet/c++defs:
# Code from module snippet/unused-parameter:
# Code from module snippet/warn-on-use:
+ # Code from module socket:
+ # Code from module socketlib:
+ # Code from module sockets:
+ # Code from module sockets-tests:
+ # Code from module socklen:
# Code from module ssize_t:
# Code from module stat:
# Code from module stat-macros:
# Code from module stat-tests:
+ # Code from module stat-time:
+ # Code from module stat-time-tests:
# Code from module std-gnu11:
# Code from module stdalign:
# Code from module stdalign-tests:
@@ -279,18 +329,28 @@ AC_DEFUN([gl_EARLY],
# Code from module strerror:
# Code from module strerror-override:
# Code from module strerror-tests:
+ # Code from module strerror_r-posix:
+ # Code from module strerror_r-posix-tests:
# Code from module string:
# Code from module string-tests:
# Code from module strverscmp:
# Code from module strverscmp-tests:
# Code from module symlink:
# Code from module symlink-tests:
+ # Code from module sys_ioctl:
+ # Code from module sys_ioctl-tests:
+ # Code from module sys_select:
+ # Code from module sys_select-tests:
+ # Code from module sys_socket:
+ # Code from module sys_socket-tests:
# Code from module sys_stat:
# Code from module sys_stat-tests:
# Code from module sys_time:
# Code from module sys_time-tests:
# Code from module sys_types:
# Code from module sys_types-tests:
+ # Code from module sys_uio:
+ # Code from module sys_uio-tests:
# Code from module tempname:
# Code from module test-framework-sh:
# Code from module test-framework-sh-tests:
@@ -387,6 +447,11 @@ AC_DEFUN([gl_INIT],
gl_FUNC_FSTAT
if test $REPLACE_FSTAT = 1; then
AC_LIBOBJ([fstat])
+ case "$host_os" in
+ mingw*)
+ AC_LIBOBJ([stat-w32])
+ ;;
+ esac
gl_PREREQ_FSTAT
fi
gl_SYS_STAT_MODULE_INDICATOR([fstat])
@@ -401,19 +466,13 @@ AC_DEFUN([gl_INIT],
fi
gl_STDIO_MODULE_INDICATOR([getdelim])
gl_FUNC_GETOPT_GNU
- if test $REPLACE_GETOPT = 1; then
- AC_LIBOBJ([getopt])
- AC_LIBOBJ([getopt1])
- gl_PREREQ_GETOPT
- dnl Arrange for unistd.h to include getopt.h.
- GNULIB_GL_UNISTD_H_GETOPT=1
- fi
- AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
+ dnl Because of the way gl_FUNC_GETOPT_GNU is implemented (the gl_getopt_required
+ dnl mechanism), there is no need to do any AC_LIBOBJ or AC_SUBST here; they are
+ dnl done in the getopt-posix module.
gl_FUNC_GETOPT_POSIX
if test $REPLACE_GETOPT = 1; then
AC_LIBOBJ([getopt])
AC_LIBOBJ([getopt1])
- gl_PREREQ_GETOPT
dnl Arrange for unistd.h to include getopt.h.
GNULIB_GL_UNISTD_H_GETOPT=1
fi
@@ -438,6 +497,7 @@ AC_DEFUN([gl_INIT],
[AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
[GNUmakefile=$GNUmakefile])])
gl_HARD_LOCALE
+ AC_REQUIRE([gl_HOST_CPU_C_ABI])
gl_FUNC_ISBLANK
if test $HAVE_ISBLANK = 0; then
AC_LIBOBJ([isblank])
@@ -456,6 +516,8 @@ AC_DEFUN([gl_INIT],
gl_PREREQ_LOCALECONV
fi
gl_LOCALE_MODULE_INDICATOR([localeconv])
+ AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS])
+ AC_LIBOBJ([localtime-buffer])
gl_LOCK
gl_MODULE_INDICATOR([lock])
gl_FUNC_LSTAT
@@ -525,6 +587,7 @@ AC_DEFUN([gl_INIT],
if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
AC_LIBOBJ([msvc-nothrow])
fi
+ gl_MODULE_INDICATOR([msvc-nothrow])
gl_MULTIARCH
gl_FUNC_NL_LANGINFO
if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
@@ -567,12 +630,6 @@ AC_DEFUN([gl_INIT],
AC_LIBOBJ([rmdir])
fi
gl_UNISTD_MODULE_INDICATOR([rmdir])
- gl_FUNC_SECURE_GETENV
- if test $HAVE_SECURE_GETENV = 0; then
- AC_LIBOBJ([secure_getenv])
- gl_PREREQ_SECURE_GETENV
- fi
- gl_STDLIB_MODULE_INDICATOR([secure_getenv])
gl_HEADERS_SELINUX_SELINUX_H
gl_HEADERS_SELINUX_CONTEXT_H
if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then
@@ -582,9 +639,16 @@ AC_DEFUN([gl_INIT],
gl_FUNC_STAT
if test $REPLACE_STAT = 1; then
AC_LIBOBJ([stat])
+ case "$host_os" in
+ mingw*)
+ AC_LIBOBJ([stat-w32])
+ ;;
+ esac
gl_PREREQ_STAT
fi
gl_SYS_STAT_MODULE_INDICATOR([stat])
+ gl_STAT_TIME
+ gl_STAT_BIRTHTIME
gl_STDALIGN_H
gl_STDARG_H
AM_STDBOOL_H
@@ -690,10 +754,23 @@ changequote([, ])dnl
AC_SUBST([gltests_WITNESS])
gl_module_indicator_condition=$gltests_WITNESS
m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([accept])
+ fi
+ gl_SYS_SOCKET_MODULE_INDICATOR([accept])
+ gl_HEADER_ARPA_INET
+ AC_PROG_MKDIR_P
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([bind])
+ fi
+ gl_SYS_SOCKET_MODULE_INDICATOR([bind])
gt_LOCALE_FR
gt_LOCALE_FR_UTF8
gt_LOCALE_FR
gt_LOCALE_TR_UTF8
+ gl_MODULE_INDICATOR_FOR_TESTS([cloexec])
gl_FUNC_CLOSE
if test $REPLACE_CLOSE = 1; then
AC_LIBOBJ([close])
@@ -704,6 +781,11 @@ changequote([, ])dnl
AC_LIBOBJ([closedir])
fi
gl_DIRENT_MODULE_INDICATOR([closedir])
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([connect])
+ fi
+ gl_SYS_SOCKET_MODULE_INDICATOR([connect])
gl_DIRENT_H
gl_FUNC_DIRFD
if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
@@ -720,6 +802,11 @@ changequote([, ])dnl
gl_UNISTD_MODULE_INDICATOR([dup2])
gl_ENVIRON
gl_UNISTD_MODULE_INDICATOR([environ])
+ gl_FUNC_FCNTL
+ if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
+ AC_LIBOBJ([fcntl])
+ fi
+ gl_FCNTL_MODULE_INDICATOR([fcntl])
gl_FUNC_FDOPEN
if test $REPLACE_FDOPEN = 1; then
AC_LIBOBJ([fdopen])
@@ -768,6 +855,12 @@ changequote([, ])dnl
fi
gl_STDIO_MODULE_INDICATOR([ftello])
gl_FUNC_UNGETC_WORKS
+ gl_FUNC_FTRUNCATE
+ if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then
+ AC_LIBOBJ([ftruncate])
+ gl_PREREQ_FTRUNCATE
+ fi
+ gl_UNISTD_MODULE_INDICATOR([ftruncate])
gl_FUNC_GETCWD_LGPL
if test $REPLACE_GETCWD = 1; then
AC_LIBOBJ([getcwd-lgpl])
@@ -784,13 +877,30 @@ changequote([, ])dnl
AC_LIBOBJ([getpagesize])
fi
gl_UNISTD_MODULE_INDICATOR([getpagesize])
+ gl_FUNC_INET_PTON
+ if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_NTOP = 1; then
+ AC_LIBOBJ([inet_pton])
+ gl_PREREQ_INET_PTON
+ fi
+ gl_ARPA_INET_MODULE_INDICATOR([inet_pton])
+ AC_C_BIGENDIAN
gl_INTTYPES_H
gl_INTTYPES_INCOMPLETE
+ gl_FUNC_IOCTL
+ if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
+ AC_LIBOBJ([ioctl])
+ fi
+ gl_SYS_IOCTL_MODULE_INDICATOR([ioctl])
gl_FUNC_LINK
if test $HAVE_LINK = 0 || test $REPLACE_LINK = 1; then
AC_LIBOBJ([link])
fi
gl_UNISTD_MODULE_INDICATOR([link])
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([listen])
+ fi
+ gl_SYS_SOCKET_MODULE_INDICATOR([listen])
AC_CHECK_FUNCS_ONCE([newlocale])
gl_LOCALENAME
AC_CHECK_FUNCS_ONCE([newlocale])
@@ -811,6 +921,15 @@ changequote([, ])dnl
gl_FUNC_MMAP_ANON
AC_CHECK_HEADERS_ONCE([sys/mman.h])
AC_CHECK_FUNCS_ONCE([mprotect])
+ gl_FUNC_NANOSLEEP
+ if test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1; then
+ AC_LIBOBJ([nanosleep])
+ gl_PREREQ_NANOSLEEP
+ fi
+ gl_TIME_MODULE_INDICATOR([nanosleep])
+ AC_CHECK_DECLS_ONCE([alarm])
+ gl_HEADER_NETINET_IN
+ AC_PROG_MKDIR_P
gt_LOCALE_FR
gt_LOCALE_FR_UTF8
gl_FUNC_OPEN
@@ -824,6 +943,16 @@ changequote([, ])dnl
AC_LIBOBJ([opendir])
fi
gl_DIRENT_MODULE_INDICATOR([opendir])
+ gl_FUNC_PERROR
+ if test $REPLACE_PERROR = 1; then
+ AC_LIBOBJ([perror])
+ fi
+ gl_STRING_MODULE_INDICATOR([perror])
+ gl_FUNC_PIPE
+ if test $HAVE_PIPE = 0; then
+ AC_LIBOBJ([pipe])
+ fi
+ gl_UNISTD_MODULE_INDICATOR([pipe])
gl_FUNC_PUTENV
if test $REPLACE_PUTENV = 1; then
AC_LIBOBJ([putenv])
@@ -835,6 +964,12 @@ changequote([, ])dnl
gl_FUNC_MMAP_ANON
AC_CHECK_HEADERS_ONCE([sys/mman.h])
AC_CHECK_FUNCS_ONCE([mprotect])
+ gl_FUNC_RAISE
+ if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
+ AC_LIBOBJ([raise])
+ gl_PREREQ_RAISE
+ fi
+ gl_SIGNAL_MODULE_INDICATOR([raise])
gl_PREREQ_READ_FILE
gl_FUNC_READDIR
if test $HAVE_READDIR = 0; then
@@ -846,6 +981,12 @@ changequote([, ])dnl
AC_LIBOBJ([realloc])
fi
gl_STDLIB_MODULE_INDICATOR([realloc-posix])
+ gl_FUNC_SELECT
+ if test $REPLACE_SELECT = 1; then
+ AC_LIBOBJ([select])
+ fi
+ gl_SYS_SELECT_MODULE_INDICATOR([select])
+ AC_CHECK_HEADERS_ONCE([sys/wait.h])
gl_FUNC_SETENV
if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
AC_LIBOBJ([setenv])
@@ -861,6 +1002,47 @@ changequote([, ])dnl
gt_LOCALE_FR_UTF8
gt_LOCALE_JA
gt_LOCALE_ZH_CN
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([setsockopt])
+ fi
+ gl_SYS_SOCKET_MODULE_INDICATOR([setsockopt])
+ gl_SIGACTION
+ if test $HAVE_SIGACTION = 0; then
+ AC_LIBOBJ([sigaction])
+ gl_PREREQ_SIGACTION
+ fi
+ gl_SIGNAL_MODULE_INDICATOR([sigaction])
+ gl_SIGNAL_H
+ gl_SIGNALBLOCKING
+ if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
+ AC_LIBOBJ([sigprocmask])
+ gl_PREREQ_SIGPROCMASK
+ fi
+ gl_SIGNAL_MODULE_INDICATOR([sigprocmask])
+ gl_FUNC_SLEEP
+ if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
+ AC_LIBOBJ([sleep])
+ fi
+ gl_UNISTD_MODULE_INDICATOR([sleep])
+ AC_CHECK_DECLS_ONCE([alarm])
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([socket])
+ fi
+ # When this module is used, sockets may actually occur as file descriptors,
+ # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
+ m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])])
+ m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])])
+ AC_REQUIRE([gl_PREREQ_SYS_H_WINSOCK2])
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
+ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
+ fi
+ gl_SYS_SOCKET_MODULE_INDICATOR([socket])
+ AC_REQUIRE([gl_SOCKETLIB])
+ AC_REQUIRE([gl_SOCKETS])
+ gl_TYPE_SOCKLEN_T
AC_REQUIRE([gt_TYPE_WCHAR_T])
AC_REQUIRE([gt_TYPE_WINT_T])
gl_FUNC_STRDUP_POSIX
@@ -869,11 +1051,28 @@ changequote([, ])dnl
gl_PREREQ_STRDUP
fi
gl_STRING_MODULE_INDICATOR([strdup])
+ gl_FUNC_STRERROR_R
+ if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
+ AC_LIBOBJ([strerror_r])
+ gl_PREREQ_STRERROR_R
+ fi
+ gl_STRING_MODULE_INDICATOR([strerror_r])
+ dnl For the modules argp, error.
+ gl_MODULE_INDICATOR([strerror_r-posix])
gl_FUNC_SYMLINK
if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
AC_LIBOBJ([symlink])
fi
gl_UNISTD_MODULE_INDICATOR([symlink])
+ gl_SYS_IOCTL_H
+ AC_PROG_MKDIR_P
+ AC_REQUIRE([gl_HEADER_SYS_SELECT])
+ AC_PROG_MKDIR_P
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+ AC_PROG_MKDIR_P
+ AC_CHECK_FUNCS_ONCE([shutdown])
+ gl_HEADER_SYS_UIO
+ AC_PROG_MKDIR_P
gl_FUNC_UNSETENV
if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
AC_LIBOBJ([unsetenv])
@@ -993,17 +1192,13 @@ AC_DEFUN([gl_FILE_LIST], [
build-aux/gnu-web-doc-update
build-aux/gnupload
build-aux/prefix-gnulib-mk
- build-aux/snippet/_Noreturn.h
- build-aux/snippet/arg-nonnull.h
- build-aux/snippet/c++defs.h
- build-aux/snippet/unused-parameter.h
- build-aux/snippet/warn-on-use.h
build-aux/update-copyright
build-aux/useless-if-before-free
build-aux/vc-list-files
doc/fdl.texi
doc/gendocs_template
doc/gendocs_template_min
+ lib/_Noreturn.h
lib/acl-errno-valid.c
lib/acl-internal.c
lib/acl-internal.h
@@ -1012,8 +1207,10 @@ AC_DEFUN([gl_FILE_LIST], [
lib/alignof.h
lib/alloca.c
lib/alloca.in.h
+ lib/arg-nonnull.h
lib/basename-lgpl.c
lib/btowc.c
+ lib/c++defs.h
lib/c-ctype.c
lib/c-ctype.h
lib/c-strcase.h
@@ -1039,6 +1236,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/exitfail.c
lib/exitfail.h
lib/fcntl.in.h
+ lib/filename.h
lib/fpending.c
lib/fpending.h
lib/fstat.c
@@ -1047,6 +1245,11 @@ AC_DEFUN([gl_FILE_LIST], [
lib/get-permissions.c
lib/getdelim.c
lib/getfilecon.c
+ lib/getopt-cdefs.in.h
+ lib/getopt-core.h
+ lib/getopt-ext.h
+ lib/getopt-pfx-core.h
+ lib/getopt-pfx-ext.h
lib/getopt.c
lib/getopt.in.h
lib/getopt1.c
@@ -1071,11 +1274,12 @@ AC_DEFUN([gl_FILE_LIST], [
lib/localeconv.c
lib/localeinfo.c
lib/localeinfo.h
+ lib/localtime-buffer.c
+ lib/localtime-buffer.h
lib/lstat.c
lib/malloc.c
lib/malloca.c
lib/malloca.h
- lib/malloca.valgrind
lib/mbrlen.c
lib/mbrtowc.c
lib/mbsinit.c
@@ -1117,10 +1321,13 @@ AC_DEFUN([gl_FILE_LIST], [
lib/se-context.in.h
lib/se-selinux.c
lib/se-selinux.in.h
- lib/secure_getenv.c
lib/set-acl.c
lib/set-permissions.c
lib/stat-macros.h
+ lib/stat-time.c
+ lib/stat-time.h
+ lib/stat-w32.c
+ lib/stat-w32.h
lib/stat.c
lib/stdalign.in.h
lib/stdarg.in.h
@@ -1146,10 +1353,12 @@ AC_DEFUN([gl_FILE_LIST], [
lib/unistd.c
lib/unistd.in.h
lib/unlocked-io.h
+ lib/unused-parameter.h
lib/verify.h
lib/version-etc-fsf.c
lib/version-etc.c
lib/version-etc.h
+ lib/warn-on-use.h
lib/wchar.in.h
lib/wcrtomb.c
lib/wctob.c
@@ -1165,6 +1374,8 @@ AC_DEFUN([gl_FILE_LIST], [
m4/absolute-header.m4
m4/acl.m4
m4/alloca.m4
+ m4/arpa_inet_h.m4
+ m4/asm-underscore.m4
m4/assert.m4
m4/btowc.m4
m4/builtin-expect.m4
@@ -1188,6 +1399,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/extensions.m4
m4/extern-inline.m4
m4/fcntl-o.m4
+ m4/fcntl.m4
m4/fcntl_h.m4
m4/fdopen.m4
m4/fflush.m4
@@ -1200,6 +1412,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/fstat.m4
m4/ftell.m4
m4/ftello.m4
+ m4/ftruncate.m4
m4/fwriting.m4
m4/getcwd.m4
m4/getdelim.m4
@@ -1211,10 +1424,13 @@ AC_DEFUN([gl_FILE_LIST], [
m4/glibc21.m4
m4/gnulib-common.m4
m4/hard-locale.m4
+ m4/host-cpu-c-abi.m4
m4/include_next.m4
+ m4/inet_pton.m4
m4/intlmacosx.m4
m4/inttypes-pri.m4
m4/inttypes.m4
+ m4/ioctl.m4
m4/isblank.m4
m4/langinfo_h.m4
m4/largefile.m4
@@ -1232,12 +1448,14 @@ AC_DEFUN([gl_FILE_LIST], [
m4/locale_h.m4
m4/localeconv.m4
m4/localename.m4
+ m4/localtime-buffer.m4
m4/lock.m4
m4/longlong.m4
m4/lseek.m4
m4/lstat.m4
m4/malloc.m4
m4/malloca.m4
+ m4/manywarnings-c++.m4
m4/manywarnings.m4
m4/mbrlen.m4
m4/mbrtowc.m4
@@ -1253,18 +1471,24 @@ AC_DEFUN([gl_FILE_LIST], [
m4/msvc-inval.m4
m4/msvc-nothrow.m4
m4/multiarch.m4
+ m4/nanosleep.m4
+ m4/netinet_in_h.m4
m4/nl_langinfo.m4
m4/nocrash.m4
m4/non-recursive-gnulib-prefix-hack.m4
m4/obstack.m4
m4/off_t.m4
+ m4/open-cloexec.m4
m4/open.m4
m4/opendir.m4
m4/pathmax.m4
+ m4/perror.m4
+ m4/pipe.m4
m4/pthread_rwlock_rdlock.m4
m4/putenv.m4
m4/quote.m4
m4/quotearg.m4
+ m4/raise.m4
m4/read-file.m4
m4/readdir.m4
m4/readlink.m4
@@ -1272,12 +1496,21 @@ AC_DEFUN([gl_FILE_LIST], [
m4/regex.m4
m4/rename.m4
m4/rmdir.m4
- m4/secure_getenv.m4
+ m4/select.m4
m4/selinux-context-h.m4
m4/selinux-selinux-h.m4
m4/setenv.m4
m4/setlocale.m4
+ m4/sigaction.m4
+ m4/signal_h.m4
+ m4/signalblocking.m4
+ m4/sleep.m4
+ m4/socketlib.m4
+ m4/sockets.m4
+ m4/socklen.m4
+ m4/sockpfaf.m4
m4/ssize_t.m4
+ m4/stat-time.m4
m4/stat.m4
m4/std-gnu11.m4
m4/stdalign.m4
@@ -1289,13 +1522,17 @@ AC_DEFUN([gl_FILE_LIST], [
m4/stdlib_h.m4
m4/strdup.m4
m4/strerror.m4
+ m4/strerror_r.m4
m4/string_h.m4
m4/strverscmp.m4
m4/symlink.m4
+ m4/sys_ioctl_h.m4
+ m4/sys_select_h.m4
m4/sys_socket_h.m4
m4/sys_stat_h.m4
m4/sys_time_h.m4
m4/sys_types_h.m4
+ m4/sys_uio_h.m4
m4/tempname.m4
m4/threadlib.m4
m4/time_h.m4
@@ -1318,11 +1555,16 @@ AC_DEFUN([gl_FILE_LIST], [
tests/dfa-match.sh
tests/init.sh
tests/macros.h
+ tests/nap.h
+ tests/null-ptr.h
tests/signature.h
+ tests/test-accept.c
tests/test-alignof.c
tests/test-alloca-opt.c
+ tests/test-arpa_inet.c
tests/test-binary-io.c
tests/test-binary-io.sh
+ tests/test-bind.c
tests/test-btowc.c
tests/test-btowc1.sh
tests/test-btowc2.sh
@@ -1332,7 +1574,9 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-c-strncasecmp.c
tests/test-canonicalize-lgpl.c
tests/test-chdir.c
+ tests/test-cloexec.c
tests/test-close.c
+ tests/test-connect.c
tests/test-copy-acl-1.sh
tests/test-copy-acl-2.sh
tests/test-copy-acl.c
@@ -1343,6 +1587,7 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-environ.c
tests/test-errno.c
tests/test-fcntl-h.c
+ tests/test-fcntl.c
tests/test-fdopen.c
tests/test-fflush.c
tests/test-fflush2.c
@@ -1379,6 +1624,8 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-ftello3.c
tests/test-ftello4.c
tests/test-ftello4.sh
+ tests/test-ftruncate.c
+ tests/test-ftruncate.sh
tests/test-fwrite.c
tests/test-fwriting.c
tests/test-getcwd-lgpl.c
@@ -1392,14 +1639,17 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-getprogname.c
tests/test-gettimeofday.c
tests/test-ignore-value.c
+ tests/test-inet_pton.c
tests/test-init.sh
tests/test-intprops.c
tests/test-inttypes.c
+ tests/test-ioctl.c
tests/test-isblank.c
tests/test-langinfo.c
tests/test-limits-h.c
tests/test-link.c
tests/test-link.h
+ tests/test-listen.c
tests/test-locale.c
tests/test-localeconv.c
tests/test-localename.c
@@ -1424,13 +1674,20 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-mbsinit.sh
tests/test-memchr.c
tests/test-memrchr.c
+ tests/test-nanosleep.c
+ tests/test-netinet_in.c
tests/test-nl_langinfo.c
tests/test-nl_langinfo.sh
tests/test-open.c
tests/test-open.h
tests/test-pathmax.c
+ tests/test-perror.c
+ tests/test-perror.sh
+ tests/test-perror2.c
+ tests/test-pipe.c
tests/test-quotearg-simple.c
tests/test-quotearg.h
+ tests/test-raise.c
tests/test-read-file.c
tests/test-readlink.c
tests/test-readlink.h
@@ -1440,6 +1697,12 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-rmdir.c
tests/test-rmdir.h
tests/test-sameacls.c
+ tests/test-select-fd.c
+ tests/test-select-in.sh
+ tests/test-select-out.sh
+ tests/test-select-stdin.c
+ tests/test-select.c
+ tests/test-select.h
tests/test-set-mode-acl-1.sh
tests/test-set-mode-acl-2.sh
tests/test-set-mode-acl.c
@@ -1449,6 +1712,13 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-setlocale1.sh
tests/test-setlocale2.c
tests/test-setlocale2.sh
+ tests/test-setsockopt.c
+ tests/test-sigaction.c
+ tests/test-signal-h.c
+ tests/test-sigprocmask.c
+ tests/test-sleep.c
+ tests/test-sockets.c
+ tests/test-stat-time.c
tests/test-stat.c
tests/test-stat.h
tests/test-stdalign.c
@@ -1458,13 +1728,18 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-stdio.c
tests/test-stdlib.c
tests/test-strerror.c
+ tests/test-strerror_r.c
tests/test-string.c
tests/test-strverscmp.c
tests/test-symlink.c
tests/test-symlink.h
+ tests/test-sys_ioctl.c
+ tests/test-sys_select.c
+ tests/test-sys_socket.c
tests/test-sys_stat.c
tests/test-sys_time.c
tests/test-sys_types.c
+ tests/test-sys_uio.c
tests/test-sys_wait.h
tests/test-time.c
tests/test-unistd.c
@@ -1472,6 +1747,7 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-update-copyright.sh
tests/test-vc-list-files-cvs.sh
tests/test-vc-list-files-git.sh
+ tests/test-verify-try.c
tests/test-verify.c
tests/test-verify.sh
tests/test-version-etc.c
@@ -1489,20 +1765,29 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-xalloc-die.c
tests/test-xalloc-die.sh
tests/zerosize-ptr.h
+ tests=lib/_Noreturn.h
+ tests=lib/accept.c
+ tests=lib/arg-nonnull.h
+ tests=lib/arpa_inet.in.h
tests=lib/binary-io.c
tests=lib/binary-io.h
+ tests=lib/bind.c
+ tests=lib/c++defs.h
+ tests=lib/cloexec.c
+ tests=lib/cloexec.h
tests=lib/close.c
tests=lib/closedir.c
+ tests=lib/connect.c
tests=lib/dirent-private.h
tests=lib/dirent.in.h
tests=lib/dirfd.c
tests=lib/dup2.c
+ tests=lib/fcntl.c
tests=lib/fd-hook.c
tests=lib/fd-hook.h
tests=lib/fdopen.c
tests=lib/fflush.c
tests=lib/file-has-acl.c
- tests=lib/filename.h
tests=lib/flexmember.h
tests=lib/fpurge.c
tests=lib/freading.c
@@ -1511,27 +1796,56 @@ AC_DEFUN([gl_FILE_LIST], [
tests=lib/fseeko.c
tests=lib/ftell.c
tests=lib/ftello.c
+ tests=lib/ftruncate.c
tests=lib/getcwd-lgpl.c
tests=lib/getdtablesize.c
tests=lib/getpagesize.c
+ tests=lib/inet_pton.c
tests=lib/inttypes.in.h
+ tests=lib/ioctl.c
tests=lib/link.c
+ tests=lib/listen.c
tests=lib/localename.c
tests=lib/localename.h
tests=lib/lseek.c
+ tests=lib/nanosleep.c
+ tests=lib/netinet_in.in.h
tests=lib/open.c
tests=lib/opendir.c
+ tests=lib/perror.c
+ tests=lib/pipe.c
tests=lib/putenv.c
+ tests=lib/raise.c
tests=lib/read-file.c
tests=lib/read-file.h
tests=lib/readdir.c
tests=lib/realloc.c
+ tests=lib/select.c
tests=lib/setenv.c
tests=lib/setlocale.c
+ tests=lib/setsockopt.c
+ tests=lib/sig-handler.c
+ tests=lib/sig-handler.h
+ tests=lib/sigaction.c
+ tests=lib/signal.in.h
+ tests=lib/sigprocmask.c
+ tests=lib/sleep.c
+ tests=lib/socket.c
+ tests=lib/sockets.c
+ tests=lib/sockets.h
tests=lib/stdio-impl.h
tests=lib/strdup.c
+ tests=lib/strerror_r.c
tests=lib/symlink.c
+ tests=lib/sys_ioctl.in.h
+ tests=lib/sys_select.in.h
+ tests=lib/sys_socket.c
+ tests=lib/sys_socket.in.h
+ tests=lib/sys_uio.in.h
tests=lib/unsetenv.c
+ tests=lib/unused-parameter.h
+ tests=lib/w32sock.h
+ tests=lib/warn-on-use.h
top/GNUmakefile
top/README-release
top/maint.mk
diff --git a/m4/hard-locale.m4 b/m4/hard-locale.m4
index d79acd6..1922223 100644
--- a/m4/hard-locale.m4
+++ b/m4/hard-locale.m4
@@ -1,5 +1,5 @@
# hard-locale.m4 serial 8
-dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/host-cpu-c-abi.m4 b/m4/host-cpu-c-abi.m4
new file mode 100644
index 0000000..3fac6f7
--- /dev/null
+++ b/m4/host-cpu-c-abi.m4
@@ -0,0 +1,456 @@
+# host-cpu-c-abi.m4 serial 10
+dnl Copyright (C) 2002-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible and Sam Steingold.
+
+dnl Sets the HOST_CPU variable to the canonical name of the CPU.
+dnl Sets the HOST_CPU_C_ABI variable to the canonical name of the CPU with its
+dnl C language ABI (application binary interface).
+dnl Also defines __${HOST_CPU}__ and __${HOST_CPU_C_ABI}__ as C macros in
+dnl config.h.
+dnl
+dnl This canonical name can be used to select a particular assembly language
+dnl source file that will interoperate with C code on the given host.
+dnl
+dnl For example:
+dnl * 'i386' and 'sparc' are different canonical names, because code for i386
+dnl will not run on SPARC CPUs and vice versa. They have different
+dnl instruction sets.
+dnl * 'sparc' and 'sparc64' are different canonical names, because code for
+dnl 'sparc' and code for 'sparc64' cannot be linked together: 'sparc' code
+dnl contains 32-bit instructions, whereas 'sparc64' code contains 64-bit
+dnl instructions. A process on a SPARC CPU can be in 32-bit mode or in 64-bit
+dnl mode, but not both.
+dnl * 'mips' and 'mipsn32' are different canonical names, because they use
+dnl different argument passing and return conventions for C functions, and
+dnl although the instruction set of 'mips' is a large subset of the
+dnl instruction set of 'mipsn32'.
+dnl * 'mipsn32' and 'mips64' are different canonical names, because they use
+dnl different sizes for the C types like 'int' and 'void *', and although
+dnl the instruction sets of 'mipsn32' and 'mips64' are the same.
+dnl * The same canonical name is used for different endiannesses. You can
+dnl determine the endianness through preprocessor symbols:
+dnl - 'arm': test __ARMEL__.
+dnl - 'mips', 'mipsn32', 'mips64': test _MIPSEB vs. _MIPSEL.
+dnl - 'powerpc64': test _BIG_ENDIAN vs. _LITTLE_ENDIAN.
+dnl * The same name 'i386' is used for CPUs of type i386, i486, i586
+dnl (Pentium), AMD K7, Pentium II, Pentium IV, etc., because
+dnl - Instructions that do not exist on all of these CPUs (cmpxchg,
+dnl MMX, SSE, SSE2, 3DNow! etc.) are not frequently used. If your
+dnl assembly language source files use such instructions, you will
+dnl need to make the distinction.
+dnl - Speed of execution of the common instruction set is reasonable across
+dnl the entire family of CPUs. If you have assembly language source files
+dnl that are optimized for particular CPU types (like GNU gmp has), you
+dnl will need to make the distinction.
+dnl See <https://en.wikipedia.org/wiki/X86_instruction_listings>.
+AC_DEFUN([gl_HOST_CPU_C_ABI],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_C_ASM])
+ AC_CACHE_CHECK([host CPU and C ABI], [gl_cv_host_cpu_c_abi],
+ [case "$host_cpu" in
+
+changequote(,)dnl
+ i[4567]86 )
+changequote([,])dnl
+ gl_cv_host_cpu_c_abi=i386
+ ;;
+
+ x86_64 )
+ # On x86_64 systems, the C compiler may be generating code in one of
+ # these ABIs:
+ # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
+ # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
+ # with native Windows (mingw, MSVC).
+ # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
+ # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if (defined __x86_64__ || defined __amd64__ \
+ || defined _M_X64 || defined _M_AMD64)
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __ILP32__ || defined _ILP32
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=x86_64-x32],
+ [gl_cv_host_cpu_c_abi=x86_64])],
+ [gl_cv_host_cpu_c_abi=i386])
+ ;;
+
+changequote(,)dnl
+ alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
+changequote([,])dnl
+ gl_cv_host_cpu_c_abi=alpha
+ ;;
+
+ arm* | aarch64 )
+ # Assume arm with EABI.
+ # On arm64 systems, the C compiler may be generating code in one of
+ # these ABIs:
+ # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
+ # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
+ # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#ifdef __aarch64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __ILP32__ || defined _ILP32
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=arm64-ilp32],
+ [gl_cv_host_cpu_c_abi=arm64])],
+ [# Don't distinguish little-endian and big-endian arm, since they
+ # don't require different machine code for simple operations and
+ # since the user can distinguish them through the preprocessor
+ # defines __ARMEL__ vs. __ARMEB__.
+ # But distinguish arm which passes floating-point arguments and
+ # return values in integer registers (r0, r1, ...) - this is
+ # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which
+ # passes them in float registers (s0, s1, ...) and double registers
+ # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer
+ # sets the preprocessor defines __ARM_PCS (for the first case) and
+ # __ARM_PCS_VFP (for the second case), but older GCC does not.
+ echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c
+ # Look for a reference to the register d0 in the .s file.
+ AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1
+ if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then
+ gl_cv_host_cpu_c_abi=armhf
+ else
+ gl_cv_host_cpu_c_abi=arm
+ fi
+ rm -f conftest*
+ ])
+ ;;
+
+ hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
+ # On hppa, the C compiler may be generating 32-bit code or 64-bit
+ # code. In the latter case, it defines _LP64 and __LP64__.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#ifdef __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=hppa64],
+ [gl_cv_host_cpu_c_abi=hppa])
+ ;;
+
+ ia64* )
+ # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
+ # 32-bit code. In the latter case, it defines _ILP32.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#ifdef _ILP32
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=ia64-ilp32],
+ [gl_cv_host_cpu_c_abi=ia64])
+ ;;
+
+ mips* )
+ # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
+ # at 32.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=mips64],
+ [# In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but
+ # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIN32.
+ # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but
+ # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIO32.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if (_MIPS_SIM == _ABIN32)
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=mipsn32],
+ [gl_cv_host_cpu_c_abi=mips])])
+ ;;
+
+ powerpc* )
+ # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
+ # No need to distinguish them here; the caller may distinguish
+ # them based on the OS.
+ # On powerpc64 systems, the C compiler may still be generating
+ # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
+ # be generating 64-bit code.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __powerpc64__ || defined _ARCH_PPC64
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [# On powerpc64, there are two ABIs on Linux: The AIX compatible
+ # one and the ELFv2 one. The latter defines _CALL_ELF=2.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined _CALL_ELF && _CALL_ELF == 2
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=powerpc64-elfv2],
+ [gl_cv_host_cpu_c_abi=powerpc64])
+ ],
+ [gl_cv_host_cpu_c_abi=powerpc])
+ ;;
+
+ rs6000 )
+ gl_cv_host_cpu_c_abi=powerpc
+ ;;
+
+ riscv32 | riscv64 )
+ # There are 2 architectures (with variants): rv32* and rv64*.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if __riscv_xlen == 64
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [cpu=riscv64],
+ [cpu=riscv32])
+ # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
+ # Size of 'long' and 'void *':
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [main_abi=lp64],
+ [main_abi=ilp32])
+ # Float ABIs:
+ # __riscv_float_abi_double:
+ # 'float' and 'double' are passed in floating-point registers.
+ # __riscv_float_abi_single:
+ # 'float' are passed in floating-point registers.
+ # __riscv_float_abi_soft:
+ # No values are passed in floating-point registers.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __riscv_float_abi_double
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [float_abi=d],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __riscv_float_abi_single
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [float_abi=f],
+ [float_abi=''])
+ ])
+ gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}"
+ ;;
+
+ s390* )
+ # On s390x, the C compiler may be generating 64-bit (= s390x) code
+ # or 31-bit (= s390) code.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __LP64__ || defined __s390x__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=s390x],
+ [gl_cv_host_cpu_c_abi=s390])
+ ;;
+
+ sparc | sparc64 )
+ # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
+ # C compiler still generates 32-bit code.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __sparcv9 || defined __arch64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=sparc64],
+ [gl_cv_host_cpu_c_abi=sparc])
+ ;;
+
+ *)
+ gl_cv_host_cpu_c_abi="$host_cpu"
+ ;;
+ esac
+ ])
+
+ dnl In most cases, $HOST_CPU and $HOST_CPU_C_ABI are the same.
+ HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'`
+ HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi"
+ AC_SUBST([HOST_CPU])
+ AC_SUBST([HOST_CPU_C_ABI])
+
+ # This was
+ # AC_DEFINE_UNQUOTED([__${HOST_CPU}__])
+ # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__])
+ # earlier, but KAI C++ 3.2d doesn't like this.
+ sed -e 's/-/_/g' >> confdefs.h <<EOF
+#ifndef __${HOST_CPU}__
+#define __${HOST_CPU}__ 1
+#endif
+#ifndef __${HOST_CPU_C_ABI}__
+#define __${HOST_CPU_C_ABI}__ 1
+#endif
+EOF
+ AH_TOP([/* CPU and C ABI indicator */
+#ifndef __i386__
+#undef __i386__
+#endif
+#ifndef __x86_64_x32__
+#undef __x86_64_x32__
+#endif
+#ifndef __x86_64__
+#undef __x86_64__
+#endif
+#ifndef __alpha__
+#undef __alpha__
+#endif
+#ifndef __arm__
+#undef __arm__
+#endif
+#ifndef __armhf__
+#undef __armhf__
+#endif
+#ifndef __arm64_ilp32__
+#undef __arm64_ilp32__
+#endif
+#ifndef __arm64__
+#undef __arm64__
+#endif
+#ifndef __hppa__
+#undef __hppa__
+#endif
+#ifndef __hppa64__
+#undef __hppa64__
+#endif
+#ifndef __ia64_ilp32__
+#undef __ia64_ilp32__
+#endif
+#ifndef __ia64__
+#undef __ia64__
+#endif
+#ifndef __m68k__
+#undef __m68k__
+#endif
+#ifndef __mips__
+#undef __mips__
+#endif
+#ifndef __mipsn32__
+#undef __mipsn32__
+#endif
+#ifndef __mips64__
+#undef __mips64__
+#endif
+#ifndef __powerpc__
+#undef __powerpc__
+#endif
+#ifndef __powerpc64__
+#undef __powerpc64__
+#endif
+#ifndef __powerpc64_elfv2__
+#undef __powerpc64_elfv2__
+#endif
+#ifndef __riscv32__
+#undef __riscv32__
+#endif
+#ifndef __riscv64__
+#undef __riscv64__
+#endif
+#ifndef __riscv32_ilp32__
+#undef __riscv32_ilp32__
+#endif
+#ifndef __riscv32_ilp32f__
+#undef __riscv32_ilp32f__
+#endif
+#ifndef __riscv32_ilp32d__
+#undef __riscv32_ilp32d__
+#endif
+#ifndef __riscv64_ilp32__
+#undef __riscv64_ilp32__
+#endif
+#ifndef __riscv64_ilp32f__
+#undef __riscv64_ilp32f__
+#endif
+#ifndef __riscv64_ilp32d__
+#undef __riscv64_ilp32d__
+#endif
+#ifndef __riscv64_lp64__
+#undef __riscv64_lp64__
+#endif
+#ifndef __riscv64_lp64f__
+#undef __riscv64_lp64f__
+#endif
+#ifndef __riscv64_lp64d__
+#undef __riscv64_lp64d__
+#endif
+#ifndef __s390__
+#undef __s390__
+#endif
+#ifndef __s390x__
+#undef __s390x__
+#endif
+#ifndef __sh__
+#undef __sh__
+#endif
+#ifndef __sparc__
+#undef __sparc__
+#endif
+#ifndef __sparc64__
+#undef __sparc64__
+#endif
+])
+
+])
diff --git a/m4/include_next.m4 b/m4/include_next.m4
index e687e23..a363cb0 100644
--- a/m4/include_next.m4
+++ b/m4/include_next.m4
@@ -1,12 +1,13 @@
-# include_next.m4 serial 23
-dnl Copyright (C) 2006-2017 Free Software Foundation, Inc.
+# include_next.m4 serial 24
+dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl From Paul Eggert and Derek Price.
-dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER.
+dnl Sets INCLUDE_NEXT, INCLUDE_NEXT_AS_FIRST_DIRECTIVE, PRAGMA_SYSTEM_HEADER,
+dnl and PRAGMA_COLUMNS.
dnl
dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to
dnl 'include' otherwise.
diff --git a/m4/inet_pton.m4 b/m4/inet_pton.m4
new file mode 100644
index 0000000..1aaa2e6
--- /dev/null
+++ b/m4/inet_pton.m4
@@ -0,0 +1,69 @@
+# inet_pton.m4 serial 18
+dnl Copyright (C) 2006, 2008-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_INET_PTON],
+[
+ AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS])
+
+ dnl Persuade Solaris <arpa/inet.h> to declare inet_pton.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([AC_C_RESTRICT])
+
+ dnl Most platforms that provide inet_pton define it in libc.
+ dnl Solaris 8..10 provide inet_pton in libnsl instead.
+ dnl Solaris 2.6..7 provide inet_pton in libresolv instead.
+ dnl Haiku provides it in -lnetwork.
+ dnl Native Windows provides it in -lws2_32 instead, with a declaration in
+ dnl <ws2tcpip.h>, and it uses stdcall calling convention, not cdecl
+ dnl (hence we cannot use AC_CHECK_FUNCS, AC_SEARCH_LIBS to find it).
+ HAVE_INET_PTON=1
+ INET_PTON_LIB=
+ gl_PREREQ_SYS_H_WINSOCK2
+ if test $HAVE_WINSOCK2_H = 1; then
+ AC_CHECK_DECLS([inet_pton],,, [[#include <ws2tcpip.h>]])
+ if test $ac_cv_have_decl_inet_pton = yes; then
+ dnl It needs to be overridden, because the stdcall calling convention
+ dnl is not compliant with POSIX.
+ REPLACE_INET_PTON=1
+ INET_PTON_LIB="-lws2_32"
+ else
+ HAVE_DECL_INET_PTON=0
+ HAVE_INET_PTON=0
+ fi
+ else
+ gl_save_LIBS=$LIBS
+ AC_SEARCH_LIBS([inet_pton], [nsl resolv network], [],
+ [AC_CHECK_FUNCS([inet_pton])
+ if test $ac_cv_func_inet_pton = no; then
+ HAVE_INET_PTON=0
+ fi
+ ])
+ LIBS=$gl_save_LIBS
+
+ if test "$ac_cv_search_inet_pton" != "no" \
+ && test "$ac_cv_search_inet_pton" != "none required"; then
+ INET_PTON_LIB="$ac_cv_search_inet_pton"
+ fi
+
+ AC_CHECK_HEADERS_ONCE([netdb.h])
+ AC_CHECK_DECLS([inet_pton],,,
+ [[#include <arpa/inet.h>
+ #if HAVE_NETDB_H
+ # include <netdb.h>
+ #endif
+ ]])
+ if test $ac_cv_have_decl_inet_pton = no; then
+ HAVE_DECL_INET_PTON=0
+ fi
+ fi
+ AC_SUBST([INET_PTON_LIB])
+])
+
+# Prerequisites of lib/inet_pton.c.
+AC_DEFUN([gl_PREREQ_INET_PTON], [
+ AC_REQUIRE([gl_SOCKET_FAMILIES])
+])
diff --git a/m4/inttypes-pri.m4 b/m4/inttypes-pri.m4
index 2055787..c844262 100644
--- a/m4/inttypes-pri.m4
+++ b/m4/inttypes-pri.m4
@@ -1,5 +1,5 @@
# inttypes-pri.m4 serial 7 (gettext-0.18.2)
-dnl Copyright (C) 1997-2002, 2006, 2008-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2002, 2006, 2008-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/inttypes.m4 b/m4/inttypes.m4
index 434a7ee..8069493 100644
--- a/m4/inttypes.m4
+++ b/m4/inttypes.m4
@@ -1,5 +1,5 @@
# inttypes.m4 serial 26
-dnl Copyright (C) 2006-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/ioctl.m4 b/m4/ioctl.m4
new file mode 100644
index 0000000..835338a
--- /dev/null
+++ b/m4/ioctl.m4
@@ -0,0 +1,44 @@
+# ioctl.m4 serial 5
+dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_IOCTL],
+[
+ AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+ HAVE_IOCTL=1
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ dnl Even if the 'socket' module is not used here, another part of the
+ dnl application may use it and pass file descriptors that refer to
+ dnl sockets to the ioctl() function. So enable the support for sockets.
+ HAVE_IOCTL=0
+ else
+ AC_CHECK_FUNCS([ioctl])
+ dnl On glibc systems, the second parameter is 'unsigned long int request',
+ dnl not 'int request'. We cannot simply cast the function pointer, but
+ dnl instead need a wrapper.
+ AC_CACHE_CHECK([for ioctl with POSIX signature],
+ [gl_cv_func_ioctl_posix_signature],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/ioctl.h>
+ /* On some platforms, ioctl() is declared in <unistd.h>. */
+ #include <unistd.h>
+ ]],
+ [[extern
+ #ifdef __cplusplus
+ "C"
+ #endif
+ int ioctl (int, int, ...);
+ ]])
+ ],
+ [gl_cv_func_ioctl_posix_signature=yes],
+ [gl_cv_func_ioctl_posix_signature=no])
+ ])
+ if test $gl_cv_func_ioctl_posix_signature != yes; then
+ REPLACE_IOCTL=1
+ fi
+ fi
+])
diff --git a/m4/isblank.m4 b/m4/isblank.m4
index abbc338..f98dfbf 100644
--- a/m4/isblank.m4
+++ b/m4/isblank.m4
@@ -1,5 +1,5 @@
# isblank.m4 serial 3
-dnl Copyright (C) 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/langinfo_h.m4 b/m4/langinfo_h.m4
index ea94b4e..de077c3 100644
--- a/m4/langinfo_h.m4
+++ b/m4/langinfo_h.m4
@@ -1,5 +1,5 @@
-# langinfo_h.m4 serial 7
-dnl Copyright (C) 2009-2017 Free Software Foundation, Inc.
+# langinfo_h.m4 serial 8
+dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -17,6 +17,7 @@ AC_DEFUN([gl_LANGINFO_H],
dnl Determine whether <langinfo.h> exists. It is missing on mingw and BeOS.
HAVE_LANGINFO_CODESET=0
HAVE_LANGINFO_T_FMT_AMPM=0
+ HAVE_LANGINFO_ALTMON=0
HAVE_LANGINFO_ERA=0
HAVE_LANGINFO_YESEXPR=0
AC_CHECK_HEADERS_ONCE([langinfo.h])
@@ -24,6 +25,7 @@ AC_DEFUN([gl_LANGINFO_H],
HAVE_LANGINFO_H=1
dnl Determine what <langinfo.h> defines. CODESET and ERA etc. are missing
dnl on OpenBSD 3.8. T_FMT_AMPM and YESEXPR, NOEXPR are missing on IRIX 5.3.
+ dnl ALTMON_* are missing on glibc 2.26 and many other systems.
AC_CACHE_CHECK([whether langinfo.h defines CODESET],
[gl_cv_header_langinfo_codeset],
[AC_COMPILE_IFELSE(
@@ -48,6 +50,18 @@ int a = T_FMT_AMPM;
if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
HAVE_LANGINFO_T_FMT_AMPM=1
fi
+ AC_CACHE_CHECK([whether langinfo.h defines ALTMON_1],
+ [gl_cv_header_langinfo_altmon],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <langinfo.h>
+int a = ALTMON_1;
+]])],
+ [gl_cv_header_langinfo_altmon=yes],
+ [gl_cv_header_langinfo_altmon=no])
+ ])
+ if test $gl_cv_header_langinfo_altmon = yes; then
+ HAVE_LANGINFO_ALTMON=1
+ fi
AC_CACHE_CHECK([whether langinfo.h defines ERA],
[gl_cv_header_langinfo_era],
[AC_COMPILE_IFELSE(
@@ -78,6 +92,7 @@ int a = YESEXPR;
AC_SUBST([HAVE_LANGINFO_H])
AC_SUBST([HAVE_LANGINFO_CODESET])
AC_SUBST([HAVE_LANGINFO_T_FMT_AMPM])
+ AC_SUBST([HAVE_LANGINFO_ALTMON])
AC_SUBST([HAVE_LANGINFO_ERA])
AC_SUBST([HAVE_LANGINFO_YESEXPR])
diff --git a/m4/largefile.m4 b/m4/largefile.m4
index 790f7c0..bec7cd1 100644
--- a/m4/largefile.m4
+++ b/m4/largefile.m4
@@ -1,6 +1,6 @@
# Enable large files on systems where this is not the default.
-# Copyright 1992-1996, 1998-2017 Free Software Foundation, Inc.
+# Copyright 1992-1996, 1998-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -126,9 +126,24 @@ AC_DEFUN([gl_LARGEFILE],
else
WINDOWS_64_BIT_OFF_T=0
fi
- dnl But all native Windows platforms (including mingw64) have a 32-bit
- dnl st_size member in 'struct stat'.
- WINDOWS_64_BIT_ST_SIZE=1
+ dnl Some mingw versions define, if _FILE_OFFSET_BITS=64, 'struct stat'
+ dnl to 'struct _stat32i64' or 'struct _stat64' (depending on
+ dnl _USE_32BIT_TIME_T), which has a 32-bit st_size member.
+ AC_CACHE_CHECK([for 64-bit st_size], [gl_cv_member_st_size_64],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/types.h>
+ struct stat buf;
+ int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
+ ]],
+ [[]])],
+ [gl_cv_member_st_size_64=yes], [gl_cv_member_st_size_64=no])
+ ])
+ if test $gl_cv_member_st_size_64 = no; then
+ WINDOWS_64_BIT_ST_SIZE=1
+ else
+ WINDOWS_64_BIT_ST_SIZE=0
+ fi
;;
*)
dnl Nothing to do on gnulib's side.
diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4
index a7733e4..1244ff8 100644
--- a/m4/lib-ld.m4
+++ b/m4/lib-ld.m4
@@ -1,5 +1,5 @@
-# lib-ld.m4 serial 6
-dnl Copyright (C) 1996-2003, 2009-2017 Free Software Foundation, Inc.
+# lib-ld.m4 serial 9
+dnl Copyright (C) 1996-2003, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -47,73 +47,122 @@ if test "${PATH_SEPARATOR+set}" != set; then
}
fi
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
+if test -n "$LD"; then
+ AC_MSG_CHECKING([for ld])
+elif test "$GCC" = yes; then
AC_MSG_CHECKING([for ld used by $CC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]]* | ?:[[\\/]]*)
- re_direlt='/[[^/]][[^/]]*/\.\./'
- # Canonicalize the pathname of ld
- ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
- while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
elif test "$with_gnu_ld" = yes; then
AC_MSG_CHECKING([for GNU ld])
else
AC_MSG_CHECKING([for non-GNU ld])
fi
-AC_CACHE_VAL([acl_cv_path_LD],
-[if test -z "$LD"; then
- acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$acl_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- acl_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some variants of GNU ld only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
- ;;
- *)
- test "$with_gnu_ld" != yes && break
- ;;
+if test -n "$LD"; then
+ # Let the user override the test with a path.
+ :
+else
+ AC_CACHE_VAL([acl_cv_path_LD],
+ [
+ acl_cv_path_LD= # Final result of this test
+ ac_prog=ld # Program to search in $PATH
+ if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $acl_output in
+ # Accept absolute paths.
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
+ while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
+ acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
+ done
+ # Got the pathname. No search in PATH is needed.
+ acl_cv_path_LD="$acl_output"
+ ac_prog=
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
esac
fi
- done
- IFS="$acl_save_ifs"
-else
- acl_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$acl_cv_path_LD"
+ if test -n "$ac_prog"; then
+ # Search for $ac_prog in $PATH.
+ acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$acl_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_ifs"
+ fi
+ case $host in
+ *-*-aix*)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __powerpc64__ || defined _ARCH_PPC64
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [# The compiler produces 64-bit code. Add option '-b64' so that the
+ # linker groks 64-bit object files.
+ case "$acl_cv_path_LD " in
+ *" -b64 "*) ;;
+ *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
+ esac
+ ], [])
+ ;;
+ sparc64-*-netbsd*)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __sparcv9 || defined __arch64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [],
+ [# The compiler produces 32-bit code. Add option '-m elf32_sparc'
+ # so that the linker groks 32-bit object files.
+ case "$acl_cv_path_LD " in
+ *" -m elf32_sparc "*) ;;
+ *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
+ esac
+ ])
+ ;;
+ esac
+ ])
+ LD="$acl_cv_path_LD"
+fi
if test -n "$LD"; then
AC_MSG_RESULT([$LD])
else
AC_MSG_RESULT([no])
+ AC_MSG_ERROR([no acceptable ld found in \$PATH])
fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
AC_LIB_PROG_LD_GNU
])
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4
index 1ce9a5a..df77db9 100644
--- a/m4/lib-link.m4
+++ b/m4/lib-link.m4
@@ -1,5 +1,5 @@
# lib-link.m4 serial 26 (gettext-0.18.2)
-dnl Copyright (C) 2001-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -211,7 +211,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
additional_includedir="$withval/include"
additional_libdir="$withval/$acl_libdirstem"
if test "$acl_libdirstem2" != "$acl_libdirstem" \
- && ! test -d "$withval/$acl_libdirstem"; then
+ && test ! -d "$withval/$acl_libdirstem"; then
additional_libdir="$withval/$acl_libdirstem2"
fi
fi
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4
index 68a0835..16b26fb 100644
--- a/m4/lib-prefix.m4
+++ b/m4/lib-prefix.m4
@@ -1,5 +1,5 @@
-# lib-prefix.m4 serial 7 (gettext-0.18)
-dnl Copyright (C) 2001-2005, 2008-2017 Free Software Foundation, Inc.
+# lib-prefix.m4 serial 11
+dnl Copyright (C) 2001-2005, 2008-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -174,51 +174,82 @@ AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
AC_REQUIRE([AC_CANONICAL_HOST])
- acl_libdirstem=lib
- acl_libdirstem2=
- case "$host_os" in
- solaris*)
- dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
- dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
- dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
- dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
- dnl symlink is missing, so we set acl_libdirstem2 too.
- AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
- [AC_EGREP_CPP([sixtyfour bits], [
-#ifdef _LP64
-sixtyfour bits
-#endif
- ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
- ])
- if test $gl_cv_solaris_64bit = yes; then
- acl_libdirstem=lib/64
- case "$host_cpu" in
- sparc*) acl_libdirstem2=lib/sparcv9 ;;
- i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
- esac
- fi
- ;;
- *)
- searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
- if test -n "$searchpath"; then
- acl_save_IFS="${IFS= }"; IFS=":"
- for searchdir in $searchpath; do
- if test -d "$searchdir"; then
- case "$searchdir" in
- */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
- */../ | */.. )
- # Better ignore directories of this form. They are misleading.
- ;;
- *) searchdir=`cd "$searchdir" && pwd`
- case "$searchdir" in
- */lib64 ) acl_libdirstem=lib64 ;;
- esac ;;
- esac
- fi
- done
- IFS="$acl_save_IFS"
- fi
- ;;
- esac
- test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
+ AC_REQUIRE([gl_HOST_CPU_C_ABI])
+ dnl Allow the user to override the result by setting acl_cv_libdirstems.
+ AC_CACHE_CHECK([for the common suffixes of directories in the library search path],
+ [acl_cv_libdirstems],
+ [acl_libdirstem=lib
+ acl_libdirstem2=
+ case "$host_os" in
+ solaris*)
+ dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
+ dnl <https://docs.oracle.com/cd/E19253-01/816-5138/dev-env/index.html>.
+ dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
+ dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
+ dnl symlink is missing, so we set acl_libdirstem2 too.
+ AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#ifdef _LP64
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_solaris_64bit=yes],
+ [gl_cv_solaris_64bit=no])
+ ])
+ if test $gl_cv_solaris_64bit = yes; then
+ acl_libdirstem=lib/64
+ case "$host_cpu" in
+ sparc*) acl_libdirstem2=lib/sparcv9 ;;
+ i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
+ esac
+ fi
+ ;;
+ *)
+ dnl If $CC generates code for a 32-bit ABI, the libraries are
+ dnl surely under $prefix/lib, not $prefix/lib64.
+ case "$gl_cv_host_cpu_c_abi" in
+ i386 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | s390 | sparc)
+ ;;
+ *) # x86_64 | arm64 | hppa64 | ia64 | mips64 | powerpc64* | s390x | sparc64 | ...
+ dnl The result is a property of the system. However, non-system
+ dnl compilers sometimes have odd library search paths. Therefore
+ dnl prefer asking /usr/bin/gcc, if available, rather than $CC.
+ searchpath=`(if test -f /usr/bin/gcc \
+ && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \
+ LC_ALL=C /usr/bin/gcc -print-search-dirs; \
+ else \
+ LC_ALL=C $CC -print-search-dirs; \
+ fi) 2>/dev/null \
+ | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+ */../ | */.. )
+ # Better ignore directories of this form. They are misleading.
+ ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib64 ) acl_libdirstem=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
+ acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2"
+ ])
+ # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2.
+ acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
+ acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'`
])
diff --git a/m4/limits-h.m4 b/m4/limits-h.m4
index 443f91b..511dcef 100644
--- a/m4/limits-h.m4
+++ b/m4/limits-h.m4
@@ -1,6 +1,6 @@
dnl Check whether limits.h has needed features.
-dnl Copyright 2016-2017 Free Software Foundation, Inc.
+dnl Copyright 2016-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/link.m4 b/m4/link.m4
index 021c301..b0b3ff2 100644
--- a/m4/link.m4
+++ b/m4/link.m4
@@ -1,5 +1,5 @@
-# link.m4 serial 8
-dnl Copyright (C) 2009-2017 Free Software Foundation, Inc.
+# link.m4 serial 9
+dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -39,10 +39,10 @@ AC_DEFUN([gl_FUNC_LINK],
]])],
[gl_cv_func_link_works=yes], [gl_cv_func_link_works=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_link_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_link_works="guessing no" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_link_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_link_works="guessing no" ;;
esac
])
rm -f conftest.a conftest.b conftest.lnk])
diff --git a/m4/localcharset.m4 b/m4/localcharset.m4
index 0c1ff38..2d7ca64 100644
--- a/m4/localcharset.m4
+++ b/m4/localcharset.m4
@@ -1,5 +1,5 @@
# localcharset.m4 serial 7
-dnl Copyright (C) 2002, 2004, 2006, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004, 2006, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/locale-fr.m4 b/m4/locale-fr.m4
index 93d3da7..30a1d94 100644
--- a/m4/locale-fr.m4
+++ b/m4/locale-fr.m4
@@ -1,5 +1,5 @@
-# locale-fr.m4 serial 17
-dnl Copyright (C) 2003, 2005-2017 Free Software Foundation, Inc.
+# locale-fr.m4 serial 18
+dnl Copyright (C) 2003, 2005-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -24,8 +24,14 @@ changequote(,)dnl
struct tm t;
char buf[16];
int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if defined __BEOS__ || defined __HAIKU__
+ return 1;
+#else
/* Check whether the given locale name is recognized by the system. */
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
@@ -33,9 +39,9 @@ int main () {
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
return 1;
-#else
+# else
if (setlocale (LC_ALL, "") == NULL) return 1;
-#endif
+# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
@@ -44,32 +50,33 @@ int main () {
some unit tests fail.
On MirBSD 10, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "UTF-8". */
-#if HAVE_LANGINFO_CODESET
+# if HAVE_LANGINFO_CODESET
{
const char *cs = nl_langinfo (CODESET);
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
|| strcmp (cs, "UTF-8") == 0)
return 1;
}
-#endif
-#ifdef __CYGWIN__
+# endif
+# ifdef __CYGWIN__
/* On Cygwin, avoid locale names without encoding suffix, because the
locale_charset() function relies on the encoding suffix. Note that
LC_ALL is set on the command line. */
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-#endif
+# endif
/* Check whether in the abbreviation of the second month, the second
character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
one byte long. This excludes the UTF-8 encoding. */
t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
-#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
+# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
-#endif
+# endif
return 0;
+#endif
}
changequote([,])dnl
])])
diff --git a/m4/locale-ja.m4 b/m4/locale-ja.m4
index c1d1154..2c34006 100644
--- a/m4/locale-ja.m4
+++ b/m4/locale-ja.m4
@@ -1,5 +1,5 @@
-# locale-ja.m4 serial 12
-dnl Copyright (C) 2003, 2005-2017 Free Software Foundation, Inc.
+# locale-ja.m4 serial 13
+dnl Copyright (C) 2003, 2005-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -25,9 +25,14 @@ struct tm t;
char buf[16];
int main ()
{
- const char *p;
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if defined __BEOS__ || defined __HAIKU__
+ return 1;
+#else
/* Check whether the given locale name is recognized by the system. */
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
@@ -35,9 +40,9 @@ int main ()
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
return 1;
-#else
+# else
if (setlocale (LC_ALL, "") == NULL) return 1;
-#endif
+# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
@@ -46,32 +51,36 @@ int main ()
some unit tests fail.
On MirBSD 10, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "UTF-8". */
-#if HAVE_LANGINFO_CODESET
+# if HAVE_LANGINFO_CODESET
{
const char *cs = nl_langinfo (CODESET);
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
|| strcmp (cs, "UTF-8") == 0)
return 1;
}
-#endif
-#ifdef __CYGWIN__
+# endif
+# ifdef __CYGWIN__
/* On Cygwin, avoid locale names without encoding suffix, because the
locale_charset() function relies on the encoding suffix. Note that
LC_ALL is set on the command line. */
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-#endif
+# endif
/* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
on Cygwin 1.5.x. */
if (MB_CUR_MAX == 1)
return 1;
/* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
This excludes the UTF-8 encoding (except on MirBSD). */
- t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
- if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
- for (p = buf; *p != '\0'; p++)
- if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
- return 1;
+ {
+ const char *p;
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ }
return 0;
+#endif
}
changequote([,])dnl
])])
diff --git a/m4/locale-tr.m4 b/m4/locale-tr.m4
index 06e2f6e..441cae6 100644
--- a/m4/locale-tr.m4
+++ b/m4/locale-tr.m4
@@ -1,5 +1,5 @@
# locale-tr.m4 serial 10
-dnl Copyright (C) 2003, 2005-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/locale-zh.m4 b/m4/locale-zh.m4
index 1459418..f7e1901 100644
--- a/m4/locale-zh.m4
+++ b/m4/locale-zh.m4
@@ -1,5 +1,5 @@
-# locale-zh.m4 serial 12
-dnl Copyright (C) 2003, 2005-2017 Free Software Foundation, Inc.
+# locale-zh.m4 serial 13
+dnl Copyright (C) 2003, 2005-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -26,9 +26,14 @@ struct tm t;
char buf[16];
int main ()
{
- const char *p;
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if defined __BEOS__ || defined __HAIKU__
+ return 1;
+#else
/* Check whether the given locale name is recognized by the system. */
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
@@ -36,9 +41,9 @@ int main ()
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
return 1;
-#else
+# else
if (setlocale (LC_ALL, "") == NULL) return 1;
-#endif
+# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
@@ -47,32 +52,36 @@ int main ()
some unit tests fail.
On MirBSD 10, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "UTF-8". */
-#if HAVE_LANGINFO_CODESET
+# if HAVE_LANGINFO_CODESET
{
const char *cs = nl_langinfo (CODESET);
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
|| strcmp (cs, "UTF-8") == 0)
return 1;
}
-#endif
-#ifdef __CYGWIN__
+# endif
+# ifdef __CYGWIN__
/* On Cygwin, avoid locale names without encoding suffix, because the
locale_charset() function relies on the encoding suffix. Note that
LC_ALL is set on the command line. */
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-#endif
+# endif
/* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
This excludes the UTF-8 encoding (except on MirBSD). */
- t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
- if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
- for (p = buf; *p != '\0'; p++)
- if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
- return 1;
+ {
+ const char *p;
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ }
/* Check whether a typical GB18030 multibyte sequence is recognized as a
single wide character. This excludes the GB2312 and GBK encodings. */
if (mblen ("\203\062\332\066", 5) != 4)
return 1;
return 0;
+#endif
}
changequote([,])dnl
])])
diff --git a/m4/locale_h.m4 b/m4/locale_h.m4
index 7426a65..4bd9e57 100644
--- a/m4/locale_h.m4
+++ b/m4/locale_h.m4
@@ -1,5 +1,5 @@
-# locale_h.m4 serial 19
-dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
+# locale_h.m4 serial 20
+dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -17,7 +17,7 @@ AC_DEFUN([gl_LOCALE_H],
dnl If <stddef.h> is replaced, then <locale.h> must also be replaced.
AC_REQUIRE([gl_STDDEF_H])
- dnl Solaris 11 2011-11 defines the int_p_*, int_n_* members of 'struct lconv'
+ dnl Solaris 11.0 defines the int_p_*, int_n_* members of 'struct lconv'
dnl only if _LCONV_C99 is defined.
AC_REQUIRE([AC_CANONICAL_HOST])
case "$host_os" in
diff --git a/m4/localeconv.m4 b/m4/localeconv.m4
index c287aa5..517f398 100644
--- a/m4/localeconv.m4
+++ b/m4/localeconv.m4
@@ -1,5 +1,5 @@
# localeconv.m4 serial 1
-dnl Copyright (C) 2012-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/localename.m4 b/m4/localename.m4
index bb42516..a0e1367 100644
--- a/m4/localename.m4
+++ b/m4/localename.m4
@@ -1,5 +1,5 @@
-# localename.m4 serial 2
-dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
+# localename.m4 serial 3
+dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -8,6 +8,7 @@ AC_DEFUN([gl_LOCALENAME],
[
AC_REQUIRE([gt_LC_MESSAGES])
AC_REQUIRE([gt_INTL_MACOSX])
+ AC_CHECK_HEADERS_ONCE([langinfo.h])
AC_CHECK_FUNCS([setlocale uselocale])
dnl Solaris 12 provides getlocalename_l, while Illumos doesn't have
dnl it nor the equivalent.
diff --git a/m4/localtime-buffer.m4 b/m4/localtime-buffer.m4
new file mode 100644
index 0000000..4b3ec57
--- /dev/null
+++ b/m4/localtime-buffer.m4
@@ -0,0 +1,21 @@
+# localtime-buffer.m4 serial 1
+dnl Copyright (C) 2017-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_LOCALTIME_BUFFER_DEFAULTS],
+[
+ NEED_LOCALTIME_BUFFER=0
+])
+
+dnl Macro invoked from other modules, to signal that the compilation of
+dnl module 'localtime-buffer' is needed.
+AC_DEFUN([gl_LOCALTIME_BUFFER_NEEDED],
+[
+ AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS])
+ AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+ NEED_LOCALTIME_BUFFER=1
+ REPLACE_GMTIME=1
+ REPLACE_LOCALTIME=1
+])
diff --git a/m4/lock.m4 b/m4/lock.m4
index cb04a67..dac4c38 100644
--- a/m4/lock.m4
+++ b/m4/lock.m4
@@ -1,5 +1,5 @@
# lock.m4 serial 14
-dnl Copyright (C) 2005-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/longlong.m4 b/m4/longlong.m4
index 9a3294b..27e6326 100644
--- a/m4/longlong.m4
+++ b/m4/longlong.m4
@@ -1,5 +1,5 @@
# longlong.m4 serial 17
-dnl Copyright (C) 1999-2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 1999-2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/lseek.m4 b/m4/lseek.m4
index 627e772..423b9fb 100644
--- a/m4/lseek.m4
+++ b/m4/lseek.m4
@@ -1,5 +1,5 @@
# lseek.m4 serial 10
-dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/lstat.m4 b/m4/lstat.m4
index 953c117..ac6f143 100644
--- a/m4/lstat.m4
+++ b/m4/lstat.m4
@@ -1,6 +1,6 @@
-# serial 27
+# serial 31
-# Copyright (C) 1997-2001, 2003-2017 Free Software Foundation, Inc.
+# Copyright (C) 1997-2001, 2003-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -10,14 +10,15 @@ dnl From Jim Meyering.
AC_DEFUN([gl_FUNC_LSTAT],
[
+ AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
dnl If lstat does not exist, the replacement <sys/stat.h> does
dnl "#define lstat stat", and lstat.c is a no-op.
AC_CHECK_FUNCS_ONCE([lstat])
if test $ac_cv_func_lstat = yes; then
AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
- case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
- *no)
+ case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
+ solaris* | *no)
REPLACE_LSTAT=1
;;
esac
@@ -33,6 +34,7 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
[
dnl We don't use AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK any more, because it
dnl is no longer maintained in Autoconf and because it invokes AC_LIBOBJ.
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether lstat correctly handles trailing slash],
[gl_cv_func_lstat_dereferences_slashed_symlink],
[rm -f conftest.sym conftest.file
@@ -51,9 +53,12 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
[gl_cv_func_lstat_dereferences_slashed_symlink=yes],
[gl_cv_func_lstat_dereferences_slashed_symlink=no],
[case "$host_os" in
- *-gnu*)
+ *-gnu* | gnu*)
# Guess yes on glibc systems.
gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
+ mingw*)
+ # Guess no on native Windows.
+ gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
*)
# If we don't know, assume the worst.
gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
diff --git a/m4/malloc.m4 b/m4/malloc.m4
index e1d2ec6..0ded9ba 100644
--- a/m4/malloc.m4
+++ b/m4/malloc.m4
@@ -1,5 +1,5 @@
-# malloc.m4 serial 15
-dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
+# malloc.m4 serial 16
+dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
m4_version_prereq([2.70], [] ,[
# This is adapted with modifications from upstream Autoconf here:
-# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
+# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
AC_DEFUN([_AC_FUNC_MALLOC_IF],
[
AC_REQUIRE([AC_HEADER_STDC])dnl
@@ -32,7 +32,7 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF],
[ac_cv_func_malloc_0_nonnull=no],
[case "$host_os" in
# Guess yes on platforms where we know the result.
- *-gnu* | freebsd* | netbsd* | openbsd* \
+ *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
| hpux* | solaris* | cygwin* | mingw*)
ac_cv_func_malloc_0_nonnull=yes ;;
# If we don't know, assume the worst.
diff --git a/m4/malloca.m4 b/m4/malloca.m4
index 6956baf..2251e61 100644
--- a/m4/malloca.m4
+++ b/m4/malloca.m4
@@ -1,5 +1,5 @@
# malloca.m4 serial 1
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2017 Free Software Foundation,
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2018 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4
index 0f06ade..18249b8 100644
--- a/m4/manywarnings.m4
+++ b/m4/manywarnings.m4
@@ -1,5 +1,5 @@
-# manywarnings.m4 serial 8
-dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
+# manywarnings.m4 serial 13
+dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -33,8 +33,17 @@ AC_DEFUN([gl_MANYWARN_COMPLEMENT],
# Add all documented GCC warning parameters to variable VARIABLE.
# Note that you need to test them using gl_WARN_ADD if you want to
# make sure your gcc understands it.
+#
+# The effects of this macro depend on the current language (_AC_LANG).
AC_DEFUN([gl_MANYWARN_ALL_GCC],
+[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
+
+# Specialization for _AC_LANG = C.
+# Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b.
+m4_defun([gl_MANYWARN_ALL_GCC(C)],
[
+ AC_LANG_PUSH([C])
+
dnl First, check for some issues that only occur when combining multiple
dnl gcc warning categories.
AC_REQUIRE([AC_PROG_CC])
@@ -97,14 +106,13 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
# To compare this list to your installed GCC's, run this Bash command:
#
# comm -3 \
- # <(sed -n 's/^ *\(-[^ ]*\) .*/\1/p' manywarnings.m4 | sort) \
+ # <(sed -n 's/^ *\(-[^ 0-9][^ ]*\) .*/\1/p' manywarnings.m4 | sort) \
# <(gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort |
- # grep -v -x -f <(
+ # grep -v -x -F -f <(
# awk '/^[^#]/ {print $1}' ../build-aux/gcc-warning.spec))
gl_manywarn_set=
- for gl_manywarn_item in \
- -fno-common \
+ for gl_manywarn_item in -fno-common \
-W \
-Wabi \
-Waddress \
@@ -113,6 +121,8 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
-Wattributes \
-Wbad-function-cast \
-Wbool-compare \
+ -Wbool-operation \
+ -Wbuiltin-declaration-mismatch \
-Wbuiltin-macro-redefined \
-Wcast-align \
-Wchar-subscripts \
@@ -122,6 +132,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
-Wcomments \
-Wcoverage-mismatch \
-Wcpp \
+ -Wdangling-else \
-Wdate-time \
-Wdeprecated \
-Wdeprecated-declarations \
@@ -131,10 +142,13 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
-Wdiscarded-qualifiers \
-Wdiv-by-zero \
-Wdouble-promotion \
+ -Wduplicated-branches \
-Wduplicated-cond \
+ -Wduplicate-decl-specifier \
-Wempty-body \
-Wendif-labels \
-Wenum-compare \
+ -Wexpansion-to-defined \
-Wextra \
-Wformat-contains-nul \
-Wformat-extra-args \
@@ -155,6 +169,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
-Winit-self \
-Winline \
-Wint-conversion \
+ -Wint-in-bool-context \
-Wint-to-pointer-cast \
-Winvalid-memory-model \
-Winvalid-pch \
@@ -163,6 +178,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
-Wlogical-op \
-Wmain \
-Wmaybe-uninitialized \
+ -Wmemset-elt-size \
-Wmemset-transposed-args \
-Wmisleading-indentation \
-Wmissing-braces \
@@ -188,9 +204,12 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
-Wpacked-bitfield-compat \
-Wparentheses \
-Wpointer-arith \
+ -Wpointer-compare \
-Wpointer-sign \
-Wpointer-to-int-cast \
-Wpragmas \
+ -Wpsabi \
+ -Wrestrict \
-Wreturn-local-addr \
-Wreturn-type \
-Wscalar-storage-order \
@@ -214,6 +233,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
-Wswitch \
-Wswitch-bool \
-Wswitch-default \
+ -Wswitch-unreachable \
-Wsync-nand \
-Wsystem-headers \
-Wtautological-compare \
@@ -247,10 +267,34 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
# gcc --help=warnings outputs an unusual form for these options; list
# them here so that the above 'comm' command doesn't report a false match.
+ # Would prefer "min (PTRDIFF_MAX, SIZE_MAX)", but it must be a literal.
+ # Also, AC_COMPUTE_INT requires it to fit in a long; it is 2**63 on
+ # the only platforms where it does not fit in a long, so make that
+ # a special case.
+ AC_MSG_CHECKING([max safe object size])
+ AC_COMPUTE_INT([gl_alloc_max],
+ [LONG_MAX < (PTRDIFF_MAX < (size_t) -1 ? PTRDIFF_MAX : (size_t) -1)
+ ? -1
+ : PTRDIFF_MAX < (size_t) -1 ? (long) PTRDIFF_MAX : (long) (size_t) -1],
+ [[#include <limits.h>
+ #include <stddef.h>
+ #include <stdint.h>
+ ]],
+ [gl_alloc_max=2147483647])
+ case $gl_alloc_max in
+ -1) gl_alloc_max=9223372036854775807;;
+ esac
+ AC_MSG_RESULT([$gl_alloc_max])
+ gl_manywarn_set="$gl_manywarn_set -Walloc-size-larger-than=$gl_alloc_max"
gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2"
+ gl_manywarn_set="$gl_manywarn_set -Wformat-overflow=2"
+ gl_manywarn_set="$gl_manywarn_set -Wformat-truncation=2"
+ gl_manywarn_set="$gl_manywarn_set -Wimplicit-fallthrough=5"
gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc"
gl_manywarn_set="$gl_manywarn_set -Wshift-overflow=2"
+ gl_manywarn_set="$gl_manywarn_set -Wstringop-overflow=2"
gl_manywarn_set="$gl_manywarn_set -Wunused-const-variable=2"
+ gl_manywarn_set="$gl_manywarn_set -Wvla-larger-than=4031"
# These are needed for older GCC versions.
if test -n "$GCC"; then
@@ -273,4 +317,13 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
fi
$1=$gl_manywarn_set
+
+ AC_LANG_POP([C])
+])
+
+# Specialization for _AC_LANG = C++.
+# Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b.
+m4_defun([gl_MANYWARN_ALL_GCC(C++)],
+[
+ gl_MANYWARN_ALL_GCC_CXX_IMPL([$1])
])
diff --git a/m4/mbrlen.m4 b/m4/mbrlen.m4
index cd579a2..2a5df28 100644
--- a/m4/mbrlen.m4
+++ b/m4/mbrlen.m4
@@ -1,5 +1,5 @@
-# mbrlen.m4 serial 9 -*- coding: utf-8 -*-
-dnl Copyright (C) 2008, 2010-2017 Free Software Foundation, Inc.
+# mbrlen.m4 serial 10 -*- coding: utf-8 -*-
+dnl Copyright (C) 2008, 2010-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -240,10 +240,9 @@ AC_DEFUN([gl_MBRLEN_EMPTY_INPUT],
dnl is present.
changequote(,)dnl
case "$host_os" in
- # Guess no on AIX and glibc systems.
- aix* | *-gnu*)
- gl_cv_func_mbrlen_empty_input="guessing no" ;;
- *) gl_cv_func_mbrlen_empty_input="guessing yes" ;;
+ # Guess no on AIX and glibc systems.
+ aix* | *-gnu* | gnu*) gl_cv_func_mbrlen_empty_input="guessing no" ;;
+ *) gl_cv_func_mbrlen_empty_input="guessing yes" ;;
esac
changequote([,])dnl
AC_RUN_IFELSE(
diff --git a/m4/mbrtowc.m4 b/m4/mbrtowc.m4
index 536183f..f789875 100644
--- a/m4/mbrtowc.m4
+++ b/m4/mbrtowc.m4
@@ -1,5 +1,5 @@
-# mbrtowc.m4 serial 27 -*- coding: utf-8 -*-
-dnl Copyright (C) 2001-2002, 2004-2005, 2008-2017 Free Software Foundation,
+# mbrtowc.m4 serial 30 -*- coding: utf-8 -*-
+dnl Copyright (C) 2001-2002, 2004-2005, 2008-2018 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -563,10 +563,11 @@ AC_DEFUN([gl_MBRTOWC_EMPTY_INPUT],
dnl is present.
changequote(,)dnl
case "$host_os" in
- # Guess no on AIX and glibc systems.
- aix* | *-gnu*)
- gl_cv_func_mbrtowc_empty_input="guessing no" ;;
- *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
+ # Guess no on AIX and glibc systems.
+ aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
+ *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
esac
changequote([,])dnl
AC_RUN_IFELSE(
@@ -592,6 +593,7 @@ dnl https://sourceware.org/bugzilla/show_bug.cgi?id=19932
AC_DEFUN([gl_MBRTOWC_C_LOCALE],
[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether the C locale is free of encoding errors],
[gl_cv_C_locale_sans_EILSEQ],
[
@@ -622,7 +624,12 @@ AC_DEFUN([gl_MBRTOWC_C_LOCALE],
]])],
[gl_cv_C_locale_sans_EILSEQ=yes],
[gl_cv_C_locale_sans_EILSEQ=no],
- [:])])
+ [case "$host_os" in
+ # Guess yes on native Windows.
+ mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;;
+ esac
+ ])
+ ])
])
# Prerequisites of lib/mbrtowc.c.
@@ -639,7 +646,7 @@ AC_DEFUN([AC_FUNC_MBRTOWC],
[
dnl Same as AC_FUNC_MBRTOWC in autoconf-2.60.
AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
- gl_cv_func_mbrtowc,
+ [gl_cv_func_mbrtowc],
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
@@ -655,8 +662,8 @@ AC_DEFUN([AC_FUNC_MBRTOWC],
size_t n = 1;
mbstate_t state;
return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));]])],
- gl_cv_func_mbrtowc=yes,
- gl_cv_func_mbrtowc=no)])
+ [gl_cv_func_mbrtowc=yes],
+ [gl_cv_func_mbrtowc=no])])
if test $gl_cv_func_mbrtowc = yes; then
AC_DEFINE([HAVE_MBRTOWC], [1],
[Define to 1 if mbrtowc and mbstate_t are properly declared.])
diff --git a/m4/mbsinit.m4 b/m4/mbsinit.m4
index 5904a51..5cba3df 100644
--- a/m4/mbsinit.m4
+++ b/m4/mbsinit.m4
@@ -1,5 +1,5 @@
# mbsinit.m4 serial 8
-dnl Copyright (C) 2008, 2010-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2010-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/mbstate_t.m4 b/m4/mbstate_t.m4
index 6325cf3..004aa0d 100644
--- a/m4/mbstate_t.m4
+++ b/m4/mbstate_t.m4
@@ -1,5 +1,5 @@
# mbstate_t.m4 serial 13
-dnl Copyright (C) 2000-2002, 2008-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2008-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/mbtowc.m4 b/m4/mbtowc.m4
index 378a4e2..ecac6a2 100644
--- a/m4/mbtowc.m4
+++ b/m4/mbtowc.m4
@@ -1,5 +1,5 @@
# mbtowc.m4 serial 2
-dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/memchr.m4 b/m4/memchr.m4
index b6ec814..83c65c1 100644
--- a/m4/memchr.m4
+++ b/m4/memchr.m4
@@ -1,11 +1,13 @@
-# memchr.m4 serial 12
-dnl Copyright (C) 2002-2004, 2009-2017 Free Software Foundation, Inc.
+# memchr.m4 serial 13
+dnl Copyright (C) 2002-2004, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
dnl Check for prerequisites for memory fence checks.
gl_FUNC_MMAP_ANON
AC_CHECK_HEADERS_ONCE([sys/mman.h])
@@ -23,10 +25,10 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
if test $HAVE_MEMCHR = 1; then
# Detect platform-specific bugs in some versions of glibc:
# memchr should not dereference anything with length 0
- # http://bugzilla.redhat.com/499689
+ # https://bugzilla.redhat.com/show_bug.cgi?id=499689
# memchr should not dereference overestimated length after a match
- # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
- # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
+ # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
+ # https://sourceware.org/bugzilla/show_bug.cgi?id=10162
# Assume that memchr works on platforms that lack mprotect.
AC_CACHE_CHECK([whether memchr works], [gl_cv_func_memchr_works],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([[
@@ -73,12 +75,21 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
result |= 4;
}
return result;
-]])], [gl_cv_func_memchr_works=yes], [gl_cv_func_memchr_works=no],
- [dnl Be pessimistic for now.
- gl_cv_func_memchr_works="guessing no"])])
- if test "$gl_cv_func_memchr_works" != yes; then
- REPLACE_MEMCHR=1
- fi
+]])],
+ [gl_cv_func_memchr_works=yes],
+ [gl_cv_func_memchr_works=no],
+ [case "$host_os" in
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_memchr_works="guessing yes" ;;
+ # Be pessimistic for now.
+ *) gl_cv_func_memchr_works="guessing no" ;;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_memchr_works" in
+ *yes) ;;
+ *) REPLACE_MEMCHR=1 ;;
+ esac
fi
])
diff --git a/m4/memrchr.m4 b/m4/memrchr.m4
index e180f61..a036b39 100644
--- a/m4/memrchr.m4
+++ b/m4/memrchr.m4
@@ -1,5 +1,5 @@
# memrchr.m4 serial 10
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2017 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2018 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/minmax.m4 b/m4/minmax.m4
index 6845fce..5e88508 100644
--- a/m4/minmax.m4
+++ b/m4/minmax.m4
@@ -1,5 +1,5 @@
# minmax.m4 serial 4
-dnl Copyright (C) 2005, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/mkostemp.m4 b/m4/mkostemp.m4
index 337f17b..245598e 100644
--- a/m4/mkostemp.m4
+++ b/m4/mkostemp.m4
@@ -1,5 +1,5 @@
# mkostemp.m4 serial 2
-dnl Copyright (C) 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/mmap-anon.m4 b/m4/mmap-anon.m4
index 263687d..55fea82 100644
--- a/m4/mmap-anon.m4
+++ b/m4/mmap-anon.m4
@@ -1,5 +1,5 @@
# mmap-anon.m4 serial 10
-dnl Copyright (C) 2005, 2007, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/mode_t.m4 b/m4/mode_t.m4
index 75d372a..83e276c 100644
--- a/m4/mode_t.m4
+++ b/m4/mode_t.m4
@@ -1,5 +1,5 @@
# mode_t.m4 serial 2
-dnl Copyright (C) 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/msvc-inval.m4 b/m4/msvc-inval.m4
index 3324375..55baeec 100644
--- a/m4/msvc-inval.m4
+++ b/m4/msvc-inval.m4
@@ -1,5 +1,5 @@
# msvc-inval.m4 serial 1
-dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/msvc-nothrow.m4 b/m4/msvc-nothrow.m4
index 3014661..74ae427 100644
--- a/m4/msvc-nothrow.m4
+++ b/m4/msvc-nothrow.m4
@@ -1,5 +1,5 @@
# msvc-nothrow.m4 serial 1
-dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/multiarch.m4 b/m4/multiarch.m4
index 30006cb..38a11cc 100644
--- a/m4/multiarch.m4
+++ b/m4/multiarch.m4
@@ -1,5 +1,5 @@
# multiarch.m4 serial 7
-dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/nanosleep.m4 b/m4/nanosleep.m4
new file mode 100644
index 0000000..8903734
--- /dev/null
+++ b/m4/nanosleep.m4
@@ -0,0 +1,150 @@
+# serial 37
+
+dnl From Jim Meyering.
+dnl Check for the nanosleep function.
+dnl If not found, use the supplied replacement.
+dnl
+
+# Copyright (C) 1999-2001, 2003-2018 Free Software Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_NANOSLEEP],
+[
+ AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ dnl Persuade glibc and Solaris <time.h> to declare nanosleep.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+ AC_CHECK_HEADERS_ONCE([sys/time.h])
+ AC_REQUIRE([gl_FUNC_SELECT])
+
+ nanosleep_save_libs=$LIBS
+
+ # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
+ # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
+ LIB_NANOSLEEP=
+ AC_SUBST([LIB_NANOSLEEP])
+ AC_SEARCH_LIBS([nanosleep], [rt posix4],
+ [test "$ac_cv_search_nanosleep" = "none required" ||
+ LIB_NANOSLEEP=$ac_cv_search_nanosleep])
+ if test "x$ac_cv_search_nanosleep" != xno; then
+ dnl The system has a nanosleep function.
+
+ AC_REQUIRE([gl_MULTIARCH])
+ if test $APPLE_UNIVERSAL_BUILD = 1; then
+ # A universal build on Apple Mac OS X platforms.
+ # The test result would be 'no (mishandles large arguments)' in 64-bit
+ # mode but 'yes' in 32-bit mode. But we need a configuration result that
+ # is valid in both modes.
+ gl_cv_func_nanosleep='no (mishandles large arguments)'
+ fi
+
+ AC_CACHE_CHECK([for working nanosleep],
+ [gl_cv_func_nanosleep],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+ #include <errno.h>
+ #include <limits.h>
+ #include <signal.h>
+ #if HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #include <time.h>
+ #include <unistd.h>
+ #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+ #define TYPE_MAXIMUM(t) \
+ ((t) (! TYPE_SIGNED (t) \
+ ? (t) -1 \
+ : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
+
+ static void
+ check_for_SIGALRM (int sig)
+ {
+ if (sig != SIGALRM)
+ _exit (1);
+ }
+
+ int
+ main ()
+ {
+ static struct timespec ts_sleep;
+ static struct timespec ts_remaining;
+ static struct sigaction act;
+ /* Test for major problems first. */
+ if (! nanosleep)
+ return 2;
+ act.sa_handler = check_for_SIGALRM;
+ sigemptyset (&act.sa_mask);
+ sigaction (SIGALRM, &act, NULL);
+ ts_sleep.tv_sec = 0;
+ ts_sleep.tv_nsec = 1;
+ alarm (1);
+ if (nanosleep (&ts_sleep, NULL) != 0)
+ return 3;
+ /* Test for a minor problem: the handling of large arguments. */
+ ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
+ ts_sleep.tv_nsec = 999999999;
+ alarm (1);
+ if (nanosleep (&ts_sleep, &ts_remaining) != -1)
+ return 4;
+ if (errno != EINTR)
+ return 5;
+ if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10)
+ return 6;
+ return 0;
+ }]])],
+ [gl_cv_func_nanosleep=yes],
+ [case $? in dnl (
+ 4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)';; dnl (
+ *) gl_cv_func_nanosleep=no;;
+ esac],
+ [case "$host_os" in dnl ((
+ linux*) # Guess it halfway works when the kernel is Linux.
+ gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
+ mingw*) # Guess no on native Windows.
+ gl_cv_func_nanosleep='guessing no' ;;
+ *) # If we don't know, assume the worst.
+ gl_cv_func_nanosleep='guessing no' ;;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_nanosleep" in
+ *yes)
+ REPLACE_NANOSLEEP=0
+ ;;
+ *)
+ REPLACE_NANOSLEEP=1
+ case "$gl_cv_func_nanosleep" in
+ *"mishandles large arguments"*)
+ AC_DEFINE([HAVE_BUG_BIG_NANOSLEEP], [1],
+ [Define to 1 if nanosleep mishandles large arguments.])
+ ;;
+ *)
+ # The replacement uses select(). Add $LIBSOCKET to $LIB_NANOSLEEP.
+ for ac_lib in $LIBSOCKET; do
+ case " $LIB_NANOSLEEP " in
+ *" $ac_lib "*) ;;
+ *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";;
+ esac
+ done
+ ;;
+ esac
+ ;;
+ esac
+ else
+ HAVE_NANOSLEEP=0
+ fi
+ LIBS=$nanosleep_save_libs
+])
+
+# Prerequisites of lib/nanosleep.c.
+AC_DEFUN([gl_PREREQ_NANOSLEEP],
+[
+ AC_CHECK_HEADERS_ONCE([sys/select.h])
+ gl_PREREQ_SIG_HANDLER_H
+])
diff --git a/m4/netinet_in_h.m4 b/m4/netinet_in_h.m4
new file mode 100644
index 0000000..473e142
--- /dev/null
+++ b/m4/netinet_in_h.m4
@@ -0,0 +1,31 @@
+# netinet_in_h.m4 serial 5
+dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_HEADER_NETINET_IN],
+[
+ AC_CACHE_CHECK([whether <netinet/in.h> is self-contained],
+ [gl_cv_header_netinet_in_h_selfcontained],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h>]], [[]])],
+ [gl_cv_header_netinet_in_h_selfcontained=yes],
+ [gl_cv_header_netinet_in_h_selfcontained=no])
+ ])
+ if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
+ NETINET_IN_H=''
+ else
+ NETINET_IN_H='netinet/in.h'
+ AC_CHECK_HEADERS([netinet/in.h])
+ gl_CHECK_NEXT_HEADERS([netinet/in.h])
+ if test $ac_cv_header_netinet_in_h = yes; then
+ HAVE_NETINET_IN_H=1
+ else
+ HAVE_NETINET_IN_H=0
+ fi
+ AC_SUBST([HAVE_NETINET_IN_H])
+ fi
+ AC_SUBST([NETINET_IN_H])
+ AM_CONDITIONAL([GL_GENERATE_NETINET_IN_H], [test -n "$NETINET_IN_H"])
+])
diff --git a/m4/nl_langinfo.m4 b/m4/nl_langinfo.m4
index 16de8de..82d4750 100644
--- a/m4/nl_langinfo.m4
+++ b/m4/nl_langinfo.m4
@@ -1,5 +1,5 @@
-# nl_langinfo.m4 serial 5
-dnl Copyright (C) 2009-2017 Free Software Foundation, Inc.
+# nl_langinfo.m4 serial 6
+dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -36,8 +36,11 @@ AC_DEFUN([gl_FUNC_NL_LANGINFO],
AC_DEFINE_UNQUOTED([FUNC_NL_LANGINFO_YESEXPR_WORKS],
[$FUNC_NL_LANGINFO_YESEXPR_WORKS],
[Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string.])
- if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \
- && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
+ if test $HAVE_LANGINFO_CODESET = 1 \
+ && test $HAVE_LANGINFO_T_FMT_AMPM = 1 \
+ && test $HAVE_LANGINFO_ALTMON = 1 \
+ && test $HAVE_LANGINFO_ERA = 1 \
+ && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
:
else
REPLACE_NL_LANGINFO=1
diff --git a/m4/nocrash.m4 b/m4/nocrash.m4
index 2c2c5fb..87b2d4c 100644
--- a/m4/nocrash.m4
+++ b/m4/nocrash.m4
@@ -1,5 +1,5 @@
# nocrash.m4 serial 4
-dnl Copyright (C) 2005, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/non-recursive-gnulib-prefix-hack.m4 b/m4/non-recursive-gnulib-prefix-hack.m4
index 9300e48..d2cb9e7 100644
--- a/m4/non-recursive-gnulib-prefix-hack.m4
+++ b/m4/non-recursive-gnulib-prefix-hack.m4
@@ -1,4 +1,4 @@
-dnl Copyright (C) 2012-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/obstack.m4 b/m4/obstack.m4
index 6123762..80e5b3c 100644
--- a/m4/obstack.m4
+++ b/m4/obstack.m4
@@ -1,6 +1,6 @@
# See if we need to provide obstacks.
-dnl Copyright 1996-2017 Free Software Foundation, Inc.
+dnl Copyright 1996-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/off_t.m4 b/m4/off_t.m4
index 92c45ef..f4d5787 100644
--- a/m4/off_t.m4
+++ b/m4/off_t.m4
@@ -1,5 +1,5 @@
# off_t.m4 serial 1
-dnl Copyright (C) 2012-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/open-cloexec.m4 b/m4/open-cloexec.m4
new file mode 100644
index 0000000..a272784
--- /dev/null
+++ b/m4/open-cloexec.m4
@@ -0,0 +1,21 @@
+# Test whether O_CLOEXEC is defined.
+
+dnl Copyright 2017-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_PREPROC_O_CLOEXEC],
+[
+ AC_CACHE_CHECK([for O_CLOEXEC],
+ [gl_cv_macro_O_CLOEXEC],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <fcntl.h>
+ #ifndef O_CLOEXEC
+ choke me;
+ #endif
+ ]],
+ [[return O_CLOEXEC;]])],
+ [gl_cv_macro_O_CLOEXEC=yes],
+ [gl_cv_macro_O_CLOEXEC=no])])
+])
diff --git a/m4/open.m4 b/m4/open.m4
index 2a869dc..8b3d402 100644
--- a/m4/open.m4
+++ b/m4/open.m4
@@ -1,5 +1,5 @@
-# open.m4 serial 14
-dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
+# open.m4 serial 15
+dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_OPEN],
[
AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_PREPROC_O_CLOEXEC])
case "$host_os" in
mingw* | pw*)
REPLACE_OPEN=1
@@ -15,6 +16,9 @@ AC_DEFUN([gl_FUNC_OPEN],
dnl open("foo/") should not create a file when the file name has a
dnl trailing slash. FreeBSD only has the problem on symlinks.
AC_CHECK_FUNCS_ONCE([lstat])
+ if test "$gl_cv_macro_O_CLOEXEC" != yes; then
+ REPLACE_OPEN=1
+ fi
AC_CACHE_CHECK([whether open recognizes a trailing slash],
[gl_cv_func_open_slash],
[# Assume that if we have lstat, we can also check symlinks.
diff --git a/m4/opendir.m4 b/m4/opendir.m4
index b970e65..5609536 100644
--- a/m4/opendir.m4
+++ b/m4/opendir.m4
@@ -1,5 +1,5 @@
-# opendir.m4 serial 4
-dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
+# opendir.m4 serial 5
+dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_OPENDIR],
[
AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_FUNCS([opendir])
if test $ac_cv_func_opendir = no; then
diff --git a/m4/pathmax.m4 b/m4/pathmax.m4
index c6c9f24..403a375 100644
--- a/m4/pathmax.m4
+++ b/m4/pathmax.m4
@@ -1,5 +1,5 @@
# pathmax.m4 serial 10
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2017 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2018 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/perror.m4 b/m4/perror.m4
new file mode 100644
index 0000000..60568a7
--- /dev/null
+++ b/m4/perror.m4
@@ -0,0 +1,69 @@
+# perror.m4 serial 7
+dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_PERROR],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_REQUIRE([gl_HEADER_ERRNO_H])
+ AC_REQUIRE([gl_FUNC_STRERROR_R])
+ AC_REQUIRE([gl_FUNC_STRERROR_0])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ dnl We intentionally do not check for the broader REPLACE_STRERROR_R,
+ dnl since on glibc systems, strerror_r is replaced only for signature
+ dnl issues, and perror is just fine. Rather, we only want to
+ dnl replace perror if strerror_r was replaced for a content fix.
+ if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
+ dnl The system's perror() cannot know about the new errno values we add
+ dnl to <errno.h>, or any fix for strerror(0). Replace it.
+ REPLACE_PERROR=1
+ fi
+ case ${gl_cv_func_strerror_r_works-unset} in
+ unset|*yes)
+ AC_CACHE_CHECK([whether perror matches strerror],
+ [gl_cv_func_perror_works],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <errno.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+ ]],
+ [[char *str = strerror (-1);
+ if (!getenv("CONFTEST_OUTPUT")) return 0;
+ if (!str) str = "";
+ puts (str);
+ errno = -1;
+ perror ("");
+ return 0;
+ ]])],
+ [if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
+ && cmp conftest.txt1 conftest.txt2 >/dev/null; then
+ gl_cv_func_perror_works=yes
+ else
+ gl_cv_func_perror_works=no
+ fi
+ rm -rf conftest.txt1 conftest.txt2],
+ [gl_cv_func_perror_works=no],
+ [case "$host_os" in
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_perror_works="guessing yes" ;;
+ # Otherwise guess no.
+ *) gl_cv_func_perror_works="guessing no" ;;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_perror_works" in
+ *yes) ;;
+ *) REPLACE_PERROR=1 ;;
+ esac
+ ;;
+ *)
+ dnl The system's perror() probably inherits the bugs in the
+ dnl system's strerror_r(). Replace it.
+ REPLACE_PERROR=1
+ ;;
+ esac
+])
diff --git a/m4/pipe.m4 b/m4/pipe.m4
new file mode 100644
index 0000000..1d3e274
--- /dev/null
+++ b/m4/pipe.m4
@@ -0,0 +1,15 @@
+# pipe.m4 serial 2
+dnl Copyright (C) 2010-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_PIPE],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+
+ AC_CHECK_FUNCS_ONCE([pipe])
+ if test $ac_cv_func_pipe != yes; then
+ HAVE_PIPE=0
+ fi
+])
diff --git a/m4/pthread_rwlock_rdlock.m4 b/m4/pthread_rwlock_rdlock.m4
index da69865..9c1d5d0 100644
--- a/m4/pthread_rwlock_rdlock.m4
+++ b/m4/pthread_rwlock_rdlock.m4
@@ -1,5 +1,5 @@
# pthread_rwlock_rdlock.m4 serial 1
-dnl Copyright (C) 2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2017-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/putenv.m4 b/m4/putenv.m4
index a8e3ab3..f2a76b2 100644
--- a/m4/putenv.m4
+++ b/m4/putenv.m4
@@ -1,5 +1,5 @@
-# putenv.m4 serial 20
-dnl Copyright (C) 2002-2017 Free Software Foundation, Inc.
+# putenv.m4 serial 22
+dnl Copyright (C) 2002-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -34,10 +34,12 @@ AC_DEFUN([gl_FUNC_PUTENV],
gl_cv_func_svid_putenv=no,
dnl When crosscompiling, assume putenv is broken.
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_svid_putenv="guessing no" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_svid_putenv="guessing no" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_svid_putenv="guessing no" ;;
esac
])
])
diff --git a/m4/quote.m4 b/m4/quote.m4
index 92be1e7..4d2198b 100644
--- a/m4/quote.m4
+++ b/m4/quote.m4
@@ -1,5 +1,5 @@
# quote.m4 serial 6
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2017 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2018 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/quotearg.m4 b/m4/quotearg.m4
index 5fae4f3..c639e6f 100644
--- a/m4/quotearg.m4
+++ b/m4/quotearg.m4
@@ -1,5 +1,5 @@
# quotearg.m4 serial 9
-dnl Copyright (C) 2002, 2004-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/raise.m4 b/m4/raise.m4
new file mode 100644
index 0000000..761e4b9
--- /dev/null
+++ b/m4/raise.m4
@@ -0,0 +1,36 @@
+# raise.m4 serial 4
+dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_RAISE],
+[
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CHECK_FUNCS([raise])
+ if test $ac_cv_func_raise = no; then
+ HAVE_RAISE=0
+ else
+ m4_ifdef([gl_MSVC_INVAL], [
+ AC_REQUIRE([gl_MSVC_INVAL])
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ REPLACE_RAISE=1
+ fi
+ ])
+ m4_ifdef([gl_SIGNALBLOCKING], [
+ gl_SIGNALBLOCKING
+ if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
+ m4_ifdef([gl_SIGNAL_SIGPIPE], [
+ gl_SIGNAL_SIGPIPE
+ if test $gl_cv_header_signal_h_SIGPIPE != yes; then
+ REPLACE_RAISE=1
+ fi
+ ], [:])
+ fi
+ ])
+ fi
+])
+
+# Prerequisites of lib/raise.c.
+AC_DEFUN([gl_PREREQ_RAISE], [:])
diff --git a/m4/read-file.m4 b/m4/read-file.m4
index 5540000..ee653dc 100644
--- a/m4/read-file.m4
+++ b/m4/read-file.m4
@@ -1,5 +1,5 @@
# read-file.m4 serial 3
-dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/readdir.m4 b/m4/readdir.m4
index cb7f2ea..f45a45f 100644
--- a/m4/readdir.m4
+++ b/m4/readdir.m4
@@ -1,5 +1,5 @@
# readdir.m4 serial 1
-dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/readlink.m4 b/m4/readlink.m4
index d3ba0ad..9d73f5c 100644
--- a/m4/readlink.m4
+++ b/m4/readlink.m4
@@ -1,5 +1,5 @@
-# readlink.m4 serial 12
-dnl Copyright (C) 2003, 2007, 2009-2017 Free Software Foundation, Inc.
+# readlink.m4 serial 13
+dnl Copyright (C) 2003, 2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -34,10 +34,10 @@ AC_DEFUN([gl_FUNC_READLINK],
return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;]])],
[gl_cv_func_readlink_works=yes], [gl_cv_func_readlink_works=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_readlink_works="guessing no" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_readlink_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_readlink_works="guessing no" ;;
esac
])
rm -f conftest.link conftest.lnk2])
diff --git a/m4/realloc.m4 b/m4/realloc.m4
index 3d05b44..23c0d5d 100644
--- a/m4/realloc.m4
+++ b/m4/realloc.m4
@@ -1,5 +1,5 @@
-# realloc.m4 serial 14
-dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
+# realloc.m4 serial 15
+dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
m4_version_prereq([2.70], [] ,[
# This is adapted with modifications from upstream Autoconf here:
-# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
+# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
AC_DEFUN([_AC_FUNC_REALLOC_IF],
[
AC_REQUIRE([AC_HEADER_STDC])dnl
@@ -32,7 +32,7 @@ AC_DEFUN([_AC_FUNC_REALLOC_IF],
[ac_cv_func_realloc_0_nonnull=no],
[case "$host_os" in
# Guess yes on platforms where we know the result.
- *-gnu* | freebsd* | netbsd* | openbsd* \
+ *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
| hpux* | solaris* | cygwin* | mingw*)
ac_cv_func_realloc_0_nonnull=yes ;;
# If we don't know, assume the worst.
diff --git a/m4/regex.m4 b/m4/regex.m4
index 61ff098..055d71b 100644
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -1,6 +1,6 @@
-# serial 66
+# serial 67
-# Copyright (C) 1996-2001, 2003-2017 Free Software Foundation, Inc.
+# Copyright (C) 1996-2001, 2003-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -13,6 +13,7 @@ AC_PREREQ([2.50])
AC_DEFUN([gl_REGEX],
[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_ARG_WITH([included-regex],
[AS_HELP_STRING([--without-included-regex],
[don't compile regex; this is the default on systems
@@ -75,7 +76,7 @@ AC_DEFUN([gl_REGEX],
if (setlocale (LC_ALL, "en_US.UTF-8"))
{
{
- /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
+ /* https://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
This test needs valgrind to catch the bug on Debian
GNU/Linux 3.1 x86, but it might catch the bug better
on other platforms and it shouldn't hurt to try the
@@ -99,7 +100,7 @@ AC_DEFUN([gl_REGEX],
{
/* This test is from glibc bug 15078.
The test case is from Andreas Schwab in
- <http://www.sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
+ <https://sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
*/
static char const pat[] = "[^x]x";
static char const data[] =
@@ -197,7 +198,7 @@ AC_DEFUN([gl_REGEX],
result |= 16;
/* Catch a bug reported by Vin Shelton in
- http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
+ https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html
*/
re_set_syntax (RE_SYNTAX_POSIX_BASIC
& ~RE_CONTEXT_INVALID_DUP
@@ -226,13 +227,19 @@ AC_DEFUN([gl_REGEX],
return result;
]])],
- [gl_cv_func_re_compile_pattern_working=yes],
- [gl_cv_func_re_compile_pattern_working=no],
- dnl When crosscompiling, assume it is not working.
- [gl_cv_func_re_compile_pattern_working=no])])
- case $gl_cv_func_re_compile_pattern_working in #(
- yes) ac_use_included_regex=no;; #(
- no) ac_use_included_regex=yes;;
+ [gl_cv_func_re_compile_pattern_working=yes],
+ [gl_cv_func_re_compile_pattern_working=no],
+ [case "$host_os" in
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
+ # Otherwise, assume it is not working.
+ *) gl_cv_func_re_compile_pattern_working="guessing no" ;;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_re_compile_pattern_working" in #(
+ *yes) ac_use_included_regex=no;; #(
+ *no) ac_use_included_regex=yes;;
esac
;;
*) AC_MSG_ERROR([Invalid value for --with-included-regex: $with_included_regex])
diff --git a/m4/rename.m4 b/m4/rename.m4
index 7c3ffe7..f7fa3bb 100644
--- a/m4/rename.m4
+++ b/m4/rename.m4
@@ -1,6 +1,6 @@
-# serial 26
+# serial 29
-# Copyright (C) 2001, 2003, 2005-2006, 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005-2006, 2009-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -19,7 +19,7 @@ AC_DEFUN([gl_FUNC_RENAME],
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
AC_CHECK_FUNCS_ONCE([lstat])
- dnl Solaris 10, AIX 7.1 mistakenly allow rename("file","name/").
+ dnl Solaris 11, AIX 7.1 mistakenly allow rename("file","name/").
dnl NetBSD 1.6 mistakenly forbids rename("dir","name/").
dnl FreeBSD 7.2 mistakenly allows rename("file","link-to-file/").
dnl The Solaris bug can be worked around without stripping
@@ -57,6 +57,8 @@ AC_DEFUN([gl_FUNC_RENAME],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_func_rename_slash_dst_works="guessing no" ;;
esac
@@ -69,7 +71,7 @@ AC_DEFUN([gl_FUNC_RENAME],
REPLACE_RENAME=1
AC_DEFINE([RENAME_TRAILING_SLASH_DEST_BUG], [1],
[Define if rename does not correctly handle slashes on the destination
- argument, such as on Solaris 10 or NetBSD 1.6.])
+ argument, such as on Solaris 11 or NetBSD 1.6.])
;;
esac
@@ -109,6 +111,8 @@ AC_DEFUN([gl_FUNC_RENAME],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_rename_slash_src_works="guessing no" ;;
esac
@@ -132,11 +136,12 @@ AC_DEFUN([gl_FUNC_RENAME],
AC_CACHE_CHECK([whether rename manages hard links correctly],
[gl_cv_func_rename_link_works],
[if test $ac_cv_func_link = yes; then
- rm -rf conftest.f conftest.f1
- if touch conftest.f && ln conftest.f conftest.f1 &&
+ rm -rf conftest.f conftest.f1 conftest.f2
+ if touch conftest.f conftest.f2 && ln conftest.f conftest.f1 &&
set x `ls -i conftest.f conftest.f1` && test "$2" = "$4"; then
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([[
+# include <errno.h>
# include <stdio.h>
# include <stdlib.h>
# include <unistd.h>
@@ -146,10 +151,18 @@ AC_DEFUN([gl_FUNC_RENAME],
result |= 1;
if (unlink ("conftest.f1"))
result |= 2;
- if (rename ("conftest.f", "conftest.f"))
+
+ /* Allow either the POSIX-required behavior, where the
+ previous rename kept conftest.f, or the (better) NetBSD
+ behavior, where it removed conftest.f. */
+ if (rename ("conftest.f", "conftest.f") != 0
+ && errno != ENOENT)
result |= 4;
+
if (rename ("conftest.f1", "conftest.f1") == 0)
result |= 8;
+ if (rename ("conftest.f2", "conftest.f2") != 0)
+ result |= 16;
return result;
]])],
[gl_cv_func_rename_link_works=yes],
@@ -158,6 +171,8 @@ AC_DEFUN([gl_FUNC_RENAME],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_rename_link_works="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_rename_link_works="guessing no" ;;
esac
@@ -165,7 +180,7 @@ AC_DEFUN([gl_FUNC_RENAME],
else
gl_cv_func_rename_link_works="guessing no"
fi
- rm -rf conftest.f conftest.f1
+ rm -rf conftest.f conftest.f1 conftest.f2
else
gl_cv_func_rename_link_works=yes
fi
@@ -207,6 +222,8 @@ AC_DEFUN([gl_FUNC_RENAME],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_rename_dest_works="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_func_rename_dest_works="guessing no" ;;
esac
diff --git a/m4/rmdir.m4 b/m4/rmdir.m4
index f585c27..36c4514 100644
--- a/m4/rmdir.m4
+++ b/m4/rmdir.m4
@@ -1,5 +1,5 @@
-# rmdir.m4 serial 13
-dnl Copyright (C) 2002, 2005, 2009-2017 Free Software Foundation, Inc.
+# rmdir.m4 serial 15
+dnl Copyright (C) 2002, 2005, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -33,10 +33,12 @@ AC_DEFUN([gl_FUNC_RMDIR],
]])],
[gl_cv_func_rmdir_works=yes], [gl_cv_func_rmdir_works=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_rmdir_works="guessing no" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_rmdir_works="guessing no" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rmdir_works="guessing no" ;;
esac
])
rm -rf conftest.dir conftest.file])
diff --git a/m4/secure_getenv.m4 b/m4/secure_getenv.m4
deleted file mode 100644
index 6bd4afd..0000000
--- a/m4/secure_getenv.m4
+++ /dev/null
@@ -1,26 +0,0 @@
-# Look up an environment variable more securely.
-dnl Copyright 2013-2017 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_FUNC_SECURE_GETENV],
-[
- dnl Persuade glibc <stdlib.h> to declare secure_getenv().
- AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
-
- AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
- AC_CHECK_FUNCS_ONCE([secure_getenv])
- if test $ac_cv_func_secure_getenv = no; then
- HAVE_SECURE_GETENV=0
- fi
-])
-
-# Prerequisites of lib/secure_getenv.c.
-AC_DEFUN([gl_PREREQ_SECURE_GETENV], [
- AC_CHECK_FUNCS([__secure_getenv])
- if test $ac_cv_func___secure_getenv = no; then
- AC_CHECK_FUNCS([issetugid])
- fi
- AC_CHECK_FUNCS_ONCE([getuid geteuid getgid getegid])
-])
diff --git a/m4/select.m4 b/m4/select.m4
new file mode 100644
index 0000000..db58037
--- /dev/null
+++ b/m4/select.m4
@@ -0,0 +1,114 @@
+# select.m4 serial 9
+dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_SELECT],
+[
+ AC_REQUIRE([gl_HEADER_SYS_SELECT])
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_REQUIRE([gl_SOCKETS])
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ REPLACE_SELECT=1
+ else
+ dnl On Interix 3.5, select(0, NULL, NULL, NULL, timeout) fails with error
+ dnl EFAULT.
+ AC_CHECK_HEADERS_ONCE([sys/select.h])
+ AC_CACHE_CHECK([whether select supports a 0 argument],
+ [gl_cv_func_select_supports0],
+ [
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <sys/types.h>
+#include <sys/time.h>
+#if HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+int main ()
+{
+ struct timeval timeout;
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 5;
+ return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
+}]])], [gl_cv_func_select_supports0=yes], [gl_cv_func_select_supports0=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on Interix.
+ interix*) gl_cv_func_select_supports0="guessing no";;
+ # Guess yes otherwise.
+ *) gl_cv_func_select_supports0="guessing yes";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+ case "$gl_cv_func_select_supports0" in
+ *yes) ;;
+ *) REPLACE_SELECT=1 ;;
+ esac
+
+ dnl On FreeBSD 8.2, select() doesn't always reject bad fds.
+ AC_CACHE_CHECK([whether select detects invalid fds],
+ [gl_cv_func_select_detects_ebadf],
+ [
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/types.h>
+#include <sys/time.h>
+#if HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
+#include <unistd.h>
+#include <errno.h>
+]],[[
+ fd_set set;
+ dup2(0, 16);
+ FD_ZERO(&set);
+ FD_SET(16, &set);
+ close(16);
+ struct timeval timeout;
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 5;
+ return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
+]])], [gl_cv_func_select_detects_ebadf=yes],
+ [gl_cv_func_select_detects_ebadf=no],
+ [
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_select_detects_ebadf="guessing no" ;;
+ esac
+ ])
+ ])
+ case $gl_cv_func_select_detects_ebadf in
+ *yes) ;;
+ *) REPLACE_SELECT=1 ;;
+ esac
+ fi
+
+ dnl Determine the needed libraries.
+ LIB_SELECT="$LIBSOCKET"
+ if test $REPLACE_SELECT = 1; then
+ case "$host_os" in
+ mingw*)
+ dnl On the MSVC platform, the function MsgWaitForMultipleObjects
+ dnl (used in lib/select.c) requires linking with -luser32. On mingw,
+ dnl it is implicit.
+ AC_LINK_IFELSE(
+ [AC_LANG_SOURCE([[
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+int
+main ()
+{
+ MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
+ return 0;
+}]])],
+ [],
+ [LIB_SELECT="$LIB_SELECT -luser32"])
+ ;;
+ esac
+ fi
+ AC_SUBST([LIB_SELECT])
+])
diff --git a/m4/selinux-context-h.m4 b/m4/selinux-context-h.m4
index 761113d..4218dba 100644
--- a/m4/selinux-context-h.m4
+++ b/m4/selinux-context-h.m4
@@ -1,5 +1,5 @@
# serial 3 -*- Autoconf -*-
-# Copyright (C) 2006-2007, 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2006-2007, 2009-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/m4/selinux-selinux-h.m4 b/m4/selinux-selinux-h.m4
index f25cd43..2065b04 100644
--- a/m4/selinux-selinux-h.m4
+++ b/m4/selinux-selinux-h.m4
@@ -1,5 +1,5 @@
# serial 5 -*- Autoconf -*-
-# Copyright (C) 2006-2007, 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2006-2007, 2009-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/m4/setenv.m4 b/m4/setenv.m4
index 005aa8c..5d257f7 100644
--- a/m4/setenv.m4
+++ b/m4/setenv.m4
@@ -1,5 +1,5 @@
-# setenv.m4 serial 26
-dnl Copyright (C) 2001-2004, 2006-2017 Free Software Foundation, Inc.
+# setenv.m4 serial 27
+dnl Copyright (C) 2001-2004, 2006-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -35,10 +35,10 @@ AC_DEFUN([gl_FUNC_SETENV],
]])],
[gl_cv_func_setenv_works=yes], [gl_cv_func_setenv_works=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_setenv_works="guessing no" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_setenv_works="guessing no" ;;
esac
])])
case "$gl_cv_func_setenv_works" in
diff --git a/m4/setlocale.m4 b/m4/setlocale.m4
index 879317d..802ee01 100644
--- a/m4/setlocale.m4
+++ b/m4/setlocale.m4
@@ -1,5 +1,5 @@
# setlocale.m4 serial 4
-dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/sigaction.m4 b/m4/sigaction.m4
new file mode 100644
index 0000000..f6918fa
--- /dev/null
+++ b/m4/sigaction.m4
@@ -0,0 +1,40 @@
+# sigaction.m4 serial 7
+dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Determine if sigaction interface is present.
+AC_DEFUN([gl_SIGACTION],
+[
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([sigaction])
+ if test $ac_cv_func_sigaction = yes; then
+ AC_CHECK_MEMBERS([struct sigaction.sa_sigaction], , ,
+ [[#include <signal.h>]])
+ if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
+ HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
+ fi
+ else
+ HAVE_SIGACTION=0
+ fi
+])
+
+# Prerequisites of the part of lib/signal.in.h and of lib/sigaction.c.
+AC_DEFUN([gl_PREREQ_SIGACTION],
+[
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([AC_TYPE_UID_T])
+ AC_REQUIRE([gl_PREREQ_SIG_HANDLER_H])
+ AC_CHECK_FUNCS_ONCE([sigaltstack siginterrupt])
+ AC_CHECK_TYPES([siginfo_t], [], [], [[
+#include <signal.h>
+ ]])
+ if test $ac_cv_type_siginfo_t = no; then
+ HAVE_SIGINFO_T=0
+ fi
+])
+
+# Prerequisites of lib/sig-handler.h.
+AC_DEFUN([gl_PREREQ_SIG_HANDLER_H], [:])
diff --git a/m4/signal_h.m4 b/m4/signal_h.m4
new file mode 100644
index 0000000..394b91d
--- /dev/null
+++ b/m4/signal_h.m4
@@ -0,0 +1,83 @@
+# signal_h.m4 serial 18
+dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_SIGNAL_H],
+[
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T])
+ gl_NEXT_HEADERS([signal.h])
+
+# AIX declares sig_atomic_t to already include volatile, and C89 compilers
+# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
+ AC_CHECK_TYPE([volatile sig_atomic_t], [],
+ [HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0], [[
+#include <signal.h>
+ ]])
+
+ dnl Ensure the type pid_t gets defined.
+ AC_REQUIRE([AC_TYPE_PID_T])
+
+ AC_REQUIRE([AC_TYPE_UID_T])
+
+ dnl Persuade glibc <signal.h> to define sighandler_t.
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+ AC_CHECK_TYPE([sighandler_t], [], [HAVE_SIGHANDLER_T=0], [[
+#include <signal.h>
+ ]])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[#include <signal.h>
+ ]], [pthread_sigmask sigaction
+ sigaddset sigdelset sigemptyset sigfillset sigismember
+ sigpending sigprocmask])
+])
+
+AC_DEFUN([gl_CHECK_TYPE_SIGSET_T],
+[
+ AC_CHECK_TYPES([sigset_t],
+ [gl_cv_type_sigset_t=yes], [gl_cv_type_sigset_t=no],
+ [[
+ #include <signal.h>
+ /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
+ #include <sys/types.h>
+ ]])
+ if test $gl_cv_type_sigset_t != yes; then
+ HAVE_SIGSET_T=0
+ fi
+])
+
+AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+ dnl Define it also as a C macro, for the benefit of the unit tests.
+ gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_SIGNAL_H_DEFAULTS],
+[
+ GNULIB_PTHREAD_SIGMASK=0; AC_SUBST([GNULIB_PTHREAD_SIGMASK])
+ GNULIB_RAISE=0; AC_SUBST([GNULIB_RAISE])
+ GNULIB_SIGNAL_H_SIGPIPE=0; AC_SUBST([GNULIB_SIGNAL_H_SIGPIPE])
+ GNULIB_SIGPROCMASK=0; AC_SUBST([GNULIB_SIGPROCMASK])
+ GNULIB_SIGACTION=0; AC_SUBST([GNULIB_SIGACTION])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_POSIX_SIGNALBLOCKING=1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING])
+ HAVE_PTHREAD_SIGMASK=1; AC_SUBST([HAVE_PTHREAD_SIGMASK])
+ HAVE_RAISE=1; AC_SUBST([HAVE_RAISE])
+ HAVE_SIGSET_T=1; AC_SUBST([HAVE_SIGSET_T])
+ HAVE_SIGINFO_T=1; AC_SUBST([HAVE_SIGINFO_T])
+ HAVE_SIGACTION=1; AC_SUBST([HAVE_SIGACTION])
+ HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
+ AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION])
+ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
+ AC_SUBST([HAVE_TYPE_VOLATILE_SIG_ATOMIC_T])
+ HAVE_SIGHANDLER_T=1; AC_SUBST([HAVE_SIGHANDLER_T])
+ REPLACE_PTHREAD_SIGMASK=0; AC_SUBST([REPLACE_PTHREAD_SIGMASK])
+ REPLACE_RAISE=0; AC_SUBST([REPLACE_RAISE])
+])
diff --git a/m4/signalblocking.m4 b/m4/signalblocking.m4
new file mode 100644
index 0000000..4350b21
--- /dev/null
+++ b/m4/signalblocking.m4
@@ -0,0 +1,25 @@
+# signalblocking.m4 serial 14
+dnl Copyright (C) 2001-2002, 2006-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Determine available signal blocking primitives. Three different APIs exist:
+# 1) POSIX: sigemptyset, sigaddset, sigprocmask
+# 2) SYSV: sighold, sigrelse
+# 3) BSD: sigblock, sigsetmask
+# For simplicity, here we check only for the POSIX signal blocking.
+AC_DEFUN([gl_SIGNALBLOCKING],
+[
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T])
+ if test $gl_cv_type_sigset_t = yes; then
+ AC_CHECK_FUNC([sigprocmask], [gl_cv_func_sigprocmask=1])
+ fi
+ if test -z "$gl_cv_func_sigprocmask"; then
+ HAVE_POSIX_SIGNALBLOCKING=0
+ fi
+])
+
+# Prerequisites of lib/sigprocmask.c.
+AC_DEFUN([gl_PREREQ_SIGPROCMASK], [:])
diff --git a/m4/sleep.m4 b/m4/sleep.m4
new file mode 100644
index 0000000..7ddaffa
--- /dev/null
+++ b/m4/sleep.m4
@@ -0,0 +1,64 @@
+# sleep.m4 serial 9
+dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_SLEEP],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ dnl We expect to see the declaration of sleep() in a header file.
+ dnl Older versions of mingw have a sleep() function that is an alias to
+ dnl _sleep() in MSVCRT. It has a different signature than POSIX sleep():
+ dnl it takes the number of milliseconds as argument and returns void.
+ dnl mingw does not declare this function.
+ AC_CHECK_DECLS([sleep], , , [[#include <unistd.h>]])
+ AC_CHECK_FUNCS_ONCE([sleep])
+ if test $ac_cv_have_decl_sleep != yes; then
+ HAVE_SLEEP=0
+ else
+ dnl Cygwin 1.5.x has a bug where sleep can't exceed 49.7 days.
+ AC_CACHE_CHECK([for working sleep], [gl_cv_func_sleep_works],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <errno.h>
+#include <unistd.h>
+#include <signal.h>
+static void
+handle_alarm (int sig)
+{
+ if (sig != SIGALRM)
+ _exit (2);
+}
+]], [[
+ /* Failure to compile this test due to missing alarm is okay,
+ since all such platforms (mingw) also lack sleep. */
+ unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */
+ unsigned int remaining;
+ signal (SIGALRM, handle_alarm);
+ alarm (1);
+ remaining = sleep (pentecost);
+ if (remaining > pentecost)
+ return 3;
+ if (remaining <= pentecost - 10)
+ return 4;
+ return 0;
+ ]])],
+ [gl_cv_func_sleep_works=yes], [gl_cv_func_sleep_works=no],
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_sleep_works="guessing no" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_sleep_works="guessing no" ;;
+ esac
+ ])])
+ case "$gl_cv_func_sleep_works" in
+ *yes) ;;
+ *)
+ REPLACE_SLEEP=1
+ ;;
+ esac
+ fi
+])
diff --git a/m4/socketlib.m4 b/m4/socketlib.m4
new file mode 100644
index 0000000..a725d3c
--- /dev/null
+++ b/m4/socketlib.m4
@@ -0,0 +1,90 @@
+# socketlib.m4 serial 2
+dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl gl_SOCKETLIB
+dnl Determines the library to use for socket functions.
+dnl Sets and AC_SUBSTs LIBSOCKET.
+
+AC_DEFUN([gl_SOCKETLIB],
+[
+ gl_PREREQ_SYS_H_WINSOCK2 dnl for HAVE_WINSOCK2_H
+ LIBSOCKET=
+ if test $HAVE_WINSOCK2_H = 1; then
+ dnl Native Windows API (not Cygwin).
+ AC_CACHE_CHECK([if we need to call WSAStartup in winsock2.h and -lws2_32],
+ [gl_cv_func_wsastartup], [
+ gl_save_LIBS="$LIBS"
+ LIBS="$LIBS -lws2_32"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#ifdef HAVE_WINSOCK2_H
+# include <winsock2.h>
+#endif]], [[
+ WORD wVersionRequested = MAKEWORD(1, 1);
+ WSADATA wsaData;
+ int err = WSAStartup(wVersionRequested, &wsaData);
+ WSACleanup ();]])],
+ gl_cv_func_wsastartup=yes, gl_cv_func_wsastartup=no)
+ LIBS="$gl_save_LIBS"
+ ])
+ if test "$gl_cv_func_wsastartup" = "yes"; then
+ AC_DEFINE([WINDOWS_SOCKETS], [1], [Define if WSAStartup is needed.])
+ LIBSOCKET='-lws2_32'
+ fi
+ else
+ dnl Unix API.
+ dnl Solaris has most socket functions in libsocket.
+ dnl Haiku has most socket functions in libnetwork.
+ dnl BeOS has most socket functions in libnet.
+ dnl On HP-UX, do NOT link with libxnet, because in 64-bit mode this would
+ dnl break code (e.g. in libraries) that invokes accept(), getpeername(),
+ dnl getsockname(), getsockopt(), or recvfrom() with a 32-bit addrlen. See
+ dnl "man xopen_networking" for details.
+ AC_CACHE_CHECK([for library containing setsockopt], [gl_cv_lib_socket], [
+ gl_cv_lib_socket=
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern
+#ifdef __cplusplus
+"C"
+#endif
+char setsockopt();]], [[setsockopt();]])],
+ [],
+ [gl_save_LIBS="$LIBS"
+ LIBS="$gl_save_LIBS -lsocket"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern
+#ifdef __cplusplus
+"C"
+#endif
+char setsockopt();]], [[setsockopt();]])],
+ [gl_cv_lib_socket="-lsocket"])
+ if test -z "$gl_cv_lib_socket"; then
+ LIBS="$gl_save_LIBS -lnetwork"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern
+#ifdef __cplusplus
+"C"
+#endif
+char setsockopt();]], [[setsockopt();]])],
+ [gl_cv_lib_socket="-lnetwork"])
+ if test -z "$gl_cv_lib_socket"; then
+ LIBS="$gl_save_LIBS -lnet"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern
+#ifdef __cplusplus
+"C"
+#endif
+char setsockopt();]], [[setsockopt();]])],
+ [gl_cv_lib_socket="-lnet"])
+ fi
+ fi
+ LIBS="$gl_save_LIBS"
+ ])
+ if test -z "$gl_cv_lib_socket"; then
+ gl_cv_lib_socket="none needed"
+ fi
+ ])
+ if test "$gl_cv_lib_socket" != "none needed"; then
+ LIBSOCKET="$gl_cv_lib_socket"
+ fi
+ fi
+ AC_SUBST([LIBSOCKET])
+])
diff --git a/m4/sockets.m4 b/m4/sockets.m4
new file mode 100644
index 0000000..d941dad
--- /dev/null
+++ b/m4/sockets.m4
@@ -0,0 +1,17 @@
+# sockets.m4 serial 7
+dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_SOCKETS],
+[
+ AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([gl_SOCKETLIB])
+ gl_PREREQ_SOCKETS
+])
+
+# Prerequisites of lib/sockets.c.
+AC_DEFUN([gl_PREREQ_SOCKETS], [
+ :
+])
diff --git a/m4/socklen.m4 b/m4/socklen.m4
new file mode 100644
index 0000000..f2d996d
--- /dev/null
+++ b/m4/socklen.m4
@@ -0,0 +1,77 @@
+# socklen.m4 serial 10
+dnl Copyright (C) 2005-2007, 2009-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Albert Chin, Windows fixes from Simon Josefsson.
+
+dnl Check for socklen_t: historically on BSD it is an int, and in
+dnl POSIX 1g it is a type of its own, but some platforms use different
+dnl types for the argument to getsockopt, getpeername, etc.:
+dnl HP-UX 10.20, IRIX 6.5, OSF/1 4.0, Interix 3.5, BeOS.
+dnl So we have to test to find something that will work.
+
+AC_DEFUN([gl_TYPE_SOCKLEN_T],
+ [AC_REQUIRE([gl_CHECK_SOCKET_HEADERS])dnl
+ AC_CHECK_TYPE([socklen_t], ,
+ [AC_MSG_CHECKING([for socklen_t equivalent])
+ AC_CACHE_VAL([gl_cv_socklen_t_equiv],
+ [# Systems have either "struct sockaddr *" or
+ # "void *" as the second argument to getpeername
+ gl_cv_socklen_t_equiv=
+ for arg2 in "struct sockaddr" void; do
+ for t in int size_t "unsigned int" "long int" "unsigned long int"; do
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[#include <sys/types.h>
+ #include <sys/socket.h>
+
+ int getpeername (int, $arg2 *, $t *);]],
+ [[$t len;
+ getpeername (0, 0, &len);]])],
+ [gl_cv_socklen_t_equiv="$t"])
+ test "$gl_cv_socklen_t_equiv" != "" && break
+ done
+ test "$gl_cv_socklen_t_equiv" != "" && break
+ done
+ ])
+ if test "$gl_cv_socklen_t_equiv" = ""; then
+ AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
+ fi
+ AC_MSG_RESULT([$gl_cv_socklen_t_equiv])
+ AC_DEFINE_UNQUOTED([socklen_t], [$gl_cv_socklen_t_equiv],
+ [type to use in place of socklen_t if not defined])],
+ [gl_SOCKET_HEADERS])])
+
+dnl On mingw32, socklen_t is in ws2tcpip.h ('int'), so we try to find
+dnl it there too. But on Cygwin, wc2tcpip.h must not be included. Users
+dnl of this module should use the same include pattern as gl_SOCKET_HEADERS.
+dnl When you change this macro, keep also in sync:
+dnl - gl_CHECK_SOCKET_HEADERS,
+dnl - the Include section of modules/socklen.
+AC_DEFUN([gl_SOCKET_HEADERS],
+[
+/* <sys/types.h> is not needed according to POSIX, but the
+ <sys/socket.h> in i386-unknown-freebsd4.10 and
+ powerpc-apple-darwin5.5 required it. */
+#include <sys/types.h>
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#elif HAVE_WS2TCPIP_H
+# include <ws2tcpip.h>
+#endif
+])
+
+dnl Tests for the existence of the header for socket facilities.
+dnl Defines the C macros HAVE_SYS_SOCKET_H, HAVE_WS2TCPIP_H.
+dnl This macro must match gl_SOCKET_HEADERS.
+AC_DEFUN([gl_CHECK_SOCKET_HEADERS],
+ [AC_CHECK_HEADERS_ONCE([sys/socket.h])
+ if test $ac_cv_header_sys_socket_h = no; then
+ dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make
+ dnl the check for those headers unconditional; yet cygwin reports
+ dnl that the headers are present but cannot be compiled (since on
+ dnl cygwin, all socket information should come from sys/socket.h).
+ AC_CHECK_HEADERS([ws2tcpip.h])
+ fi
+ ])
diff --git a/m4/sockpfaf.m4 b/m4/sockpfaf.m4
new file mode 100644
index 0000000..e3fe2c4
--- /dev/null
+++ b/m4/sockpfaf.m4
@@ -0,0 +1,87 @@
+# sockpfaf.m4 serial 8
+dnl Copyright (C) 2004, 2006, 2009-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Test for some common socket protocol families (PF_INET, PF_INET6, ...)
+dnl and some common address families (AF_INET, AF_INET6, ...).
+dnl This test assumes that a system supports an address family if and only if
+dnl it supports the corresponding protocol family.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gl_SOCKET_FAMILIES],
+[
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+ AC_CHECK_HEADERS_ONCE([netinet/in.h])
+
+ AC_MSG_CHECKING([for IPv4 sockets])
+ AC_CACHE_VAL([gl_cv_socket_ipv4],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif]],
+[[int x = AF_INET; struct in_addr y; struct sockaddr_in z;
+ if (&x && &y && &z) return 0;]])],
+ gl_cv_socket_ipv4=yes, gl_cv_socket_ipv4=no)])
+ AC_MSG_RESULT([$gl_cv_socket_ipv4])
+ if test $gl_cv_socket_ipv4 = yes; then
+ AC_DEFINE([HAVE_IPV4], [1], [Define to 1 if <sys/socket.h> defines AF_INET.])
+ fi
+
+ AC_MSG_CHECKING([for IPv6 sockets])
+ AC_CACHE_VAL([gl_cv_socket_ipv6],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif]],
+[[int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
+ if (&x && &y && &z) return 0;]])],
+ gl_cv_socket_ipv6=yes, gl_cv_socket_ipv6=no)])
+ AC_MSG_RESULT([$gl_cv_socket_ipv6])
+ if test $gl_cv_socket_ipv6 = yes; then
+ AC_DEFINE([HAVE_IPV6], [1], [Define to 1 if <sys/socket.h> defines AF_INET6.])
+ fi
+])
+
+AC_DEFUN([gl_SOCKET_FAMILY_UNIX],
+[
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+ AC_CHECK_HEADERS_ONCE([sys/un.h])
+
+ AC_MSG_CHECKING([for UNIX domain sockets])
+ AC_CACHE_VAL([gl_cv_socket_unix],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_SYS_UN_H
+#include <sys/un.h>
+#endif
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif]],
+[[int x = AF_UNIX; struct sockaddr_un y;
+ if (&x && &y) return 0;]])],
+ gl_cv_socket_unix=yes, gl_cv_socket_unix=no)])
+ AC_MSG_RESULT([$gl_cv_socket_unix])
+ if test $gl_cv_socket_unix = yes; then
+ AC_DEFINE([HAVE_UNIXSOCKET], [1], [Define to 1 if <sys/socket.h> defines AF_UNIX.])
+ fi
+])
diff --git a/m4/ssize_t.m4 b/m4/ssize_t.m4
index 66ba9d4..0977f20 100644
--- a/m4/ssize_t.m4
+++ b/m4/ssize_t.m4
@@ -1,5 +1,5 @@
# ssize_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2001-2003, 2006, 2010-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2003, 2006, 2010-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/stat-time.m4 b/m4/stat-time.m4
new file mode 100644
index 0000000..d0d17ed
--- /dev/null
+++ b/m4/stat-time.m4
@@ -0,0 +1,83 @@
+# Checks for stat-related time functions.
+
+# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2018 Free Software
+# Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# st_atim.tv_nsec - Linux, Solaris, Cygwin
+# st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE
+# st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE
+# st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1)
+
+# st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway)
+# st_birthtim - Cygwin 1.7.0+
+
+AC_DEFUN([gl_STAT_TIME],
+[
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_CHECK_HEADERS_ONCE([sys/time.h])
+
+ AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec],
+ [AC_CACHE_CHECK([whether struct stat.st_atim is of type struct timespec],
+ [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #if HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ #endif
+ #include <time.h>
+ struct timespec ts;
+ struct stat st;
+ ]],
+ [[
+ st.st_atim = ts;
+ ]])],
+ [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes],
+ [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no])])
+ if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
+ AC_DEFINE([TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC], [1],
+ [Define to 1 if the type of the st_atim member of a struct stat is
+ struct timespec.])
+ fi],
+ [AC_CHECK_MEMBERS([struct stat.st_atimespec.tv_nsec], [],
+ [AC_CHECK_MEMBERS([struct stat.st_atimensec], [],
+ [AC_CHECK_MEMBERS([struct stat.st_atim.st__tim.tv_nsec], [], [],
+ [#include <sys/types.h>
+ #include <sys/stat.h>])],
+ [#include <sys/types.h>
+ #include <sys/stat.h>])],
+ [#include <sys/types.h>
+ #include <sys/stat.h>])],
+ [#include <sys/types.h>
+ #include <sys/stat.h>])
+])
+
+# Check for st_birthtime, a feature from UFS2 (FreeBSD, NetBSD, OpenBSD, etc.)
+# and NTFS (Cygwin).
+# There was a time when this field was named st_createtime (21 June
+# 2002 to 16 July 2002) But that window is very small and applied only
+# to development code, so systems still using that configuration are
+# not supported. See revisions 1.10 and 1.11 of FreeBSD's
+# src/sys/ufs/ufs/dinode.h.
+#
+AC_DEFUN([gl_STAT_BIRTHTIME],
+[
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_CHECK_HEADERS_ONCE([sys/time.h])
+ AC_CHECK_MEMBERS([struct stat.st_birthtimespec.tv_nsec], [],
+ [AC_CHECK_MEMBERS([struct stat.st_birthtimensec], [],
+ [AC_CHECK_MEMBERS([struct stat.st_birthtim.tv_nsec], [], [],
+ [#include <sys/types.h>
+ #include <sys/stat.h>])],
+ [#include <sys/types.h>
+ #include <sys/stat.h>])],
+ [#include <sys/types.h>
+ #include <sys/stat.h>])
+])
diff --git a/m4/stat.m4 b/m4/stat.m4
index 9ff77df..d762cba 100644
--- a/m4/stat.m4
+++ b/m4/stat.m4
@@ -1,6 +1,6 @@
-# serial 11
+# serial 14
-# Copyright (C) 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2009-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -8,64 +8,65 @@
AC_DEFUN([gl_FUNC_STAT],
[
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
AC_CHECK_FUNCS_ONCE([lstat])
- dnl mingw is the only known platform where stat(".") and stat("./") differ
- AC_CACHE_CHECK([whether stat handles trailing slashes on directories],
- [gl_cv_func_stat_dir_slash],
- [AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <sys/stat.h>
-]], [[struct stat st; return stat (".", &st) != stat ("./", &st);]])],
- [gl_cv_func_stat_dir_slash=yes], [gl_cv_func_stat_dir_slash=no],
- [case $host_os in
- mingw*) gl_cv_func_stat_dir_slash="guessing no";;
- *) gl_cv_func_stat_dir_slash="guessing yes";;
- esac])])
- dnl AIX 7.1, Solaris 9, mingw64 mistakenly succeed on stat("file/").
- dnl (For mingw, this is due to a broken stat() override in libmingwex.a.)
- dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/").
- AC_CACHE_CHECK([whether stat handles trailing slashes on files],
- [gl_cv_func_stat_file_slash],
- [touch conftest.tmp
- # Assume that if we have lstat, we can also check symlinks.
- if test $ac_cv_func_lstat = yes; then
- ln -s conftest.tmp conftest.lnk
- fi
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <sys/stat.h>
+ case "$host_os" in
+ mingw*)
+ dnl On this platform, the original stat() returns st_atime, st_mtime,
+ dnl st_ctime values that are affected by the time zone.
+ REPLACE_STAT=1
+ ;;
+ *)
+ dnl AIX 7.1, Solaris 9, mingw64 mistakenly succeed on stat("file/").
+ dnl (For mingw, this is due to a broken stat() override in libmingwex.a.)
+ dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/").
+ AC_CACHE_CHECK([whether stat handles trailing slashes on files],
+ [gl_cv_func_stat_file_slash],
+ [touch conftest.tmp
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.tmp conftest.lnk
+ fi
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/stat.h>
]], [[int result = 0;
- struct stat st;
- if (!stat ("conftest.tmp/", &st))
- result |= 1;
+ struct stat st;
+ if (!stat ("conftest.tmp/", &st))
+ result |= 1;
#if HAVE_LSTAT
- if (!stat ("conftest.lnk/", &st))
- result |= 2;
+ if (!stat ("conftest.lnk/", &st))
+ result |= 2;
#endif
- return result;
- ]])],
- [gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no],
- [case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_stat_file_slash="guessing no" ;;
- esac
- ])
- rm -f conftest.tmp conftest.lnk])
- case $gl_cv_func_stat_dir_slash in
- *no) REPLACE_STAT=1
- AC_DEFINE([REPLACE_FUNC_STAT_DIR], [1], [Define to 1 if stat needs
- help when passed a directory name with a trailing slash]);;
- esac
- case $gl_cv_func_stat_file_slash in
- *no) REPLACE_STAT=1
- AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs
- help when passed a file name with a trailing slash]);;
+ return result;
+ ]])],
+ [gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no],
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_stat_file_slash="guessing no" ;;
+ esac
+ ])
+ rm -f conftest.tmp conftest.lnk])
+ case $gl_cv_func_stat_file_slash in
+ *no)
+ REPLACE_STAT=1
+ AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs
+ help when passed a file name with a trailing slash]);;
+ esac
+ case $host_os in
+ dnl Solaris stat can return a negative tv_nsec.
+ solaris*)
+ REPLACE_FSTAT=1 ;;
+ esac
+ ;;
esac
])
-# Prerequisites of lib/stat.c.
-AC_DEFUN([gl_PREREQ_STAT], [:])
+# Prerequisites of lib/stat.c and lib/stat-w32.c.
+AC_DEFUN([gl_PREREQ_STAT], [
+ AC_REQUIRE([gl_HEADER_SYS_STAT_H])
+ :
+])
diff --git a/m4/std-gnu11.m4 b/m4/std-gnu11.m4
index 9dae9b1..c85ac43 100644
--- a/m4/std-gnu11.m4
+++ b/m4/std-gnu11.m4
@@ -7,7 +7,7 @@
# or later is installed everywhere a Gnulib program might be developed.
-# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2018 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Written by David MacKenzie, with help from
# Akim Demaille, Paul Eggert,
@@ -369,7 +369,7 @@ dnl just the module. Instead, define the (private) symbol
dnl _STDC_C99, which suppresses a bogus failure in <stdbool.h>.
dnl The resulting compiler passes the test case here, and that's
dnl good enough. For more, please see the thread starting at:
-dnl http://lists.gnu.org/archive/html/autoconf/2010-12/msg00059.html
+dnl https://lists.gnu.org/r/autoconf/2010-12/msg00059.html
dnl Tru64 -c99
dnl with extended modes being tried first.
[[-std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99]], [$1], [$2])[]dnl
@@ -458,7 +458,7 @@ dnl preferably extc11.
# --------------
# Do not use AU_ALIAS here and in AC_PROG_CC_C99 and AC_PROG_CC_STDC,
# as that'd be incompatible with how Automake redefines AC_PROG_CC. See
-# <http://lists.gnu.org/archive/html/autoconf/2012-10/msg00048.html>.
+# <https://lists.gnu.org/r/autoconf/2012-10/msg00048.html>.
AU_DEFUN([AC_PROG_CC_C89],
[AC_REQUIRE([AC_PROG_CC])],
[$0 is obsolete; use AC_PROG_CC]
diff --git a/m4/stdalign.m4 b/m4/stdalign.m4
index 3a12658..c74fe9b 100644
--- a/m4/stdalign.m4
+++ b/m4/stdalign.m4
@@ -1,6 +1,6 @@
# Check for stdalign.h that conforms to C11.
-dnl Copyright 2011-2017 Free Software Foundation, Inc.
+dnl Copyright 2011-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -18,7 +18,7 @@ AC_DEFUN([gl_STDALIGN_H],
/* Test that alignof yields a result consistent with offsetof.
This catches GCC bug 52023
- <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
#ifdef __cplusplus
template <class t> struct alignof_helper { char a; t b; };
# define ao(type) offsetof (alignof_helper<type>, b)
@@ -35,8 +35,8 @@ AC_DEFUN([gl_STDALIGN_H],
|| (defined __APPLE__ && defined __MACH__ \
? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
: __GNUC__) \
- || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \
- || __ICC || 0x5110 <= __SUNPRO_C \
+ || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
+ || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
|| 1300 <= _MSC_VER)
struct alignas_test { char c; char alignas (8) alignas_8; };
char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
diff --git a/m4/stdarg.m4 b/m4/stdarg.m4
index 40db5e4..d6f0508 100644
--- a/m4/stdarg.m4
+++ b/m4/stdarg.m4
@@ -1,5 +1,5 @@
# stdarg.m4 serial 6
-dnl Copyright (C) 2006, 2008-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/stdbool.m4 b/m4/stdbool.m4
index d368123..f8c0577 100644
--- a/m4/stdbool.m4
+++ b/m4/stdbool.m4
@@ -1,6 +1,6 @@
# Check for stdbool.h that conforms to C99.
-dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -87,8 +87,8 @@ AC_DEFUN([AC_CHECK_HEADER_STDBOOL],
char o[sizeof n == m * sizeof n[0] ? 1 : -1];
char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
/* Catch a bug in an HP-UX C compiler. See
- http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
- http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
*/
Bool q = true;
Bool *pq = &q;
diff --git a/m4/stddef_h.m4 b/m4/stddef_h.m4
index f45def1..ba3d201 100644
--- a/m4/stddef_h.m4
+++ b/m4/stddef_h.m4
@@ -1,6 +1,6 @@
dnl A placeholder for <stddef.h>, for platforms that have issues.
# stddef_h.m4 serial 5
-dnl Copyright (C) 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/stdint.m4 b/m4/stdint.m4
index 4ac854d..b86184c 100644
--- a/m4/stdint.m4
+++ b/m4/stdint.m4
@@ -1,5 +1,5 @@
-# stdint.m4 serial 50
-dnl Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# stdint.m4 serial 51
+dnl Copyright (C) 2001-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -10,6 +10,7 @@ dnl Test whether <stdint.h> is supported or must be substituted.
AC_DEFUN_ONCE([gl_STDINT_H],
[
AC_PREREQ([2.59])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_REQUIRE([gl_LIMITS_H])
AC_REQUIRE([gt_TYPE_WINT_T])
@@ -288,8 +289,12 @@ static const char *macro_values[] =
]])],
[gl_cv_header_working_stdint_h=yes],
[],
- [dnl When cross-compiling, assume it works.
- gl_cv_header_working_stdint_h=yes
+ [case "$host_os" in
+ # Guess yes on native Windows.
+ mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
+ # In general, assume it works.
+ *) gl_cv_header_working_stdint_h="guessing yes" ;;
+ esac
])
])
])
@@ -299,15 +304,16 @@ static const char *macro_values[] =
HAVE_SYS_BITYPES_H=0
HAVE_SYS_INTTYPES_H=0
STDINT_H=stdint.h
- if test "$gl_cv_header_working_stdint_h" = yes; then
- HAVE_C99_STDINT_H=1
- dnl Now see whether the system <stdint.h> works without
- dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined.
- AC_CACHE_CHECK([whether stdint.h predates C++11],
- [gl_cv_header_stdint_predates_cxx11_h],
- [gl_cv_header_stdint_predates_cxx11_h=yes
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
+ case "$gl_cv_header_working_stdint_h" in
+ *yes)
+ HAVE_C99_STDINT_H=1
+ dnl Now see whether the system <stdint.h> works without
+ dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined.
+ AC_CACHE_CHECK([whether stdint.h predates C++11],
+ [gl_cv_header_stdint_predates_cxx11_h],
+ [gl_cv_header_stdint_predates_cxx11_h=yes
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
#include <stdint.h>
]
@@ -315,45 +321,47 @@ gl_STDINT_INCLUDES
[
intmax_t im = INTMAX_MAX;
int32_t i32 = INT32_C (0x7fffffff);
- ]])],
- [gl_cv_header_stdint_predates_cxx11_h=no])])
+ ]])],
+ [gl_cv_header_stdint_predates_cxx11_h=no])])
- if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
- AC_DEFINE([__STDC_CONSTANT_MACROS], [1],
- [Define to 1 if the system <stdint.h> predates C++11.])
- AC_DEFINE([__STDC_LIMIT_MACROS], [1],
- [Define to 1 if the system <stdint.h> predates C++11.])
- fi
- AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.],
- [gl_cv_header_stdint_width],
- [gl_cv_header_stdint_width=no
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[
- /* Work if build is not clean. */
- #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
- #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
- #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
- #endif
- #include <stdint.h>
- ]gl_STDINT_INCLUDES[
- int iw = UINTMAX_WIDTH;
- ]])],
- [gl_cv_header_stdint_width=yes])])
- if test "$gl_cv_header_stdint_width" = yes; then
- STDINT_H=
- fi
- else
- dnl Check for <sys/inttypes.h>, and for
- dnl <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5).
- AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h])
- if test $ac_cv_header_sys_inttypes_h = yes; then
- HAVE_SYS_INTTYPES_H=1
- fi
- if test $ac_cv_header_sys_bitypes_h = yes; then
- HAVE_SYS_BITYPES_H=1
- fi
- gl_STDINT_TYPE_PROPERTIES
- fi
+ if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
+ AC_DEFINE([__STDC_CONSTANT_MACROS], [1],
+ [Define to 1 if the system <stdint.h> predates C++11.])
+ AC_DEFINE([__STDC_LIMIT_MACROS], [1],
+ [Define to 1 if the system <stdint.h> predates C++11.])
+ fi
+ AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.],
+ [gl_cv_header_stdint_width],
+ [gl_cv_header_stdint_width=no
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
+ #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+ #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+ #endif
+ #include <stdint.h>
+ ]gl_STDINT_INCLUDES[
+ int iw = UINTMAX_WIDTH;
+ ]])],
+ [gl_cv_header_stdint_width=yes])])
+ if test "$gl_cv_header_stdint_width" = yes; then
+ STDINT_H=
+ fi
+ ;;
+ *)
+ dnl Check for <sys/inttypes.h>, and for
+ dnl <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5).
+ AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h])
+ if test $ac_cv_header_sys_inttypes_h = yes; then
+ HAVE_SYS_INTTYPES_H=1
+ fi
+ if test $ac_cv_header_sys_bitypes_h = yes; then
+ HAVE_SYS_BITYPES_H=1
+ fi
+ gl_STDINT_TYPE_PROPERTIES
+ ;;
+ esac
dnl The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
LIMITS_H=limits.h
diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4
index 9ffbb85..e06461e 100644
--- a/m4/stdio_h.m4
+++ b/m4/stdio_h.m4
@@ -1,5 +1,5 @@
# stdio_h.m4 serial 48
-dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4
index 110fe2d..49dc5d5 100644
--- a/m4/stdlib_h.m4
+++ b/m4/stdlib_h.m4
@@ -1,5 +1,5 @@
-# stdlib_h.m4 serial 43
-dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
+# stdlib_h.m4 serial 45
+dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -14,6 +14,9 @@ AC_DEFUN([gl_STDLIB_H],
dnl guaranteed by C89.
gl_WARN_ON_USE_PREPARE([[#include <stdlib.h>
#if HAVE_SYS_LOADAVG_H
+/* OpenIndiana has a bug: <sys/time.h> must be included before
+ <sys/loadavg.h>. */
+# include <sys/time.h>
# include <sys/loadavg.h>
#endif
#if HAVE_RANDOM_H
@@ -21,9 +24,9 @@ AC_DEFUN([gl_STDLIB_H],
#endif
]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt
initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps
- posix_openpt ptsname ptsname_r qsort_r random random_r realpath rpmatch
- secure_getenv setenv setstate setstate_r srandom srandom_r
- strtod strtoll strtoull unlockpt unsetenv])
+ posix_openpt ptsname ptsname_r qsort_r random random_r reallocarray
+ realpath rpmatch secure_getenv setenv setstate setstate_r srandom
+ srandom_r strtod strtoll strtoull unlockpt unsetenv])
])
AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
@@ -58,6 +61,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
GNULIB_QSORT_R=0; AC_SUBST([GNULIB_QSORT_R])
GNULIB_RANDOM=0; AC_SUBST([GNULIB_RANDOM])
GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R])
+ GNULIB_REALLOCARRAY=0; AC_SUBST([GNULIB_REALLOCARRAY])
GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH])
GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH])
@@ -77,6 +81,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG])
HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT])
HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT])
+ HAVE_DECL_INITSTATE=1; AC_SUBST([HAVE_DECL_INITSTATE])
HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP])
HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP])
HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS])
@@ -89,11 +94,13 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
HAVE_RANDOM=1; AC_SUBST([HAVE_RANDOM])
HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H])
HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R])
+ HAVE_REALLOCARRAY=1; AC_SUBST([HAVE_REALLOCARRAY])
HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH])
HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH])
HAVE_SECURE_GETENV=1; AC_SUBST([HAVE_SECURE_GETENV])
HAVE_SETENV=1; AC_SUBST([HAVE_SETENV])
HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV])
+ HAVE_DECL_SETSTATE=1; AC_SUBST([HAVE_DECL_SETSTATE])
HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD])
HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL])
HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL])
diff --git a/m4/strdup.m4 b/m4/strdup.m4
index a92dbd6..dddaa01 100644
--- a/m4/strdup.m4
+++ b/m4/strdup.m4
@@ -1,6 +1,6 @@
# strdup.m4 serial 13
-dnl Copyright (C) 2002-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/strerror.m4 b/m4/strerror.m4
index 460ddc9..b886b8d 100644
--- a/m4/strerror.m4
+++ b/m4/strerror.m4
@@ -1,5 +1,5 @@
-# strerror.m4 serial 17
-dnl Copyright (C) 2002, 2007-2017 Free Software Foundation, Inc.
+# strerror.m4 serial 19
+dnl Copyright (C) 2002, 2007-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -24,10 +24,10 @@ AC_DEFUN([gl_FUNC_STRERROR],
[gl_cv_func_working_strerror=yes],
[gl_cv_func_working_strerror=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_working_strerror="guessing no" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_working_strerror="guessing no" ;;
esac
])
])
@@ -78,10 +78,12 @@ AC_DEFUN([gl_FUNC_STRERROR_0],
[gl_cv_func_strerror_0_works=yes],
[gl_cv_func_strerror_0_works=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_strerror_0_works="guessing no" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_strerror_0_works="guessing no" ;;
esac
])
])
diff --git a/m4/strerror_r.m4 b/m4/strerror_r.m4
new file mode 100644
index 0000000..a3e3a4c
--- /dev/null
+++ b/m4/strerror_r.m4
@@ -0,0 +1,173 @@
+# strerror_r.m4 serial 19
+dnl Copyright (C) 2002, 2007-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRERROR_R],
+[
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS])
+
+ dnl Persuade Solaris <string.h> to declare strerror_r().
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+ dnl Some systems don't declare strerror_r() if _THREAD_SAFE and _REENTRANT
+ dnl are not defined.
+ AC_CHECK_DECLS_ONCE([strerror_r])
+ if test $ac_cv_have_decl_strerror_r = no; then
+ HAVE_DECL_STRERROR_R=0
+ fi
+
+ if test $ac_cv_func_strerror_r = yes; then
+ if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
+ if test $gl_cv_func_strerror_r_posix_signature = yes; then
+ case "$gl_cv_func_strerror_r_works" in
+ dnl The system's strerror_r has bugs. Replace it.
+ *no) REPLACE_STRERROR_R=1 ;;
+ esac
+ else
+ dnl The system's strerror_r() has a wrong signature. Replace it.
+ REPLACE_STRERROR_R=1
+ fi
+ else
+ dnl The system's strerror_r() cannot know about the new errno values we
+ dnl add to <errno.h>, or any fix for strerror(0). Replace it.
+ REPLACE_STRERROR_R=1
+ fi
+ fi
+])
+
+# Prerequisites of lib/strerror_r.c.
+AC_DEFUN([gl_PREREQ_STRERROR_R], [
+ dnl glibc >= 2.3.4 and cygwin 1.7.9 have a function __xpg_strerror_r.
+ AC_CHECK_FUNCS_ONCE([__xpg_strerror_r])
+ AC_CHECK_FUNCS_ONCE([catgets])
+ AC_CHECK_FUNCS_ONCE([snprintf])
+])
+
+# Detect if strerror_r works, but without affecting whether a replacement
+# strerror_r will be used.
+AC_DEFUN([gl_FUNC_STRERROR_R_WORKS],
+[
+ AC_REQUIRE([gl_HEADER_ERRNO_H])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_REQUIRE([gl_FUNC_STRERROR_0])
+
+ AC_CHECK_FUNCS_ONCE([strerror_r])
+ if test $ac_cv_func_strerror_r = yes; then
+ if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
+ dnl The POSIX prototype is: int strerror_r (int, char *, size_t);
+ dnl glibc, Cygwin: char *strerror_r (int, char *, size_t);
+ dnl AIX 5.1, OSF/1 5.1: int strerror_r (int, char *, int);
+ AC_CACHE_CHECK([for strerror_r with POSIX signature],
+ [gl_cv_func_strerror_r_posix_signature],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <string.h>
+ int strerror_r (int, char *, size_t);
+ ]],
+ [])],
+ [gl_cv_func_strerror_r_posix_signature=yes],
+ [gl_cv_func_strerror_r_posix_signature=no])
+ ])
+ if test $gl_cv_func_strerror_r_posix_signature = yes; then
+ dnl AIX 6.1 strerror_r fails by returning -1, not an error number.
+ dnl HP-UX 11.31 strerror_r always fails when the buffer length argument
+ dnl is less than 80.
+ dnl FreeBSD 8.s strerror_r claims failure on 0
+ dnl Mac OS X 10.5 strerror_r treats 0 like -1
+ dnl Solaris 10 strerror_r corrupts errno on failure
+ AC_CACHE_CHECK([whether strerror_r works],
+ [gl_cv_func_strerror_r_works],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <errno.h>
+ #include <string.h>
+ ]],
+ [[int result = 0;
+ char buf[79];
+ if (strerror_r (EACCES, buf, 0) < 0)
+ result |= 1;
+ errno = 0;
+ if (strerror_r (EACCES, buf, sizeof buf) != 0)
+ result |= 2;
+ strcpy (buf, "Unknown");
+ if (strerror_r (0, buf, sizeof buf) != 0)
+ result |= 4;
+ if (errno)
+ result |= 8;
+ if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
+ result |= 0x10;
+ errno = 0;
+ *buf = 0;
+ if (strerror_r (-3, buf, sizeof buf) < 0)
+ result |= 0x20;
+ if (errno)
+ result |= 0x40;
+ if (!*buf)
+ result |= 0x80;
+ return result;
+ ]])],
+ [gl_cv_func_strerror_r_works=yes],
+ [gl_cv_func_strerror_r_works=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on AIX.
+ aix*) gl_cv_func_strerror_r_works="guessing no";;
+ # Guess no on HP-UX.
+ hpux*) gl_cv_func_strerror_r_works="guessing no";;
+ # Guess no on BSD variants.
+ *bsd*) gl_cv_func_strerror_r_works="guessing no";;
+ # Guess yes otherwise.
+ *) gl_cv_func_strerror_r_works="guessing yes";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+ else
+ dnl The system's strerror() has a wrong signature.
+ dnl glibc >= 2.3.4 and cygwin 1.7.9 have a function __xpg_strerror_r.
+ AC_CHECK_FUNCS_ONCE([__xpg_strerror_r])
+ dnl In glibc < 2.14, __xpg_strerror_r does not populate buf on failure.
+ dnl In cygwin < 1.7.10, __xpg_strerror_r clobbers strerror's buffer.
+ if test $ac_cv_func___xpg_strerror_r = yes; then
+ AC_CACHE_CHECK([whether __xpg_strerror_r works],
+ [gl_cv_func_strerror_r_works],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <errno.h>
+ #include <string.h>
+ extern
+ #ifdef __cplusplus
+ "C"
+ #endif
+ int __xpg_strerror_r(int, char *, size_t);
+ ]],
+ [[int result = 0;
+ char buf[256] = "^";
+ char copy[256];
+ char *str = strerror (-1);
+ strcpy (copy, str);
+ if (__xpg_strerror_r (-2, buf, 1) == 0)
+ result |= 1;
+ if (*buf)
+ result |= 2;
+ __xpg_strerror_r (-2, buf, 256);
+ if (strcmp (str, copy))
+ result |= 4;
+ return result;
+ ]])],
+ [gl_cv_func_strerror_r_works=yes],
+ [gl_cv_func_strerror_r_works=no],
+ [dnl Guess no on all platforms that have __xpg_strerror_r,
+ dnl at least until fixed glibc and cygwin are more common.
+ gl_cv_func_strerror_r_works="guessing no"
+ ])
+ ])
+ fi
+ fi
+ fi
+ fi
+])
diff --git a/m4/string_h.m4 b/m4/string_h.m4
index 3d2ad22..97c80dc 100644
--- a/m4/string_h.m4
+++ b/m4/string_h.m4
@@ -1,11 +1,11 @@
# Configure a GNU-like replacement for <string.h>.
-# Copyright (C) 2007-2017 Free Software Foundation, Inc.
+# Copyright (C) 2007-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 21
+# serial 22
# Written by Paul Eggert.
@@ -43,6 +43,7 @@ AC_DEFUN([gl_STRING_MODULE_INDICATOR],
AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
[
+ GNULIB_EXPLICIT_BZERO=0; AC_SUBST([GNULIB_EXPLICIT_BZERO])
GNULIB_FFSL=0; AC_SUBST([GNULIB_FFSL])
GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL])
GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR])
@@ -82,6 +83,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP])
HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN])
dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_EXPLICIT_BZERO=1; AC_SUBST([HAVE_EXPLICIT_BZERO])
HAVE_FFSL=1; AC_SUBST([HAVE_FFSL])
HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL])
HAVE_MEMCHR=1; AC_SUBST([HAVE_MEMCHR])
@@ -105,16 +107,16 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR])
REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM])
REPLACE_STPNCPY=0; AC_SUBST([REPLACE_STPNCPY])
+ REPLACE_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL])
REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP])
+ REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT])
+ REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP])
+ REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN])
REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR])
REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR])
- REPLACE_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL])
+ REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R])
REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR])
REPLACE_STRERROR_R=0; AC_SUBST([REPLACE_STRERROR_R])
- REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT])
- REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP])
- REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN])
REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL])
- REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R])
UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R])
])
diff --git a/m4/strverscmp.m4 b/m4/strverscmp.m4
index cbcca3f..5d32985 100644
--- a/m4/strverscmp.m4
+++ b/m4/strverscmp.m4
@@ -1,5 +1,5 @@
# strverscmp.m4 serial 8
-dnl Copyright (C) 2002, 2005-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/symlink.m4 b/m4/symlink.m4
index 220ea19..a452f7c 100644
--- a/m4/symlink.m4
+++ b/m4/symlink.m4
@@ -1,7 +1,7 @@
-# serial 6
+# serial 7
# See if we need to provide symlink replacement.
-dnl Copyright (C) 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -36,10 +36,10 @@ AC_DEFUN([gl_FUNC_SYMLINK],
]])],
[gl_cv_func_symlink_works=yes], [gl_cv_func_symlink_works=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_symlink_works="guessing no" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_symlink_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_symlink_works="guessing no" ;;
esac
])
rm -f conftest.f conftest.link conftest.lnk2])
diff --git a/m4/sys_ioctl_h.m4 b/m4/sys_ioctl_h.m4
new file mode 100644
index 0000000..1ef67c0
--- /dev/null
+++ b/m4/sys_ioctl_h.m4
@@ -0,0 +1,64 @@
+# sys_ioctl_h.m4 serial 10
+dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Bruno Haible.
+
+AC_DEFUN([gl_SYS_IOCTL_H],
+[
+ dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+ dnl once only, before all statements that occur in other macros.
+ AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])
+
+ AC_CHECK_HEADERS_ONCE([sys/ioctl.h])
+ if test $ac_cv_header_sys_ioctl_h = yes; then
+ HAVE_SYS_IOCTL_H=1
+ dnl Test whether <sys/ioctl.h> declares ioctl(), or whether some other
+ dnl header file, such as <unistd.h> or <stropts.h>, is needed for that.
+ AC_CACHE_CHECK([whether <sys/ioctl.h> declares ioctl],
+ [gl_cv_decl_ioctl_in_sys_ioctl_h],
+ [dnl We cannot use AC_CHECK_DECL because it produces its own messages.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [AC_INCLUDES_DEFAULT([#include <sys/ioctl.h>])],
+ [(void) ioctl;])],
+ [gl_cv_decl_ioctl_in_sys_ioctl_h=yes],
+ [gl_cv_decl_ioctl_in_sys_ioctl_h=no])
+ ])
+ else
+ HAVE_SYS_IOCTL_H=0
+ fi
+ AC_SUBST([HAVE_SYS_IOCTL_H])
+ dnl <sys/ioctl.h> is always overridden, because of GNULIB_POSIXCHECK.
+ gl_CHECK_NEXT_HEADERS([sys/ioctl.h])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[#include <sys/ioctl.h>
+/* Some platforms declare ioctl in the wrong header. */
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
+# include <unistd.h>
+#endif
+ ]], [ioctl])
+])
+
+AC_DEFUN([gl_SYS_IOCTL_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])
+ gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+ dnl Define it also as a C macro, for the benefit of the unit tests.
+ gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_SYS_IOCTL_H_DEFAULTS],
+[
+ GNULIB_IOCTL=0; AC_SUBST([GNULIB_IOCTL])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ SYS_IOCTL_H_HAVE_WINSOCK2_H=0; AC_SUBST([SYS_IOCTL_H_HAVE_WINSOCK2_H])
+ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
+ AC_SUBST([SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS])
+ REPLACE_IOCTL=0; AC_SUBST([REPLACE_IOCTL])
+])
diff --git a/m4/sys_select_h.m4 b/m4/sys_select_h.m4
new file mode 100644
index 0000000..8e9eff4
--- /dev/null
+++ b/m4/sys_select_h.m4
@@ -0,0 +1,95 @@
+# sys_select_h.m4 serial 20
+dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_HEADER_SYS_SELECT],
+[
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([gl_SYS_SELECT_H_DEFAULTS])
+ AC_CACHE_CHECK([whether <sys/select.h> is self-contained],
+ [gl_cv_header_sys_select_h_selfcontained],
+ [
+ dnl Test against two bugs:
+ dnl 1. On many platforms, <sys/select.h> assumes prior inclusion of
+ dnl <sys/types.h>.
+ dnl 2. On OSF/1 4.0, <sys/select.h> provides only a forward declaration
+ dnl of 'struct timeval', and no definition of this type.
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/select.h>]],
+ [[struct timeval b;]])],
+ [gl_cv_header_sys_select_h_selfcontained=yes],
+ [gl_cv_header_sys_select_h_selfcontained=no])
+ dnl Test against another bug:
+ dnl 3. On Solaris 10, <sys/select.h> provides an FD_ZERO implementation
+ dnl that relies on memset(), but without including <string.h>.
+ if test $gl_cv_header_sys_select_h_selfcontained = yes; then
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <sys/select.h>]],
+ [[int memset; int bzero;]])
+ ],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[#include <sys/select.h>]], [[
+ #undef memset
+ #define memset nonexistent_memset
+ extern
+ #ifdef __cplusplus
+ "C"
+ #endif
+ void *memset (void *, int, unsigned long);
+ #undef bzero
+ #define bzero nonexistent_bzero
+ extern
+ #ifdef __cplusplus
+ "C"
+ #endif
+ void bzero (void *, unsigned long);
+ fd_set fds;
+ FD_ZERO (&fds);
+ ]])
+ ],
+ [],
+ [gl_cv_header_sys_select_h_selfcontained=no])
+ ])
+ fi
+ ])
+ dnl <sys/select.h> is always overridden, because of GNULIB_POSIXCHECK.
+ gl_CHECK_NEXT_HEADERS([sys/select.h])
+ if test $ac_cv_header_sys_select_h = yes; then
+ HAVE_SYS_SELECT_H=1
+ else
+ HAVE_SYS_SELECT_H=0
+ fi
+ AC_SUBST([HAVE_SYS_SELECT_H])
+ gl_PREREQ_SYS_H_WINSOCK2
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[
+/* Some systems require prerequisite headers. */
+#include <sys/types.h>
+#if !(defined __GLIBC__ && !defined __UCLIBC__) && HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+#include <sys/select.h>
+ ]], [pselect select])
+])
+
+AC_DEFUN([gl_SYS_SELECT_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_SYS_SELECT_H_DEFAULTS])
+ gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+ dnl Define it also as a C macro, for the benefit of the unit tests.
+ gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_SYS_SELECT_H_DEFAULTS],
+[
+ GNULIB_PSELECT=0; AC_SUBST([GNULIB_PSELECT])
+ GNULIB_SELECT=0; AC_SUBST([GNULIB_SELECT])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_PSELECT=1; AC_SUBST([HAVE_PSELECT])
+ REPLACE_PSELECT=0; AC_SUBST([REPLACE_PSELECT])
+ REPLACE_SELECT=0; AC_SUBST([REPLACE_SELECT])
+])
diff --git a/m4/sys_socket_h.m4 b/m4/sys_socket_h.m4
index 3ecbe7c..f210378 100644
--- a/m4/sys_socket_h.m4
+++ b/m4/sys_socket_h.m4
@@ -1,5 +1,5 @@
# sys_socket_h.m4 serial 23
-dnl Copyright (C) 2005-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/sys_stat_h.m4 b/m4/sys_stat_h.m4
index 1e34ac4..52f06aa 100644
--- a/m4/sys_stat_h.m4
+++ b/m4/sys_stat_h.m4
@@ -1,5 +1,5 @@
-# sys_stat_h.m4 serial 28 -*- Autoconf -*-
-dnl Copyright (C) 2006-2017 Free Software Foundation, Inc.
+# sys_stat_h.m4 serial 31 -*- Autoconf -*-
+dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -19,18 +19,21 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H],
dnl Ensure the type mode_t gets defined.
AC_REQUIRE([AC_TYPE_MODE_T])
- dnl Whether to override 'struct stat'.
+ dnl Whether to enable precise timestamps in 'struct stat'.
+ m4_ifdef([gl_WINDOWS_STAT_TIMESPEC], [
+ AC_REQUIRE([gl_WINDOWS_STAT_TIMESPEC])
+ ], [
+ WINDOWS_STAT_TIMESPEC=0
+ ])
+ AC_SUBST([WINDOWS_STAT_TIMESPEC])
+
+ dnl Whether to ensure that struct stat.st_size is 64-bit wide.
m4_ifdef([gl_LARGEFILE], [
AC_REQUIRE([gl_LARGEFILE])
], [
WINDOWS_64_BIT_ST_SIZE=0
])
AC_SUBST([WINDOWS_64_BIT_ST_SIZE])
- if test $WINDOWS_64_BIT_ST_SIZE = 1; then
- AC_DEFINE([_GL_WINDOWS_64_BIT_ST_SIZE], [1],
- [Define to 1 if Gnulib overrides 'struct stat' on Windows so that
- struct stat.st_size becomes 64-bit.])
- fi
dnl Define types that are supposed to be defined in <sys/types.h> or
dnl <sys/stat.h>.
@@ -72,6 +75,7 @@ AC_DEFUN([gl_SYS_STAT_H_DEFAULTS],
GNULIB_MKNODAT=0; AC_SUBST([GNULIB_MKNODAT])
GNULIB_STAT=0; AC_SUBST([GNULIB_STAT])
GNULIB_UTIMENSAT=0; AC_SUBST([GNULIB_UTIMENSAT])
+ GNULIB_OVERRIDES_STRUCT_STAT=0; AC_SUBST([GNULIB_OVERRIDES_STRUCT_STAT])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_FCHMODAT=1; AC_SUBST([HAVE_FCHMODAT])
HAVE_FSTATAT=1; AC_SUBST([HAVE_FSTATAT])
diff --git a/m4/sys_time_h.m4 b/m4/sys_time_h.m4
index e622dbe..d7e9268 100644
--- a/m4/sys_time_h.m4
+++ b/m4/sys_time_h.m4
@@ -1,7 +1,7 @@
# Configure a replacement for <sys/time.h>.
-# serial 8
+# serial 9
-# Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -105,7 +105,6 @@ AC_DEFUN([gl_HEADER_SYS_TIME_H_DEFAULTS],
HAVE_GETTIMEOFDAY=1; AC_SUBST([HAVE_GETTIMEOFDAY])
HAVE_STRUCT_TIMEVAL=1; AC_SUBST([HAVE_STRUCT_TIMEVAL])
HAVE_SYS_TIME_H=1; AC_SUBST([HAVE_SYS_TIME_H])
- HAVE_TIMEZONE_T=0; AC_SUBST([HAVE_TIMEZONE_T])
REPLACE_GETTIMEOFDAY=0; AC_SUBST([REPLACE_GETTIMEOFDAY])
REPLACE_STRUCT_TIMEVAL=0; AC_SUBST([REPLACE_STRUCT_TIMEVAL])
])
diff --git a/m4/sys_types_h.m4 b/m4/sys_types_h.m4
index 2eb4e9e..2debfb0 100644
--- a/m4/sys_types_h.m4
+++ b/m4/sys_types_h.m4
@@ -1,11 +1,14 @@
-# sys_types_h.m4 serial 6
-dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
+# sys_types_h.m4 serial 9
+dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN_ONCE([gl_SYS_TYPES_H],
[
+ dnl Use sane struct stat types in OpenVMS 8.2 and later.
+ AC_DEFINE([_USE_STD_STAT], 1, [For standard stat data types on VMS.])
+
AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS])
gl_NEXT_HEADERS([sys/types.h])
@@ -17,6 +20,14 @@ AC_DEFUN_ONCE([gl_SYS_TYPES_H],
dnl Whether to override the 'off_t' type.
AC_REQUIRE([gl_TYPE_OFF_T])
+
+ dnl Whether to override the 'dev_t' and 'ino_t' types.
+ m4_ifdef([gl_WINDOWS_STAT_INODES], [
+ AC_REQUIRE([gl_WINDOWS_STAT_INODES])
+ ], [
+ WINDOWS_STAT_INODES=0
+ ])
+ AC_SUBST([WINDOWS_STAT_INODES])
])
AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS],
@@ -24,12 +35,12 @@ AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS],
])
# This works around a buggy version in autoconf <= 2.69.
-# See <https://lists.gnu.org/archive/html/autoconf/2016-08/msg00014.html>
+# See <https://lists.gnu.org/r/autoconf/2016-08/msg00014.html>
m4_version_prereq([2.70], [], [
# This is taken from the following Autoconf patch:
-# http://git.sv.gnu.org/cgit/autoconf.git/commit/?id=e17a30e98
+# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=e17a30e987d7ee695fb4294a82d987ec3dc9b974
m4_undefine([AC_HEADER_MAJOR])
AC_DEFUN([AC_HEADER_MAJOR],
diff --git a/m4/sys_uio_h.m4 b/m4/sys_uio_h.m4
new file mode 100644
index 0000000..2cd01e1
--- /dev/null
+++ b/m4/sys_uio_h.m4
@@ -0,0 +1,31 @@
+# sys_uio_h.m4 serial 1
+dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_HEADER_SYS_UIO],
+[
+ AC_REQUIRE([gl_SYS_UIO_H_DEFAULTS])
+ dnl <sys/uio.h> is always overridden, because of GNULIB_POSIXCHECK.
+ gl_CHECK_NEXT_HEADERS([sys/uio.h])
+ if test $ac_cv_header_sys_uio_h = yes; then
+ HAVE_SYS_UIO_H=1
+ else
+ HAVE_SYS_UIO_H=0
+ fi
+ AC_SUBST([HAVE_SYS_UIO_H])
+])
+
+AC_DEFUN([gl_SYS_UIO_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_SYS_UIO_H_DEFAULTS])
+ gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+ dnl Define it also as a C macro, for the benefit of the unit tests.
+ gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_SYS_UIO_H_DEFAULTS],
+[
+])
diff --git a/m4/tempname.m4 b/m4/tempname.m4
index a59f4c0..ed813f1 100644
--- a/m4/tempname.m4
+++ b/m4/tempname.m4
@@ -1,6 +1,6 @@
#serial 5
-# Copyright (C) 2006-2007, 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2006-2007, 2009-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/m4/threadlib.m4 b/m4/threadlib.m4
index f79fde2..1f7b134 100644
--- a/m4/threadlib.m4
+++ b/m4/threadlib.m4
@@ -1,5 +1,5 @@
-# threadlib.m4 serial 12
-dnl Copyright (C) 2005-2017 Free Software Foundation, Inc.
+# threadlib.m4 serial 13
+dnl Copyright (C) 2005-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -66,7 +66,7 @@ changequote(,)dnl
dnl child process gets an endless segmentation fault inside execvp().
dnl Disable multithreading by default on Cygwin 1.5.x, because it has
dnl bugs that lead to endless loops or crashes. See
- dnl <http://cygwin.com/ml/cygwin/2009-08/msg00283.html>.
+ dnl <https://cygwin.com/ml/cygwin/2009-08/msg00283.html>.
osf*) gl_use_threads=no ;;
cygwin*)
case `uname -r` in
@@ -148,6 +148,10 @@ int main ()
[gl_cv_have_weak="guessing no"])
])
fi
+ dnl But when linking statically, weak symbols don't work.
+ case " $LDFLAGS " in
+ *" -static "*) gl_cv_have_weak=no ;;
+ esac
])
if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
# On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
@@ -165,7 +169,7 @@ int main ()
#
# If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
# needs -pthread for some reason. See:
- # http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00023.html
+ # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
save_LIBS=$LIBS
for gl_pthread in '' '-pthread'; do
LIBS="$LIBS $gl_pthread"
diff --git a/m4/time_h.m4 b/m4/time_h.m4
index b925678..ad6f2f5 100644
--- a/m4/time_h.m4
+++ b/m4/time_h.m4
@@ -1,8 +1,8 @@
# Configure a more-standard replacement for <time.h>.
-# Copyright (C) 2000-2001, 2003-2007, 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2018 Free Software Foundation, Inc.
-# serial 9
+# serial 11
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -104,24 +104,34 @@ AC_DEFUN([gl_TIME_MODULE_INDICATOR],
AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
[
+ GNULIB_CTIME=0; AC_SUBST([GNULIB_CTIME])
GNULIB_MKTIME=0; AC_SUBST([GNULIB_MKTIME])
+ GNULIB_LOCALTIME=0; AC_SUBST([GNULIB_LOCALTIME])
GNULIB_NANOSLEEP=0; AC_SUBST([GNULIB_NANOSLEEP])
+ GNULIB_STRFTIME=0; AC_SUBST([GNULIB_STRFTIME])
GNULIB_STRPTIME=0; AC_SUBST([GNULIB_STRPTIME])
GNULIB_TIMEGM=0; AC_SUBST([GNULIB_TIMEGM])
GNULIB_TIME_R=0; AC_SUBST([GNULIB_TIME_R])
GNULIB_TIME_RZ=0; AC_SUBST([GNULIB_TIME_RZ])
+ GNULIB_TZSET=0; AC_SUBST([GNULIB_TZSET])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_DECL_LOCALTIME_R=1; AC_SUBST([HAVE_DECL_LOCALTIME_R])
HAVE_NANOSLEEP=1; AC_SUBST([HAVE_NANOSLEEP])
HAVE_STRPTIME=1; AC_SUBST([HAVE_STRPTIME])
HAVE_TIMEGM=1; AC_SUBST([HAVE_TIMEGM])
+ HAVE_TZSET=1; AC_SUBST([HAVE_TZSET])
+ dnl Even GNU libc does not have timezone_t yet.
+ HAVE_TIMEZONE_T=0; AC_SUBST([HAVE_TIMEZONE_T])
dnl If another module says to replace or to not replace, do that.
dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK;
dnl this lets maintainers check for portability.
+ REPLACE_CTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_CTIME])
REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R])
REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME])
REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP])
+ REPLACE_STRFTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_STRFTIME])
REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM])
+ REPLACE_TZSET=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TZSET])
dnl Hack so that the time module doesn't depend on the sys_time module.
dnl First, default GNULIB_GETTIMEOFDAY to 0 if sys_time is absent.
diff --git a/m4/ungetc.m4 b/m4/ungetc.m4
index 9fd3db9..2e66c55 100644
--- a/m4/ungetc.m4
+++ b/m4/ungetc.m4
@@ -1,5 +1,5 @@
-# ungetc.m4 serial 3
-dnl Copyright (C) 2009-2017 Free Software Foundation, Inc.
+# ungetc.m4 serial 6
+dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -14,26 +14,39 @@ AC_DEFUN_ONCE([gl_FUNC_UNGETC_WORKS],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
]], [FILE *f;
- if (!(f = fopen ("conftest.tmp", "w+"))) return 1;
- if (fputs ("abc", f) < 0) return 2;
+ if (!(f = fopen ("conftest.tmp", "w+")))
+ return 1;
+ if (fputs ("abc", f) < 0)
+ { fclose (f); return 2; }
rewind (f);
- if (fgetc (f) != 'a') return 3;
- if (fgetc (f) != 'b') return 4;
- if (ungetc ('d', f) != 'd') return 5;
- if (ftell (f) != 1) return 6;
- if (fgetc (f) != 'd') return 7;
- if (ftell (f) != 2) return 8;
- if (fseek (f, 0, SEEK_CUR) != 0) return 9;
- if (ftell (f) != 2) return 10;
- if (fgetc (f) != 'c') return 11;
- fclose (f); remove ("conftest.tmp");])],
+ if (fgetc (f) != 'a')
+ { fclose (f); return 3; }
+ if (fgetc (f) != 'b')
+ { fclose (f); return 4; }
+ if (ungetc ('d', f) != 'd')
+ { fclose (f); return 5; }
+ if (ftell (f) != 1)
+ { fclose (f); return 6; }
+ if (fgetc (f) != 'd')
+ { fclose (f); return 7; }
+ if (ftell (f) != 2)
+ { fclose (f); return 8; }
+ if (fseek (f, 0, SEEK_CUR) != 0)
+ { fclose (f); return 9; }
+ if (ftell (f) != 2)
+ { fclose (f); return 10; }
+ if (fgetc (f) != 'c')
+ { fclose (f); return 11; }
+ fclose (f);
+ remove ("conftest.tmp");])],
[gl_cv_func_ungetc_works=yes], [gl_cv_func_ungetc_works=no],
[case "$host_os" in
- # Guess yes on glibc and bionic systems.
- *-gnu*|*-android*)
- gl_cv_func_ungetc_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_ungetc_works="guessing no" ;;
+ # Guess yes on glibc and bionic systems.
+ *-gnu* | gnu* | *-android*) gl_cv_func_ungetc_works="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_ungetc_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_ungetc_works="guessing no" ;;
esac
])
])
diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4
index 25aef19..b3b71ec 100644
--- a/m4/unistd_h.m4
+++ b/m4/unistd_h.m4
@@ -1,5 +1,5 @@
-# unistd_h.m4 serial 69
-dnl Copyright (C) 2006-2017 Free Software Foundation, Inc.
+# unistd_h.m4 serial 71
+dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -46,8 +46,8 @@ AC_DEFUN([gl_UNISTD_H],
gethostname getlogin getlogin_r getpagesize
getusershell setusershell endusershell
group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite
- readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r
- unlink unlinkat usleep])
+ readlink readlinkat rmdir sethostname sleep symlink symlinkat
+ truncate ttyname_r unlink unlinkat usleep])
])
AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
@@ -102,6 +102,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP])
GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK])
GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT])
+ GNULIB_TRUNCATE=0; AC_SUBST([GNULIB_TRUNCATE])
GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R])
GNULIB_UNISTD_H_NONBLOCKING=0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING])
GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE])
@@ -139,6 +140,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP])
HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK])
HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT])
+ HAVE_TRUNCATE=1; AC_SUBST([HAVE_TRUNCATE])
HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT])
HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP])
HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON])
@@ -157,6 +159,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE])
REPLACE_DUP=0; AC_SUBST([REPLACE_DUP])
REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2])
+ REPLACE_FACCESSAT=0; AC_SUBST([REPLACE_FACCESSAT])
REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT])
REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE])
REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD])
@@ -179,6 +182,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP])
REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK])
REPLACE_SYMLINKAT=0; AC_SUBST([REPLACE_SYMLINKAT])
+ REPLACE_TRUNCATE=0; AC_SUBST([REPLACE_TRUNCATE])
REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R])
REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK])
REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT])
diff --git a/m4/unlocked-io.m4 b/m4/unlocked-io.m4
index 448ccac..7e46367 100644
--- a/m4/unlocked-io.m4
+++ b/m4/unlocked-io.m4
@@ -1,6 +1,6 @@
# unlocked-io.m4 serial 15
-# Copyright (C) 1998-2006, 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 1998-2006, 2009-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/m4/version-etc.m4 b/m4/version-etc.m4
index c099101..815378a 100644
--- a/m4/version-etc.m4
+++ b/m4/version-etc.m4
@@ -1,5 +1,5 @@
# version-etc.m4 serial 1
-# Copyright (C) 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2009-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/m4/warn-on-use.m4 b/m4/warn-on-use.m4
index 25ce737..e9c48bb 100644
--- a/m4/warn-on-use.m4
+++ b/m4/warn-on-use.m4
@@ -1,5 +1,5 @@
# warn-on-use.m4 serial 5
-dnl Copyright (C) 2010-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/warnings.m4 b/m4/warnings.m4
index e697174..07edda1 100644
--- a/m4/warnings.m4
+++ b/m4/warnings.m4
@@ -1,5 +1,5 @@
-# warnings.m4 serial 11
-dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
+# warnings.m4 serial 14
+dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -20,10 +20,12 @@ m4_ifdef([AS_VAR_APPEND],
# -----------------------------------------------------------------
# Check if the compiler supports OPTION when compiling PROGRAM.
#
-# FIXME: gl_Warn must be used unquoted until we can assume Autoconf
-# 2.64 or newer.
+# The effects of this macro depend on the current language (_AC_LANG).
AC_DEFUN([gl_COMPILER_OPTION_IF],
-[AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_[]_AC_LANG_ABBREV[]_$1])dnl
+[
+dnl FIXME: gl_Warn must be used unquoted until we can assume Autoconf
+dnl 2.64 or newer.
+AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_[]_AC_LANG_ABBREV[]_$1])dnl
AS_VAR_PUSHDEF([gl_Flags], [_AC_LANG_PREFIX[]FLAGS])dnl
AS_LITERAL_IF([$1],
[m4_pushdef([gl_Positive], m4_bpatsubst([$1], [^-Wno-], [-W]))],
@@ -51,27 +53,61 @@ AS_VAR_POPDEF([gl_Warn])dnl
# ------------------------------
# Clang doesn't complain about unknown warning options unless one also
# specifies -Wunknown-warning-option -Werror. Detect this.
+#
+# The effects of this macro depend on the current language (_AC_LANG).
AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS],
+[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
+
+# Specialization for _AC_LANG = C. This macro can be AC_REQUIREd.
+# Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b.
+m4_defun([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C)],
+[
+ AC_LANG_PUSH([C])
+ gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL
+ AC_LANG_POP([C])
+])
+
+# Specialization for _AC_LANG = C++. This macro can be AC_REQUIREd.
+# Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b.
+m4_defun([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)],
+[
+ AC_LANG_PUSH([C++])
+ gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL
+ AC_LANG_POP([C++])
+])
+
+# Specialization for _AC_LANG = Objective C. This macro can be AC_REQUIREd.
+# Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b.
+m4_defun([gl_UNKNOWN_WARNINGS_ARE_ERRORS(Objective C)],
+[
+ AC_LANG_PUSH([Objective C])
+ gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL
+ AC_LANG_POP([Objective C])
+])
+
+AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL],
[gl_COMPILER_OPTION_IF([-Werror -Wunknown-warning-option],
[gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'],
[gl_unknown_warnings_are_errors=])])
-# gl_WARN_ADD(OPTION, [VARIABLE = WARN_CFLAGS],
+# gl_WARN_ADD(OPTION, [VARIABLE = WARN_CFLAGS/WARN_CXXFLAGS],
# [PROGRAM = AC_LANG_PROGRAM()])
-# ---------------------------------------------
-# Adds parameter to WARN_CFLAGS if the compiler supports it when
-# compiling PROGRAM. For example, gl_WARN_ADD([-Wparentheses]).
+# -----------------------------------------------------------
+# Adds parameter to WARN_CFLAGS/WARN_CXXFLAGS if the compiler supports it
+# when compiling PROGRAM. For example, gl_WARN_ADD([-Wparentheses]).
#
# If VARIABLE is a variable name, AC_SUBST it.
+#
+# The effects of this macro depend on the current language (_AC_LANG).
AC_DEFUN([gl_WARN_ADD],
-[AC_REQUIRE([gl_UNKNOWN_WARNINGS_ARE_ERRORS])
+[AC_REQUIRE([gl_UNKNOWN_WARNINGS_ARE_ERRORS(]_AC_LANG[)])
gl_COMPILER_OPTION_IF([$1],
- [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]), [" $1"])],
+ [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_]_AC_LANG_PREFIX[FLAGS]], [[$2]]), [" $1"])],
[],
[$3])
m4_ifval([$2],
[AS_LITERAL_IF([$2], [AC_SUBST([$2])])],
- [AC_SUBST([WARN_CFLAGS])])dnl
+ [AC_SUBST([WARN_]_AC_LANG_PREFIX[FLAGS])])dnl
])
# Local Variables:
diff --git a/m4/wchar_h.m4 b/m4/wchar_h.m4
index d0e11a0..416e0a1 100644
--- a/m4/wchar_h.m4
+++ b/m4/wchar_h.m4
@@ -1,13 +1,13 @@
dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
-dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl Written by Eric Blake.
-# wchar_h.m4 serial 40
+# wchar_h.m4 serial 42
AC_DEFUN([gl_WCHAR_H],
[
@@ -35,6 +35,8 @@ AC_DEFUN([gl_WCHAR_H],
fi
AC_SUBST([HAVE_WINT_T])
+ AC_REQUIRE([gl_TYPE_WINT_T_PREREQ])
+
dnl Check for declarations of anything we want to poison if the
dnl corresponding gnulib module is not in use.
gl_WARN_ON_USE_PREPARE([[
@@ -53,7 +55,7 @@ AC_DEFUN([gl_WCHAR_H],
wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset
wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp
wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr
- wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth
+ wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth wcsftime
])
])
@@ -61,8 +63,8 @@ dnl Check whether <wchar.h> is usable at all.
AC_DEFUN([gl_WCHAR_H_INLINE_OK],
[
dnl Test whether <wchar.h> suffers due to the transition from '__inline' to
- dnl 'gnu_inline'. See <http://sourceware.org/bugzilla/show_bug.cgi?id=4022>
- dnl and <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>. In summary,
+ dnl 'gnu_inline'. See <https://sourceware.org/bugzilla/show_bug.cgi?id=4022>
+ dnl and <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>. In summary,
dnl glibc version 2.5 or older, together with gcc version 4.3 or newer and
dnl the option -std=c99 or -std=gnu99, leads to a broken <wchar.h>.
AC_CACHE_CHECK([whether <wchar.h> uses 'inline' correctly],
@@ -120,7 +122,7 @@ This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
C99 mode. You have four options:
- Add the flag -fgnu89-inline to CC and reconfigure, or
- Fix your include files, using parts of
- <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
+ <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
- Use a gcc version older than 4.3, or
- Don't use the flags -std=c99 or -std=gnu99.
Configuration aborted.])
@@ -177,6 +179,7 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS],
GNULIB_WCSSTR=0; AC_SUBST([GNULIB_WCSSTR])
GNULIB_WCSTOK=0; AC_SUBST([GNULIB_WCSTOK])
GNULIB_WCSWIDTH=0; AC_SUBST([GNULIB_WCSWIDTH])
+ GNULIB_WCSFTIME=0; AC_SUBST([GNULIB_WCSFTIME])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC])
HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT])
@@ -215,6 +218,7 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS],
HAVE_WCSSTR=1; AC_SUBST([HAVE_WCSSTR])
HAVE_WCSTOK=1; AC_SUBST([HAVE_WCSTOK])
HAVE_WCSWIDTH=1; AC_SUBST([HAVE_WCSWIDTH])
+ HAVE_WCSFTIME=1; AC_SUBST([HAVE_WCSFTIME])
HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB])
HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH])
REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T])
@@ -230,4 +234,5 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS],
REPLACE_WCSNRTOMBS=0; AC_SUBST([REPLACE_WCSNRTOMBS])
REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH])
REPLACE_WCSWIDTH=0; AC_SUBST([REPLACE_WCSWIDTH])
+ REPLACE_WCSFTIME=0; AC_SUBST([REPLACE_WCSFTIME])
])
diff --git a/m4/wchar_t.m4 b/m4/wchar_t.m4
index 11783d2..83bc3d5 100644
--- a/m4/wchar_t.m4
+++ b/m4/wchar_t.m4
@@ -1,5 +1,5 @@
# wchar_t.m4 serial 4 (gettext-0.18.2)
-dnl Copyright (C) 2002-2003, 2008-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2008-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/wcrtomb.m4 b/m4/wcrtomb.m4
index 0aa040d..c4e4463 100644
--- a/m4/wcrtomb.m4
+++ b/m4/wcrtomb.m4
@@ -1,5 +1,5 @@
-# wcrtomb.m4 serial 11
-dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
+# wcrtomb.m4 serial 12
+dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -51,6 +51,8 @@ changequote(,)dnl
case "$host_os" in
# Guess no on AIX 4, OSF/1 and Solaris.
aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_wcrtomb_retval="guessing yes" ;;
# Guess yes otherwise.
*) gl_cv_func_wcrtomb_retval="guessing yes" ;;
esac
diff --git a/m4/wctob.m4 b/m4/wctob.m4
index 492f4c8..c7eeb5f 100644
--- a/m4/wctob.m4
+++ b/m4/wctob.m4
@@ -1,5 +1,5 @@
-# wctob.m4 serial 10
-dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
+# wctob.m4 serial 11
+dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -17,7 +17,7 @@ AC_DEFUN([gl_FUNC_WCTOB],
dnl Solaris 9 has the wctob() function but it does not work.
dnl Cygwin 1.7.2 has the wctob() function but it clobbers caller-owned
- dnl registers, see <http://cygwin.com/ml/cygwin/2010-05/msg00015.html>.
+ dnl registers, see <https://cygwin.com/ml/cygwin/2010-05/msg00015.html>.
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([gt_LOCALE_FR])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
@@ -31,6 +31,9 @@ changequote(,)dnl
# Guess no on Solaris <= 9 and Cygwin.
solaris2.[1-9] | solaris2.[1-9].* | cygwin*)
gl_cv_func_wctob_works="guessing no" ;;
+ # Guess no on native Windows.
+ mingw*)
+ gl_cv_func_wctob_works="guessing no" ;;
# Guess yes otherwise.
*) gl_cv_func_wctob_works="guessing yes" ;;
esac
diff --git a/m4/wctomb.m4 b/m4/wctomb.m4
index dc1860f..962ed84 100644
--- a/m4/wctomb.m4
+++ b/m4/wctomb.m4
@@ -1,5 +1,5 @@
# wctomb.m4 serial 2
-dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/wctype_h.m4 b/m4/wctype_h.m4
index 45ddaeb..15d1ef3 100644
--- a/m4/wctype_h.m4
+++ b/m4/wctype_h.m4
@@ -1,8 +1,8 @@
-# wctype_h.m4 serial 18
+# wctype_h.m4 serial 21
dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
-dnl Copyright (C) 2006-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -30,6 +30,8 @@ AC_DEFUN([gl_WCTYPE_H],
fi
AC_SUBST([HAVE_WINT_T])
+ AC_REQUIRE([gl_TYPE_WINT_T_PREREQ])
+
gl_CHECK_NEXT_HEADERS([wctype.h])
if test $ac_cv_header_wctype_h = yes; then
if test $ac_cv_func_iswcntrl = yes; then
@@ -51,7 +53,8 @@ AC_DEFUN([gl_WCTYPE_H],
int main () { return iswprint ('x') == 0; }
]])],
[gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no],
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
+ [dnl Guess no on Linux libc5, yes otherwise.
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
#if __GNU_LIBRARY__ == 1
Linux libc5 i18n is broken.
#endif]], [])],
diff --git a/m4/wint_t.m4 b/m4/wint_t.m4
index 65e25a4..95f6854 100644
--- a/m4/wint_t.m4
+++ b/m4/wint_t.m4
@@ -1,5 +1,5 @@
-# wint_t.m4 serial 6
-dnl Copyright (C) 2003, 2007-2017 Free Software Foundation, Inc.
+# wint_t.m4 serial 7
+dnl Copyright (C) 2003, 2007-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -60,3 +60,15 @@ AC_DEFUN([gt_TYPE_WINT_T],
fi
AC_SUBST([GNULIB_OVERRIDES_WINT_T])
])
+
+dnl Prerequisites of the 'wint_t' override.
+AC_DEFUN([gl_TYPE_WINT_T_PREREQ],
+[
+ AC_CHECK_HEADERS_ONCE([crtdefs.h])
+ if test $ac_cv_header_crtdefs_h = yes; then
+ HAVE_CRTDEFS_H=1
+ else
+ HAVE_CRTDEFS_H=0
+ fi
+ AC_SUBST([HAVE_CRTDEFS_H])
+])
diff --git a/m4/xalloc.m4 b/m4/xalloc.m4
index 53aba14..7bd360b 100644
--- a/m4/xalloc.m4
+++ b/m4/xalloc.m4
@@ -1,5 +1,5 @@
# xalloc.m4 serial 18
-dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/maint.mk b/maint.mk
index 0cabd2f..508c2f7 100644
--- a/maint.mk
+++ b/maint.mk
@@ -2,7 +2,7 @@
# This Makefile fragment tries to be general-purpose enough to be
# used by many projects via the gnulib maintainer-makefile module.
-## Copyright (C) 2001-2017 Free Software Foundation, Inc.
+## Copyright (C) 2001-2018 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
@@ -15,7 +15,7 @@
## 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/>.
+## along with this program. If not, see <https://www.gnu.org/licenses/>.
# This is reported not to work with make-3.79.1
# ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
@@ -130,8 +130,8 @@ gnu_ftp_host-stable = ftp.gnu.org
gnu_rel_host ?= $(gnu_ftp_host-$(release-type))
url_dir_list ?= $(if $(call _equal,$(gnu_rel_host),ftp.gnu.org), \
- http://ftpmirror.gnu.org/$(PACKAGE), \
- ftp://$(gnu_rel_host)/gnu/$(PACKAGE))
+ https://ftpmirror.gnu.org/$(PACKAGE), \
+ https://$(gnu_rel_host)/gnu/$(PACKAGE))
# Override this in cfg.mk if you are using a different format in your
# NEWS file.
@@ -421,6 +421,7 @@ sc_error_message_period:
sc_file_system:
@prohibit=file''system \
+ exclude='/proc/filesystems' \
ignore_case=1 \
halt='found use of "file''system"; spell it "file system"' \
$(_sc_search_regexp)
@@ -696,7 +697,7 @@ sc_prohibit_dirent_without_use:
# Prohibit the inclusion of verify.h without an actual use.
sc_prohibit_verify_without_use:
@h='verify.h' \
- re='\<(verify(true|expr)?|static_assert) *\(' \
+ re='\<(verify(true|expr)?|assume|static_assert) *\(' \
$(_sc_header_without_use)
# Don't include xfreopen.h unless you use one of its functions.
@@ -871,7 +872,7 @@ sc_GFDL_version:
$(_sc_search_regexp)
# Don't use Texinfo's @acronym{}.
-# http://lists.gnu.org/archive/html/bug-gnulib/2010-03/msg00321.html
+# https://lists.gnu.org/r/bug-gnulib/2010-03/msg00321.html
texinfo_suffix_re_ ?= \.(txi|texi(nfo)?)$$
sc_texinfo_acronym:
@prohibit='@acronym\{' \
@@ -1269,7 +1270,7 @@ sc_vulnerable_makefile_CVE-2009-4029:
halt=$$(printf '%s\n' \
'the above files are vulnerable; beware of running' \
' "make dist*" rules, and upgrade to fixed automake' \
- ' see http://bugzilla.redhat.com/542609 for details') \
+ ' see https://bugzilla.redhat.com/show_bug.cgi?id=542609 for details') \
$(_sc_search_regexp)
sc_vulnerable_makefile_CVE-2012-3386:
@@ -1278,7 +1279,7 @@ sc_vulnerable_makefile_CVE-2012-3386:
halt=$$(printf '%s\n' \
'the above files are vulnerable; beware of running' \
' "make distcheck", and upgrade to fixed automake' \
- ' see http://bugzilla.redhat.com/CVE-2012-3386 for details') \
+ ' see https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2012-3386 for details') \
$(_sc_search_regexp)
vc-diff-check:
@@ -1353,8 +1354,8 @@ release-commit:
## Updating files. ##
## ---------------- ##
-ftp-gnu = ftp://ftp.gnu.org/gnu
-www-gnu = http://www.gnu.org
+ftp-gnu = https://ftp.gnu.org/gnu
+www-gnu = https://www.gnu.org
upload_dest_dir_ ?= $(PACKAGE)
upload_command = \
@@ -1535,7 +1536,7 @@ refresh-gnulib-patches:
# Update gettext files.
PACKAGE ?= $(shell basename $(PWD))
PO_DOMAIN ?= $(PACKAGE)
-POURL = http://translationproject.org/latest/$(PO_DOMAIN)/
+POURL = https://translationproject.org/latest/$(PO_DOMAIN)/
PODIR ?= po
refresh-po:
rm -f $(PODIR)/*.po && \
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
index 65184f6..30af334 100644
--- a/po/Makefile.in.in
+++ b/po/Makefile.in.in
@@ -473,3 +473,7 @@ force:
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
+install-dvi:;
+install-ps:;
+install-pdf:;
+install-html:;
diff --git a/po/af.gmo b/po/af.gmo
index 38d4447..cc6b6ce 100644
--- a/po/af.gmo
+++ b/po/af.gmo
Binary files differ
diff --git a/po/af.po b/po/af.po
index fce9fd5..94e94b4 100644
--- a/po/af.po
+++ b/po/af.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.0.9\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
"PO-Revision-Date: 2004-01-11 21:06+0000\n"
"Last-Translator: Ysbeer <ysbeer@af.org.za>\n"
"Language-Team: Afrikaans <i18n@af.org.za>\n"
@@ -18,7 +18,7 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=n!=1;\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr ""
@@ -27,109 +27,84 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
#, fuzzy
msgid "invalid character class"
msgstr "Ongeldige karakterklasnaam"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "Ongeldige inhoud binne \\{\\}"
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
#, fuzzy
msgid "regular expression too big"
msgstr "Regex te groot"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr ""
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr ""
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
-
-#: lib/getopt.c:619
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
+msgid "%s: option '%s%s' is ambiguous\n"
msgstr ""
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
msgstr ""
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
+msgid "%s: unrecognized option '%s%s'\n"
msgstr ""
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:345
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
+msgid "%s: option '%s%s' doesn't allow an argument\n"
msgstr ""
-#: lib/getopt.c:772 lib/getopt.c:775
+#: lib/getopt.c:360
#, c-format
-msgid "%s: unrecognized option '--%s'\n"
+msgid "%s: option '%s%s' requires an argument\n"
msgstr ""
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr ""
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr ""
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
#, fuzzy
msgid "memory exhausted"
@@ -154,13 +129,13 @@ msgstr "Geheue uitgeput"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr ""
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr ""
@@ -233,7 +208,7 @@ msgstr "Regex te groot"
msgid "Unmatched ) or \\)"
msgstr "Ongepaarde ) of \\)"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Geen vorige regex nie"
@@ -262,7 +237,7 @@ msgstr ""
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -383,11 +358,11 @@ msgstr ""
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
msgstr ""
#: lib/version-etc.c:256
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
#: sed/compile.c:146
@@ -530,72 +505,76 @@ msgstr "%s: lêer %s lyn %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e uitdrukking #%lu, karakter %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, fuzzy, c-format
msgid "can't find label for jump to `%s'"
msgstr "Kan nie etiket vir sprong na `%s' kry nie"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: Kan nie %s lees nie: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, fuzzy, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "kon nie %d item na %s skryf nie: %s"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr ""
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, fuzzy, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "Kon nie tydelike lêer %s oopmaak nie: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "fout in subproses"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "opsie `e' word nie ondersteun nie"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "`e' instruksie word nie ondersteun nie"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr ""
-#: sed/regexp.c:38
+#: sed/regexp.c:39
#, fuzzy
msgid "no previous regular expression"
msgstr "Geen vorige regex nie"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, fuzzy, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "Ongeldige regterhandsverwysing \\%d vir `s' instruksie"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
@@ -615,8 +594,8 @@ msgstr ""
#: sed/sed.c:113
#, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
#: sed/sed.c:120
@@ -719,7 +698,7 @@ msgstr ""
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
#: sed/sed.c:172
diff --git a/po/ast.gmo b/po/ast.gmo
index a6c38e6..29880d5 100644
--- a/po/ast.gmo
+++ b/po/ast.gmo
Binary files differ
diff --git a/po/ast.po b/po/ast.po
index 7cd1039..9f17140 100644
--- a/po/ast.po
+++ b/po/ast.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.2.0\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
"PO-Revision-Date: 2009-11-19 21:36+0100\n"
"Last-Translator: Marquinos <maacub@gmail.com>\n"
"Language-Team: Asturian <ubuntu-l10n-ast@lists.ubuntu.com>\n"
@@ -18,7 +18,7 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr ""
@@ -27,109 +27,84 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
#, fuzzy
msgid "invalid character class"
msgstr "Caruter de nome de clase invlidu"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "Contenu invlidu de \\{\\}"
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
#, fuzzy
msgid "regular expression too big"
msgstr "Espresin regular enforma grande"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr ""
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr ""
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
-
-#: lib/getopt.c:619
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
+msgid "%s: option '%s%s' is ambiguous\n"
msgstr ""
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
msgstr ""
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
+msgid "%s: unrecognized option '%s%s'\n"
msgstr ""
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:345
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
+msgid "%s: option '%s%s' doesn't allow an argument\n"
msgstr ""
-#: lib/getopt.c:772 lib/getopt.c:775
+#: lib/getopt.c:360
#, c-format
-msgid "%s: unrecognized option '--%s'\n"
+msgid "%s: option '%s%s' requires an argument\n"
msgstr ""
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr ""
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr ""
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
#, fuzzy
msgid "memory exhausted"
@@ -154,13 +129,13 @@ msgstr "Memoria escosada"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr ""
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr ""
@@ -233,7 +208,7 @@ msgstr "Espresin regular enforma grande"
msgid "Unmatched ) or \\)"
msgstr ") O \\) ensin pareya"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Nun hai una espresin regular previa"
@@ -262,7 +237,7 @@ msgstr ""
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -383,11 +358,11 @@ msgstr ""
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
msgstr ""
#: lib/version-etc.c:256
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
#: sed/compile.c:146
@@ -514,71 +489,75 @@ msgstr "%s: ficheru %s llinia %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e espresin #%lu, caruter %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "nun se puede atopar la etiqueta pa saltar a `%s'"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: nun se puede lleer %s: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "nun se puede editar %s: ye una terminal"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "nun se puede editar %s: nun ye un ficheru regular"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "nun se puede abrir el ficheru temporal %s: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "fallu nel subprocesu"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "nun hai sofitu pa la opcin `e'"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "nun hai sofitu pa la orde `e'"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "nun hai ficheros d'entrada"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "nun hai una espresin regular previa"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "referencia \\%d invlida nel llau drechu de la orde `s'"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
@@ -598,8 +577,8 @@ msgstr ""
#: sed/sed.c:113
#, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
#: sed/sed.c:120
@@ -729,7 +708,7 @@ msgstr ""
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
#: sed/sed.c:172
diff --git a/po/bg.gmo b/po/bg.gmo
index 6ef0558..4d4aa30 100644
--- a/po/bg.gmo
+++ b/po/bg.gmo
Binary files differ
diff --git a/po/bg.po b/po/bg.po
index 2012082..6693558 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -1,13 +1,13 @@
# Bulgarian translation of sed.
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2016, 2018 Free Software Foundation, Inc.
# This file is distributed under the same license as the sed package.
-# Alexander Shopov <ash@contact.bg>, 2016.
+# Alexander Shopov <ash@kambanaria.org>, 2016, 2018.
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.2.177\n"
+"Project-Id-Version: sed 4.4.104\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
-"PO-Revision-Date: 2016-12-29 13:53+0200\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"PO-Revision-Date: 2018-03-25 12:42+0200\n"
"Last-Translator: Alexander Shopov <ash@kambanaria.org>\n"
"Language-Team: Bulgarian <dict@ludost.net>\n"
"Language: bg\n"
@@ -15,9 +15,9 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
-"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr "грешка при запис"
@@ -26,106 +26,81 @@ msgstr "грешка при запис"
msgid "preserving permissions for %s"
msgstr "запазване на правата за „%s“"
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr "„[“ без еш"
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
msgid "invalid character class"
msgstr "неправилен клас знаци"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "клас знаци се указва чрез „[[:ИМЕ:]]“, а не „[:ИМЕ:]“"
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr "незавършена екранираща последователност чрез „\\“"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
msgstr "неправилно съдържание в „\\{\\}“"
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
msgid "regular expression too big"
msgstr "прекалено голям регулярен израз"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr "„(“ без еш"
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr "не е зададен синтаксис"
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr "„)“ без еш"
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr "Неизвестна системна грешка"
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr "%s: опцията „%s“ не е еднозначна. Възможности:"
-
-#: lib/getopt.c:619
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
-msgstr "%s: опцията „%s“ не е еднозначна\n"
+msgid "%s: option '%s%s' is ambiguous\n"
+msgstr "%s: опцията „%s%s“ не е еднозначна\n"
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr "%s: опцията „--%s“ се използва без аргументи\n"
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
+msgstr "%s: опцията „%s%s“ не е еднозначна. Възможности:"
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
-msgstr "%s: опцията „%c%s“ се използва без аргументи\n"
+msgid "%s: unrecognized option '%s%s'\n"
+msgstr "%s: непозната опция „%s%s“\n"
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:345
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
-msgstr "%s: опцията „--%s“ изисква аргумент\n"
+msgid "%s: option '%s%s' doesn't allow an argument\n"
+msgstr "%s: опцията „%s%s“ се използва без аргументи\n"
-#: lib/getopt.c:772 lib/getopt.c:775
+#: lib/getopt.c:360
#, c-format
-msgid "%s: unrecognized option '--%s'\n"
-msgstr "%s: непозната опция „--%s“\n"
+msgid "%s: option '%s%s' requires an argument\n"
+msgstr "%s: опцията „%s%s“ изисква аргумент\n"
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr "%s: непозната опция „%c%s“\n"
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr "%s: неправилна опция — „%c“\n"
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr "%s: опцията изисква аргумент — „%c“\n"
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr "%s: опцията „-W %s“ не е еднозначна\n"
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr "%s: опцията „-W %s“ се използва без аргументи\n"
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr "%s: опцията „-W %s“ изисква аргумент\n"
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
msgid "memory exhausted"
msgstr "паметта е изчерпана"
@@ -149,13 +124,13 @@ msgstr "паметта е изчерпана"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr "„"
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr "“"
@@ -227,7 +202,7 @@ msgstr "Регулярният израз е прекалено голям"
msgid "Unmatched ) or \\)"
msgstr "„)“ или „\\)“ без еш"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Няма предхождащ регулярен израз"
@@ -256,7 +231,7 @@ msgstr "©"
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -267,7 +242,7 @@ msgstr ""
"Фондацията\n"
"за свободен софтуер — версия 3 на лиценза или (по ваше решение) по-късна "
"версия.\n"
-"<http://gnu.org/licenses/gpl.html>\n"
+"<https://gnu.org/licenses/gpl.html>\n"
"Тази програма е свободен софтуер. Можете да я разпространявате и/или "
"променяте.\n"
"Тя се разпространява БЕЗ НИКАКВИ ГАРАНЦИИ доколкото е позволено от закона.\n"
@@ -406,12 +381,12 @@ msgstr "Уеб страница на „%s“: <%s>\n"
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
-msgstr "Уеб страница на „%s“: <http://www.gnu.org/software/%s/>\n"
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+msgstr "Уеб страница на „%s“: <https://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
-msgstr "Обща помощ за програмите на GNU: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
+msgstr "Обща помощ за програмите на GNU: <https://www.gnu.org/gethelp/>\n"
#: sed/compile.c:146
msgid "multiple `!'s"
@@ -536,74 +511,78 @@ msgstr "%s: файл „%s“, ред %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e израз №%lu, знак %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "етикетът „%s“, към който трябва да се премине, липсва"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr "смяната на регистъра доведе до неправилен знак"
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: не може да се чете от „%s“: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "„%s“ не може да се редактира, защото е терминал"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "„%s“ не може да се редактира, защото не е нормален файл"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: ПРЕДУПРЕЖДЕНИЕ: на „%s“ не може да се зададе стандартният контекст при "
"създаване на файлове: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
"%s: ПРЕДУПРЕЖДЕНИЕ: контекстът за сигурност на „%s“ не може да се получи: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "временният файл „%s“ не може да се отвори: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "грешка в подпроцеса"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "опцията „e“ не се поддържа"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "командата „e“ не се поддържа"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "не са зададени входни файлове"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "няма предишен регулярен израз"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "неправилен указател „\\%d“ в дясната страна на командата „s“"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr "дължината на входния буфер за регулярния израз е повече от INT_MAX"
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
@@ -623,10 +602,10 @@ msgstr "Paolo Bonzini"
#: sed/sed.c:113
#, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
-"Уеб страница на GNU sed: <http://www.gnu.org/software/sed/>.\n"
+"Уеб страница на GNU sed: <https://www.gnu.org/software/sed/>.\n"
"Обща помощ за използването на софтуера от GNU: <http://www.gnu.org/gethelp/"
">.\n"
@@ -760,12 +739,10 @@ msgstr ""
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
" --sandbox\n"
-" безопасен режим (без командите „r“/„w“/„e“. Ползват се "
-"само\n"
-" файлове зададени през командния ред)\n"
+" безопасен режим (без командите „e“/„r“/„w“.\n"
#: sed/sed.c:172
#, c-format
diff --git a/po/ca.gmo b/po/ca.gmo
index ab6f551..7c26b16 100644
--- a/po/ca.gmo
+++ b/po/ca.gmo
Binary files differ
diff --git a/po/ca.po b/po/ca.po
index c224fc5..09a8882 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.2.1\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
"PO-Revision-Date: 2010-11-04 23:28+0100\n"
"Last-Translator: Jordi Mallach <jordi@gnu.org>\n"
"Language-Team: Catalan <ca@dodds.net>\n"
@@ -18,7 +18,7 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=n!=1;\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr ""
@@ -27,109 +27,84 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
#, fuzzy
msgid "invalid character class"
msgstr "Nom de classe de carcter no vlid"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "El contingut de \\{\\} no s vlid"
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
#, fuzzy
msgid "regular expression too big"
msgstr "L'expressi regular s massa gran"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr ""
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr ""
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
-
-#: lib/getopt.c:619
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
+msgid "%s: option '%s%s' is ambiguous\n"
msgstr ""
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
msgstr ""
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
+msgid "%s: unrecognized option '%s%s'\n"
msgstr ""
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:345
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
+msgid "%s: option '%s%s' doesn't allow an argument\n"
msgstr ""
-#: lib/getopt.c:772 lib/getopt.c:775
+#: lib/getopt.c:360
#, c-format
-msgid "%s: unrecognized option '--%s'\n"
+msgid "%s: option '%s%s' requires an argument\n"
msgstr ""
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr ""
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr ""
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
#, fuzzy
msgid "memory exhausted"
@@ -154,13 +129,13 @@ msgstr "Memria exhaurida"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr ""
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr ""
@@ -233,7 +208,7 @@ msgstr "L'expressi regular s massa gran"
msgid "Unmatched ) or \\)"
msgstr ") o \\) no emparellat"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "No hi ha una expressi regular prvia"
@@ -262,7 +237,7 @@ msgstr ""
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -383,12 +358,12 @@ msgstr ""
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
msgstr ""
#: lib/version-etc.c:256
#, fuzzy
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
"Pgina inicial del GNU sed: <http://www.gnu.org/software/sed/>.\n"
"Ajuda general sobre l's de programari GNU: <http://www.gnu.org/gethelp/>.\n"
@@ -517,73 +492,77 @@ msgstr "%s: fitxer %s lnia %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expressi #%lu, carcter %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "no es troba l'etiqueta per al salt a %s"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: no es pot llegir %s: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "no s'ha pogut editar %s: s un terminal"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "no s'ha pogut editar %s: no s un fitxer regular"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: avs: no s'ha pogut establir el context de creaci de fitxers per "
"defecte a %s: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: avs: no s'ha pogut obtenir el context de seguretat de %s: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "no s'ha pogut obrir el fitxer temporal %s: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "s'ha produt un error en el subprocs"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "l'opci e no est suportada"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "l'ordre e no est suportada"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "no hi ha fitxers d'entrada"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "no hi ha una expressi regular prvia"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "referncia \\%d no vlida en el costat dret de l'ordre s"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
@@ -601,10 +580,10 @@ msgid "Paolo Bonzini"
msgstr ""
#: sed/sed.c:113
-#, c-format
+#, fuzzy, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
"Pgina inicial del GNU sed: <http://www.gnu.org/software/sed/>.\n"
"Ajuda general sobre l's de programari GNU: <http://www.gnu.org/gethelp/>.\n"
@@ -737,7 +716,7 @@ msgstr ""
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
#: sed/sed.c:172
diff --git a/po/cs.gmo b/po/cs.gmo
index 3bc2c4c..f40c733 100644
--- a/po/cs.gmo
+++ b/po/cs.gmo
Binary files differ
diff --git a/po/cs.po b/po/cs.po
index e4a8fd7..f53fece 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -2,14 +2,14 @@
# Copyright (C) 1998 Free Software Foundation, Inc.
# This file is distributed under the same license as the sed package.
# Jaroslav Fojtik <fojtik@cmp.felk.cvut.cz>, 1998.
-# Petr Pisar <petr.pisar@atlas.cz>, 2008, 2010, 2016.
+# Petr Pisar <petr.pisar@atlas.cz>, 2008, 2010, 2016, 2017, 2018.
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.2\n"
+"Project-Id-Version: sed 4.4.104\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
-"PO-Revision-Date: 2016-06-19 20:26+02:00\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"PO-Revision-Date: 2018-03-25 20:06+02:00\n"
"Last-Translator: Petr Pisar <petr.pisar@atlas.cz>\n"
"Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n"
"Language: cs\n"
@@ -19,122 +19,93 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
-msgstr ""
+msgstr "chyba zápisu"
#: lib/copy-acl.c:54
#, c-format
msgid "preserving permissions for %s"
-msgstr ""
+msgstr "zachovávají se práva pro %s"
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
-msgstr ""
+msgstr "nepárová ["
-#: lib/dfa.c:1071
-#, fuzzy
+#: lib/dfa.c:1079
msgid "invalid character class"
-msgstr "Chybný název třídu znaků"
+msgstr "chybná třída znaků"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
-msgstr ""
+msgstr "skladba pro třídu znaků je [[:space:]], nikoliv [:space:]"
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
-msgstr ""
+msgstr "neukončená posloupnost \\"
-#: lib/dfa.c:1436
-#, fuzzy
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
-msgstr "Chybný obsah \\{\\}"
+msgstr "chybný obsah \\{\\}"
-#: lib/dfa.c:1439
-#, fuzzy
+#: lib/dfa.c:1436
msgid "regular expression too big"
-msgstr "Regulární výraz je příliš velký"
+msgstr "regulární výraz je příliš velký"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
-msgstr ""
+msgstr "nepárová ("
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
-msgstr ""
+msgstr "nezadána žádná skladba"
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
-msgstr ""
+msgstr "nepárová )"
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
-msgstr ""
-
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
-
-#: lib/getopt.c:619
-#, c-format
-msgid "%s: option '%s' is ambiguous\n"
-msgstr ""
+msgstr "Neznámá chyba systému"
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr ""
+msgid "%s: option '%s%s' is ambiguous\n"
+msgstr "%s: přepínač „%s%s“ není jednoznačný\n"
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
-msgstr ""
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
+msgstr "%s: přepínač „%s%s“ není jednoznačný, možnosti:"
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
-msgstr ""
+msgid "%s: unrecognized option '%s%s'\n"
+msgstr "%s: nerozpoznaný přepínač „%s%s“\n"
-#: lib/getopt.c:772 lib/getopt.c:775
+#: lib/getopt.c:345
#, c-format
-msgid "%s: unrecognized option '--%s'\n"
-msgstr ""
+msgid "%s: option '%s%s' doesn't allow an argument\n"
+msgstr "%s: přepínač „%s%s“ nedovoluje argument\n"
-#: lib/getopt.c:783 lib/getopt.c:786
+#: lib/getopt.c:360
#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
+msgid "%s: option '%s%s' requires an argument\n"
+msgstr "%s: přepínač „%s%s“ vyžaduje argument\n"
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
-msgstr ""
+msgstr "%s: neplatný přepínač ­­ „%c“\n"
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
-msgstr ""
-
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
+msgstr "%s: přepínač vyžaduje argument – „%c“\n"
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
-#, fuzzy
msgid "memory exhausted"
-msgstr "Paměť vyčerpána"
+msgstr "paměť vyčerpána"
#. TRANSLATORS:
#. Get translations for open and closing quotation marks.
@@ -155,15 +126,15 @@ msgstr "Paměť vyčerpána"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
-msgstr ""
+msgstr "„"
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
-msgstr ""
+msgstr "“"
#: lib/regcomp.c:135
msgid "Success"
@@ -194,9 +165,8 @@ msgid "Invalid back reference"
msgstr "Chybný zpětný odkaz"
#: lib/regcomp.c:156
-#, fuzzy
msgid "Unmatched [, [^, [:, [., or [="
-msgstr "Neodpovídající [ nebo [^"
+msgstr "Neodpovídající [, [^, [:, [. nebo [="
#: lib/regcomp.c:159
msgid "Unmatched ( or \\("
@@ -234,59 +204,64 @@ msgstr "Regulární výraz je příliš velký"
msgid "Unmatched ) or \\)"
msgstr "Neodpovídající ) nebo \\)"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Žádný předcházející regulární výraz"
#: lib/set-acl.c:46
#, c-format
msgid "setting permissions for %s"
-msgstr ""
+msgstr "nastavují se práva pro %s"
#: lib/version-etc.c:74
#, c-format
msgid "Packaged by %s (%s)\n"
-msgstr ""
+msgstr "Zabalil(a) %s (%s)\n"
#: lib/version-etc.c:77
#, c-format
msgid "Packaged by %s\n"
-msgstr ""
+msgstr "Zabalil(a) %s\n"
#. TRANSLATORS: Translate "(C)" to the copyright symbol
#. (C-in-a-circle), if this symbol is available in the user's
#. locale. Otherwise, do not translate "(C)"; leave it as-is.
#: lib/version-etc.c:84
msgid "(C)"
-msgstr ""
+msgstr "©"
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
"\n"
msgstr ""
+"\n"
+"License GPLv3 GNU GPL verze 3 nebo novější <https://gnu.org/licenses/gpl."
+"html>.\n"
+"Toto je svobodné programové vybavení: máte právo jej měnit a šířit.\n"
+"Není zde ŽÁDNÁ ZÁRUKA, jak jen zákon dovoluje.\n"
#. TRANSLATORS: %s denotes an author name.
#: lib/version-etc.c:102
#, c-format
msgid "Written by %s.\n"
-msgstr ""
+msgstr "Napsal(a) %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#: lib/version-etc.c:106
#, c-format
msgid "Written by %s and %s.\n"
-msgstr ""
+msgstr "Napsali %s a %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#: lib/version-etc.c:110
#, c-format
msgid "Written by %s, %s, and %s.\n"
-msgstr ""
+msgstr "Napsali %s, %s a %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -297,6 +272,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"and %s.\n"
msgstr ""
+"Napsali %s, %s, %s,\n"
+"a %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -307,6 +284,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, and %s.\n"
msgstr ""
+"Napsali %s, %s, %s,\n"
+"%s a %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -317,6 +296,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, %s, and %s.\n"
msgstr ""
+"Napsali %s, %s, %s,\n"
+"%s, %s a %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -327,6 +308,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, %s, %s, and %s.\n"
msgstr ""
+"Napsali %s, %s, %s,\n"
+"%s, %s, %s a %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -338,6 +321,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"and %s.\n"
msgstr ""
+"Napsali %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"a %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -349,6 +335,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"%s, and %s.\n"
msgstr ""
+"Napsali %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s a %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -360,6 +349,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"%s, %s, and others.\n"
msgstr ""
+"Napsali %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s a další.\n"
#. TRANSLATORS: The placeholder indicates the bug-reporting address
#. for this package. Please add _another line_ saying
@@ -371,28 +363,30 @@ msgid ""
"\n"
"Report bugs to: %s\n"
msgstr ""
+"\n"
+"Chyby v programu hlaste anglicky na: %s\n"
+"Chyba v překladu hlaste česky na: <translation-team-cs@lists.sourceforge."
+"net>\n"
#: lib/version-etc.c:247
#, c-format
msgid "Report %s bugs to: %s\n"
-msgstr ""
+msgstr "Hlaste chyby %s na: %s\n"
#: lib/version-etc.c:251
#, c-format
msgid "%s home page: <%s>\n"
-msgstr ""
+msgstr "Domovská stránka %s: <%s>\n"
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
-msgstr ""
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+msgstr "Domovská stránka %s: <https://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
-#, fuzzy
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
-"Domovská stránka GNU sed: <http://www.gnu.org/software/sed/>.\n"
-"Obecný návod jak používat software GNU: <http://www.gnu.org/gethelp/>.\n"
+"Obecný návod jak používat software GNU: <https://www.gnu.org/gethelp/>.\n"
#: sed/compile.c:146
msgid "multiple `!'s"
@@ -501,11 +495,11 @@ msgstr "neúplný příkaz"
#: sed/compile.c:188
msgid "\":\" lacks a label"
-msgstr ""
+msgstr "„:“ postrádá jmenovku"
#: sed/compile.c:190
msgid "recursive escaping after \\c not allowed"
-msgstr ""
+msgstr "rekurzivní escapování po \\c není dovoleno"
#: sed/compile.c:213
#, c-format
@@ -517,72 +511,76 @@ msgstr "%s: soubor %s, řádek %'lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e výraz č. %'lu, znak %'lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "návěští pro skok na „%s“ nelze najít"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
-msgstr ""
+msgstr "převod velikosti písmene vytvořil neplatný znak"
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %s nelze číst: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "%s nelze upravovat: je to terminál"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "%s nelze upravovat: není obyčejným souborem"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: pozor: nastavení výchozího kontextu pro tvorbu souboru na %s selhalo: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: pozor: nepodařilo se získat bezpečnostní kontext %s: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "dočasný soubor %s nelze otevřít: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "chyba v podprocesu"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "přepínač „e“ není podporován"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "příkaz „e“ není podporován"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "žádné vstupní soubory"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "žádný předcházející regulární výraz"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "chybný odkaz \\%d na pravé straně příkazu „s“"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr "délka vstupního pole pro regulární výraz je větší než INT_MAX"
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
@@ -602,16 +600,16 @@ msgstr "Paolo Bonzini"
#: sed/sed.c:113
#, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
-"Domovská stránka GNU sed: <http://www.gnu.org/software/sed/>.\n"
-"Obecný návod jak používat software GNU: <http://www.gnu.org/gethelp/>.\n"
+"Domovská stránka GNU sed: <https://www.gnu.org/software/sed/>.\n"
+"Obecný návod jak používat software GNU: <https://www.gnu.org/gethelp/>.\n"
#: sed/sed.c:120
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
-msgstr ""
+msgstr "Chybové zprávy zasílejte e-mailem na: <%s>\n"
#: sed/sed.c:129
msgid ""
@@ -708,17 +706,18 @@ msgstr ""
" vypne všechna GNU rozšíření\n"
#: sed/sed.c:161
-#, fuzzy, c-format
+#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
" use extended regular expressions in the script\n"
" (for portability use POSIX -E).\n"
msgstr ""
-" -r, --regexp-extended\n"
+" -E, r, --regexp-extended\n"
" použije rozšířené regulární výrazy\n"
+" (kvůli přenositelnosti použijte posixový -E).\n"
#: sed/sed.c:167
-#, fuzzy, c-format
+#, c-format
msgid ""
" -s, --separate\n"
" consider files as separate rather than as a single,\n"
@@ -726,16 +725,16 @@ msgid ""
msgstr ""
" -s, --separate\n"
" považuje soubory za samostatné a ne za jeden dlouhý\n"
-" souvislý proud\n"
+" souvislý proud.\n"
#: sed/sed.c:170
-#, fuzzy, c-format
+#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
-" -z, --null-data\n"
-" oddělí řádky znaky NUL\n"
+" --sandbox\n"
+" pracuje v režimu pískoviště (vypne příkazy e, r, w).\n"
#: sed/sed.c:172
#, c-format
@@ -802,12 +801,12 @@ msgid "couldn't attach to %s: %s"
msgstr "do %s nelze připisovat: %s"
#: sed/utils.c:192
-#, fuzzy, c-format
+#, c-format
msgid "couldn't write %llu item to %s: %s"
msgid_plural "couldn't write %llu items to %s: %s"
-msgstr[0] "do %2$s nelze zapsat %1$d položku: %3$s"
-msgstr[1] "do %2$s nelze zapsat %1$d položky: %3$s"
-msgstr[2] "do %2$s nelze zapsat %1$d položek: %3$s"
+msgstr[0] "do %2$s nelze zapsat %1$llu položku: %3$s"
+msgstr[1] "do %2$s nelze zapsat %1$llu položky: %3$s"
+msgstr[2] "do %2$s nelze zapsat %1$llu položek: %3$s"
#: sed/utils.c:204 sed/utils.c:223
#, c-format
@@ -829,6 +828,21 @@ msgstr "o %s nelze získat údaje: %s"
msgid "cannot rename %s: %s"
msgstr "%s nelze přejmenovat: %s"
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: přepínač „­­%s“ nedovoluje argument\n"
+
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: nerozpoznaný přepínač „--%s“\n"
+
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: přepínač „-W %s“ není jednoznačný\n"
+
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: přepínač „-W %s“ nedovoluje argument\n"
+
+#~ msgid "%s: option '-W %s' requires an argument\n"
+#~ msgstr "%s: přepínač „-W %s“ vyžaduje argument\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr "prázdný regulární výraz nemůže mít modifikátory"
diff --git a/po/da.gmo b/po/da.gmo
index a89c1ca..e9cb4da 100644
--- a/po/da.gmo
+++ b/po/da.gmo
Binary files differ
diff --git a/po/da.po b/po/da.po
index 356d271..9bfbe9f 100644
--- a/po/da.po
+++ b/po/da.po
@@ -1,15 +1,15 @@
# Danish messages for sed
# This file is distributed under the same license as the sed package.
-# Copyright (C) 2001, 2016 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2016, 2017 Free Software Foundation, Inc.
#
# Byrial Ole Jensen <byrial@image.dk>, 2001-2003.
-# Ask Hjorth Larsen <asklarsen@gmail.com>, 2010, 2016.
+# Ask Hjorth Larsen <asklarsen@gmail.com>, 2010, 2016, 2017.
msgid ""
msgstr ""
-"Project-Id-Version: sed-4.2.2\n"
+"Project-Id-Version: sed-4.2.2.177\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
-"PO-Revision-Date: 2016-10-15 19:06+0200\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"PO-Revision-Date: 2017-02-06 14:29+0100\n"
"Last-Translator: Ask Hjorth Larsen <asklarsen@gmail.com>\n"
"Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
"Language: da\n"
@@ -19,122 +19,93 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
-msgstr ""
+msgstr "skrivefejl"
#: lib/copy-acl.c:54
#, c-format
msgid "preserving permissions for %s"
-msgstr ""
+msgstr "beholder tilladelser for %s"
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
-msgstr ""
+msgstr "uparret ["
-#: lib/dfa.c:1071
-#, fuzzy
+#: lib/dfa.c:1079
msgid "invalid character class"
-msgstr "Ugyldigt navn på tegnklasse"
+msgstr "ugyldig tegnklasse"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
-msgstr ""
+msgstr "tegnklassesyntaks er [[:space:]], ikke [:space:]"
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
-msgstr ""
+msgstr "ufærdig \\-undvigesekvens"
-#: lib/dfa.c:1436
-#, fuzzy
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
-msgstr "Ugyldigt indhold af \\{\\}"
+msgstr "ugyldigt indhold af \\{\\}"
-#: lib/dfa.c:1439
-#, fuzzy
+#: lib/dfa.c:1436
msgid "regular expression too big"
-msgstr "Regulært udtryk for stort"
+msgstr "regulært udtryk for stort"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
-msgstr ""
+msgstr "uparret ("
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
-msgstr ""
+msgstr "ingen syntaks angivet"
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
-msgstr ""
+msgstr "uparret )"
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
-msgstr ""
-
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
-
-#: lib/getopt.c:619
-#, c-format
-msgid "%s: option '%s' is ambiguous\n"
-msgstr ""
+msgstr "Ukendt systemfejl"
-#: lib/getopt.c:654 lib/getopt.c:658
-#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr ""
+#: lib/getopt.c:278
+#, fuzzy, c-format
+msgid "%s: option '%s%s' is ambiguous\n"
+msgstr "%s: tilvalget \"%s\" er flertydigt\n"
-#: lib/getopt.c:667 lib/getopt.c:672
-#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
-msgstr ""
+#: lib/getopt.c:284
+#, fuzzy, c-format
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
+msgstr "%s: tilvalget \"%s\" er flertydigt; muligheder:"
-#: lib/getopt.c:715 lib/getopt.c:734
-#, c-format
-msgid "%s: option '--%s' requires an argument\n"
-msgstr ""
+#: lib/getopt.c:319
+#, fuzzy, c-format
+msgid "%s: unrecognized option '%s%s'\n"
+msgstr "%s: ukendt tilvalg \"%c%s\"\n"
-#: lib/getopt.c:772 lib/getopt.c:775
-#, c-format
-msgid "%s: unrecognized option '--%s'\n"
-msgstr ""
+#: lib/getopt.c:345
+#, fuzzy, c-format
+msgid "%s: option '%s%s' doesn't allow an argument\n"
+msgstr "%s: tilvalget \"%c%s\" tillader ikke noget argument\n"
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
+#: lib/getopt.c:360
+#, fuzzy, c-format
+msgid "%s: option '%s%s' requires an argument\n"
+msgstr "%s: tilvalget \"--%s\" kræver et argument\n"
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
-msgstr ""
+msgstr "%s: ugyldigt tilvalg -- \"%c\"\n"
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
-msgstr ""
-
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
+msgstr "%s: tilvalg kræver et argument -- \"%c\"\n"
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
-#, fuzzy
msgid "memory exhausted"
-msgstr "Hukommelsen opbrugt"
+msgstr "hukommelsen opbrugt"
#. TRANSLATORS:
#. Get translations for open and closing quotation marks.
@@ -155,15 +126,15 @@ msgstr "Hukommelsen opbrugt"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
-msgstr ""
+msgstr "\""
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
-msgstr ""
+msgstr "\""
#: lib/regcomp.c:135
msgid "Success"
@@ -194,9 +165,8 @@ msgid "Invalid back reference"
msgstr "Ugyldig reference bagud"
#: lib/regcomp.c:156
-#, fuzzy
msgid "Unmatched [, [^, [:, [., or [="
-msgstr "Uparret [ eller [^"
+msgstr "Uparret [, [^, [:, [. eller [="
#: lib/regcomp.c:159
msgid "Unmatched ( or \\("
@@ -234,59 +204,66 @@ msgstr "Regulært udtryk for stort"
msgid "Unmatched ) or \\)"
msgstr "Uparret ) eller \\)"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Intet forudgående regulært udtryk"
#: lib/set-acl.c:46
#, c-format
msgid "setting permissions for %s"
-msgstr ""
+msgstr "angiver tilladelser for %s"
#: lib/version-etc.c:74
#, c-format
msgid "Packaged by %s (%s)\n"
-msgstr ""
+msgstr "Pakket af %s (%s)\n"
#: lib/version-etc.c:77
#, c-format
msgid "Packaged by %s\n"
-msgstr ""
+msgstr "Pakket af %s\n"
#. TRANSLATORS: Translate "(C)" to the copyright symbol
#. (C-in-a-circle), if this symbol is available in the user's
#. locale. Otherwise, do not translate "(C)"; leave it as-is.
#: lib/version-etc.c:84
msgid "(C)"
-msgstr ""
+msgstr "©"
#: lib/version-etc.c:86
+#, fuzzy
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
"\n"
msgstr ""
+"\n"
+"Licens GPLv3+: GNU GPL version 3 eller nyere <http://gnu.org/licenses/gpl."
+"html>.\n"
+"Dette er fri software: Du kan frit ændre og videredistribuere det.\n"
+"Der er INGEN GARANTI så vidt loven tillader.\n"
+"\n"
#. TRANSLATORS: %s denotes an author name.
#: lib/version-etc.c:102
#, c-format
msgid "Written by %s.\n"
-msgstr ""
+msgstr "Skrevet af %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#: lib/version-etc.c:106
#, c-format
msgid "Written by %s and %s.\n"
-msgstr ""
+msgstr "Skrevet af %s og %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#: lib/version-etc.c:110
#, c-format
msgid "Written by %s, %s, and %s.\n"
-msgstr ""
+msgstr "Skrevet af %s, %s og %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -297,6 +274,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"and %s.\n"
msgstr ""
+"Skrevet af %s, %s, %s\n"
+"og %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -307,6 +286,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, and %s.\n"
msgstr ""
+"Skrevet af %s, %s, %s,\n"
+"%s og %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -317,6 +298,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, %s, and %s.\n"
msgstr ""
+"Skrevet af %s, %s, %s,\n"
+"%s, %s og %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -327,6 +310,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, %s, %s, and %s.\n"
msgstr ""
+"Skrevet af %s, %s, %s,\n"
+"%s, %s, %s og %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -338,6 +323,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"and %s.\n"
msgstr ""
+"Skrevet af %s, %s, %s,\n"
+"%s, %s, %s, %s\n"
+"og %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -349,6 +337,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"%s, and %s.\n"
msgstr ""
+"Skrevet af %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s og %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -360,6 +351,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"%s, %s, and others.\n"
msgstr ""
+"Skrevet af %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s med flere.\n"
#. TRANSLATORS: The placeholder indicates the bug-reporting address
#. for this package. Please add _another line_ saying
@@ -371,28 +365,30 @@ msgid ""
"\n"
"Report bugs to: %s\n"
msgstr ""
+"\n"
+"Rapportér fejl til: %s\n"
+"\n"
+"Rapportér oversættelsesfejl til Dansk-gruppen <dansk@dansk-gruppen.dk>\n"
#: lib/version-etc.c:247
#, c-format
msgid "Report %s bugs to: %s\n"
-msgstr ""
+msgstr "Rapportér fejl i %s til: %s\n"
#: lib/version-etc.c:251
#, c-format
msgid "%s home page: <%s>\n"
-msgstr ""
+msgstr "Hjemmeside for %s: <%s>\n"
#: lib/version-etc.c:253
-#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
-msgstr ""
+#, fuzzy, c-format
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+msgstr "Hjemmeside for %s: <http://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
#, fuzzy
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
-msgstr ""
-"Hjemmeside for GNU sed: <http://www.gnu.org/software/sed/>.\n"
-"Generel hjælp til GNU-programmer: <http://www.gnu.org/gethelp/>.\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
+msgstr "Generel hjælp til GNU-programmer: <http://www.gnu.org/gethelp/>\n"
#: sed/compile.c:146
msgid "multiple `!'s"
@@ -501,11 +497,11 @@ msgstr "ufuldstændig kommando"
#: sed/compile.c:188
msgid "\":\" lacks a label"
-msgstr ""
+msgstr "\":\" mangler en etiket"
#: sed/compile.c:190
msgid "recursive escaping after \\c not allowed"
-msgstr ""
+msgstr "rekursiv undvigesekvens efter \\c tillades ikke"
#: sed/compile.c:213
#, c-format
@@ -517,72 +513,76 @@ msgstr "%s: fil %s, linje %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e udtryk nr. %lu, tegn %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "kan ikke finde etiket for hop til '%s'"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
-msgstr ""
+msgstr "konvertering mellem store og små bogstaver gav et ugyldigt tegn"
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: kan ikke læse %s: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "kunne ikke redigere %s: er en terminal"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "kunne ikke redigere %s: ikke en regulær fil"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: advarsel: kunne ikke sætte standardkontekst for filoprettelse til %s: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: advarsel: kunne ikke hente sikkerhedskontekst for %s: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "kunne ikke åbne midlertidig fil %s: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "fejl i underproces"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "tilvalg 'e' er ikke understøttet"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "'e'-kommando er ikke understøttet"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "ingen inddatafiler"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "intet forudgående regulært udtryk"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "ugyldig reference \\%d på 's'-kommandos højreside"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
@@ -600,10 +600,10 @@ msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
#: sed/sed.c:113
-#, c-format
+#, fuzzy, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
"Hjemmeside for GNU sed: <http://www.gnu.org/software/sed/>.\n"
"Generel hjælp til GNU-programmer: <http://www.gnu.org/gethelp/>.\n"
@@ -611,7 +611,7 @@ msgstr ""
#: sed/sed.c:120
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
-msgstr ""
+msgstr "Send fejlrapporter til: <%s>.\n"
#: sed/sed.c:129
msgid ""
@@ -705,18 +705,20 @@ msgstr ""
" --posix\n"
" slå alle GNU-udvidelser fra.\n"
+# findes der en bedre oversættelse af portable? Portabilitet?
#: sed/sed.c:161
-#, fuzzy, c-format
+#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
" use extended regular expressions in the script\n"
" (for portability use POSIX -E).\n"
msgstr ""
-" -r, --regexp-extended\n"
-" brug udvidede regulære udtryk i scriptet.\n"
+" -E, -r, --regexp-extended\n"
+" brug udvidede regulære udtryk i scriptet\n"
+" (brug -E fra POSIX for platformsuafhængighed)\n"
#: sed/sed.c:167
-#, fuzzy, c-format
+#, c-format
msgid ""
" -s, --separate\n"
" consider files as separate rather than as a single,\n"
@@ -731,10 +733,10 @@ msgstr ""
#, fuzzy, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
-" -z, --null-data\n"
-" adskil linjer med NUL-tegn\n"
+" --sandbox\n"
+" kør i sandkassetilstand.\n"
#: sed/sed.c:172
#, c-format
@@ -801,11 +803,11 @@ msgid "couldn't attach to %s: %s"
msgstr "kunne ikke vedhæfte til %s: %s"
#: sed/utils.c:192
-#, fuzzy, c-format
+#, c-format
msgid "couldn't write %llu item to %s: %s"
msgid_plural "couldn't write %llu items to %s: %s"
-msgstr[0] "kunne ikke skrive %d element til %s: %s"
-msgstr[1] "kunne ikke skrive %d elementer til %s: %s"
+msgstr[0] "kunne ikke skrive %llu element til %s: %s"
+msgstr[1] "kunne ikke skrive %llu elementer til %s: %s"
#: sed/utils.c:204 sed/utils.c:223
#, c-format
@@ -827,6 +829,21 @@ msgstr "kan ikke køre stat på %s: %s"
msgid "cannot rename %s: %s"
msgstr "kan ikke omdøbe %s: %s"
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: tilvalget \"--%s\" tillader ikke noget argument\n"
+
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: ukendt tilvalg \"--%s\"\n"
+
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: tilvalget \"-W %s\" er flertydigt\n"
+
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: tilvalget \"-W %s\" tillader ikke noget argument\n"
+
+#~ msgid "%s: option '-W %s' requires an argument\n"
+#~ msgstr "%s: tilvalget \"-W %s\" kræver et argument\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr "kan ikke angive modifikatorer på tomt regulært udtryk"
diff --git a/po/de.gmo b/po/de.gmo
index 6e6f5c8..f5a7ece 100644
--- a/po/de.gmo
+++ b/po/de.gmo
Binary files differ
diff --git a/po/de.po b/po/de.po
index c16f152..9262652 100644
--- a/po/de.po
+++ b/po/de.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.2.2.177\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
"PO-Revision-Date: 2016-12-10 23:42+0100\n"
"Last-Translator: Walter Koch <koch@u32.de>\n"
"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
@@ -20,7 +20,7 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr "Schreibfehler"
@@ -29,106 +29,81 @@ msgstr "Schreibfehler"
msgid "preserving permissions for %s"
msgstr "behalte Rechte für %s bei"
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr "nicht geschlossenes ["
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
msgid "invalid character class"
msgstr "Ungültige Zeichenklasse"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "Die Syntax für Zeichenklasse lautet [[:space:]], nicht [:space:]"
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr "nicht bendete \\-Escapesequenz"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
msgstr "Ungültiger Inhalt in \\{\\}"
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
msgid "regular expression too big"
msgstr "Regulärer Ausdruck ist zu groß"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr "nicht geschlossenes ("
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr "keine Syntax angegeben"
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr "nicht geschlossens )"
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr "Unbekannter Systemfehler"
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr "%s: Option '%s' ist mehrdeutig; Möglichkeiten:"
-
-#: lib/getopt.c:619
-#, c-format
-msgid "%s: option '%s' is ambiguous\n"
+#: lib/getopt.c:278
+#, fuzzy, c-format
+msgid "%s: option '%s%s' is ambiguous\n"
msgstr "%s: Option '%s' ist mehrdeutig\n"
-#: lib/getopt.c:654 lib/getopt.c:658
-#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr "%s: Option '--%s' darf kein Argument haben\n"
+#: lib/getopt.c:284
+#, fuzzy, c-format
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
+msgstr "%s: Option '%s' ist mehrdeutig; Möglichkeiten:"
-#: lib/getopt.c:667 lib/getopt.c:672
-#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
+#: lib/getopt.c:319
+#, fuzzy, c-format
+msgid "%s: unrecognized option '%s%s'\n"
+msgstr "%s: nicht erkannte Option '%c%s'\n"
+
+#: lib/getopt.c:345
+#, fuzzy, c-format
+msgid "%s: option '%s%s' doesn't allow an argument\n"
msgstr "%s: Option '%c%s' darf kein Argument haben\n"
-#: lib/getopt.c:715 lib/getopt.c:734
-#, c-format
-msgid "%s: option '--%s' requires an argument\n"
+#: lib/getopt.c:360
+#, fuzzy, c-format
+msgid "%s: option '%s%s' requires an argument\n"
msgstr "%s: Option '--%s' benötigt ein Argument\n"
-#: lib/getopt.c:772 lib/getopt.c:775
-#, c-format
-msgid "%s: unrecognized option '--%s'\n"
-msgstr "%s: nicht erkannte Option '--%s'\n"
-
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr "%s: nicht erkannte Option '%c%s'\n"
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr "%s: Ungültige Option -- '%c'\n"
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr "%s: Option benötigt ein Argument -- '%c'\n"
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr "%s: Option '-W %s' ist mehrdeutig\n"
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr "%s: Option '-W %s' darf kein Argument haben\n"
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr "%s: Option '-W %s' benötigt ein Argument\n"
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
msgid "memory exhausted"
msgstr "Speicher erschöpft"
@@ -152,13 +127,13 @@ msgstr "Speicher erschöpft"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr "&bdquo;"
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr "&ldquo;"
@@ -230,7 +205,7 @@ msgstr "Regulärer Ausdruck ist zu groß"
msgid "Unmatched ) or \\)"
msgstr "Nicht paarweises ) bzw. \\)"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Kein vorheriger regulärer Ausdruck"
@@ -257,9 +232,10 @@ msgid "(C)"
msgstr "(C)"
#: lib/version-etc.c:86
+#, fuzzy
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -400,11 +376,12 @@ msgstr ""
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
msgstr ""
#: lib/version-etc.c:256
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+#, fuzzy
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr "Allgemeine Hilfe zu GNU-Software: <http://www.gnu.org/gethelp/>.\n"
#: sed/compile.c:146
@@ -530,74 +507,78 @@ msgstr "%s: Datei %s Zeile %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e Ausdruck #%lu, Zeichen %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "Zielmarke für den Sprung zu »%s« kann nicht gefunden werden"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %s kann nicht gelesen werden: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "%s kann nicht bearbeitet werden: Das ist ein Terminal"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "%s kann nicht bearbeitet werden: Das ist keine normale Datei"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: Warnung: Vorgegebener Dateierstellungskontext konnte nicht auf %s "
"gesetzt werden: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
"%s: Warnung: Sicherheitskontext von %s konnte nicht ermittelt werden: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "Temporäre Datei %s kann nicht geöffnet werden: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "Fehler im Unterprozess"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "Option »e« wird nicht unterstützt"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "Befehl »e« wird nicht unterstützt"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "Keine Eingabedateien"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "Kein vorheriger regulärer Ausdruck"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "Ungültiger Verweis \\%d im rechten Teil (»RHS«) des »s«-Befehls"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
@@ -615,10 +596,10 @@ msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
#: sed/sed.c:113
-#, c-format
+#, fuzzy, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
"GNU-sed-Homepage: <http://www.gnu.org/software/sed/>.\n"
"Allgemeine Hilfe zu GNU-Software: <http://www.gnu.org/gethelp/>.\n"
@@ -749,7 +730,7 @@ msgstr ""
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
#: sed/sed.c:172
@@ -841,6 +822,21 @@ msgstr "Statusermittlung von %s schlug fehl: %s"
msgid "cannot rename %s: %s"
msgstr "%s kann nicht umbenannt werden: %s"
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: Option '--%s' darf kein Argument haben\n"
+
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: nicht erkannte Option '--%s'\n"
+
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: Option '-W %s' ist mehrdeutig\n"
+
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: Option '-W %s' darf kein Argument haben\n"
+
+#~ msgid "%s: option '-W %s' requires an argument\n"
+#~ msgstr "%s: Option '-W %s' benötigt ein Argument\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr ""
#~ "Für leere reguläre Ausdrücke können keine »modifier« angegeben werden"
diff --git a/po/el.gmo b/po/el.gmo
index d5864f8..cb37483 100644
--- a/po/el.gmo
+++ b/po/el.gmo
Binary files differ
diff --git a/po/el.po b/po/el.po
index 2e441be..1470ac8 100644
--- a/po/el.po
+++ b/po/el.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: GNU sed 4.2.1\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
"PO-Revision-Date: 2012-03-17 16:30+0100\n"
"Last-Translator: Savvas Radevic <vicedar@gmail.com>\n"
"Language-Team: Greek <team@lists.gnome.gr>\n"
@@ -18,7 +18,7 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
#, fuzzy
msgid "write error"
msgstr "εσωτερικό σφάλμα"
@@ -28,110 +28,85 @@ msgstr "εσωτερικό σφάλμα"
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
#, fuzzy
msgid "invalid character class"
msgstr "Μη έγκυρο όνομα κλάσης χαρακτήρων"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "Μη έγκυρο περιεχόμενο εντός \\{\\}"
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
#, fuzzy
msgid "regular expression too big"
msgstr "Πολύ μεγάλη κανονική έκφραση"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr ""
-#: lib/error.c:191
+#: lib/error.c:195
#, fuzzy
msgid "Unknown system error"
msgstr "άγνωστος κώδικας σφάλματος"
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
-
-#: lib/getopt.c:619
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
+msgid "%s: option '%s%s' is ambiguous\n"
msgstr ""
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
msgstr ""
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
+msgid "%s: unrecognized option '%s%s'\n"
msgstr ""
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:345
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
+msgid "%s: option '%s%s' doesn't allow an argument\n"
msgstr ""
-#: lib/getopt.c:772 lib/getopt.c:775
+#: lib/getopt.c:360
#, c-format
-msgid "%s: unrecognized option '--%s'\n"
+msgid "%s: option '%s%s' requires an argument\n"
msgstr ""
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr ""
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr ""
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
#, fuzzy
msgid "memory exhausted"
@@ -156,13 +131,13 @@ msgstr "Εξάντληση διαθέσιμης μνήμης"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr ""
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr ""
@@ -235,7 +210,7 @@ msgstr "Πολύ μεγάλη κανονική έκφραση"
msgid "Unmatched ) or \\)"
msgstr "Αταίριαστο ) ή \\)"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Δεν βρέθηκε προηγούμενη κανονική έκφραση"
@@ -264,7 +239,7 @@ msgstr ""
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -385,12 +360,12 @@ msgstr ""
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
msgstr ""
#: lib/version-etc.c:256
#, fuzzy
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
"Κεντρική ιστοσελίδα GNU sed: <http://www.gnu.org/software/sed/>.\n"
"Γενική βοήθεια χρήσης GNU λογισμικού: <http://www.gnu.org/gethelp/>.\n"
@@ -519,74 +494,78 @@ msgstr "%s: αρχείο %s γραμμή %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e έκφραση #%lu, χαρακτήρας %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "αδυναμία εύρεσης ετικέττας για μετάβαση στο `%s'"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: αδυναμία ανάγνωσης του %s: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "αδυναμία επεξεργασίας του %s: είναι τερματικό"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "αδυναμία επεξεργασίας του %s: δεν είναι κανονικό αρχείο"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: προειδοποίηση: αποτυχία ορισμού προεπιλεγμένου πλαισίου δημιουργίας "
"αρχείου ως %s: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
"%s: προειδοποίηση: αποτυχία πάρσης πλαίσιου ασφαλείας του αρχείου %s: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "αδυναμία ανοίγματος του αρχείου %s: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "σφάλμα στη υποδιαδικασία"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "η επιλογή `e' δεν υποστηρίζεται"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "η εντολή `e' δεν υποστηρίζεται"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "δεν υπάρχουν αρχεία εισόδου"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "δεν βρέθηκε προηγούμενη κανονική έκφραση"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "μη έγκυρη αναφορά \\%d στο δεξί τμήμα της εντολής `s'"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
@@ -604,10 +583,10 @@ msgid "Paolo Bonzini"
msgstr ""
#: sed/sed.c:113
-#, c-format
+#, fuzzy, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
"Κεντρική ιστοσελίδα GNU sed: <http://www.gnu.org/software/sed/>.\n"
"Γενική βοήθεια χρήσης GNU λογισμικού: <http://www.gnu.org/gethelp/>.\n"
@@ -737,7 +716,7 @@ msgstr ""
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
#: sed/sed.c:172
diff --git a/po/eo.gmo b/po/eo.gmo
index ffd3c31..385a599 100644
--- a/po/eo.gmo
+++ b/po/eo.gmo
Binary files differ
diff --git a/po/eo.po b/po/eo.po
index 03b1f8d..2aab674 100644
--- a/po/eo.po
+++ b/po/eo.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: GNU sed 4.2.2.177\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
"PO-Revision-Date: 2017-01-26 23:31-0300\n"
"Last-Translator: Felipe Castro <fefcas@gmail.com>\n"
"Language-Team: Esperanto <translation-team-eo@lists.sourceforge.net>\n"
@@ -21,7 +21,7 @@ msgstr ""
"X-Generator: Poedit 1.5.4\n"
"X-Poedit-Basepath: /home/ipe/tradukado_eo/plenumitaj\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr "skrib-eraro"
@@ -30,106 +30,81 @@ msgstr "skrib-eraro"
msgid "preserving permissions for %s"
msgstr "ni tenas la permesojn por %s"
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr "ne spegulita ["
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
msgid "invalid character class"
msgstr "nevalida signoklaso"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "sintakso de signoklaso estas [[:spaco:]], ne [:spaco:]"
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr "nefinigita kodŝanĝa \\"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
msgstr "nevalida enhavo de \\{\\}"
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
msgid "regular expression too big"
msgstr "regula esprimo tro granda"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr "ne spegulita ("
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr "neniu sintakso estis indikata"
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr "ne spegulita )"
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr "Nekonata sistem-eraro"
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr "%s: modifilo '%s' estas plursenca; eblecoj:"
-
-#: lib/getopt.c:619
-#, c-format
-msgid "%s: option '%s' is ambiguous\n"
+#: lib/getopt.c:278
+#, fuzzy, c-format
+msgid "%s: option '%s%s' is ambiguous\n"
msgstr "%s: modifilo '%s' estas plursenca\n"
-#: lib/getopt.c:654 lib/getopt.c:658
-#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr "%s: modifilo '--%s' ne permesas argumenton\n"
+#: lib/getopt.c:284
+#, fuzzy, c-format
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
+msgstr "%s: modifilo '%s' estas plursenca; eblecoj:"
-#: lib/getopt.c:667 lib/getopt.c:672
-#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
+#: lib/getopt.c:319
+#, fuzzy, c-format
+msgid "%s: unrecognized option '%s%s'\n"
+msgstr "%s: nerekonata modifilo '%c%s'\n"
+
+#: lib/getopt.c:345
+#, fuzzy, c-format
+msgid "%s: option '%s%s' doesn't allow an argument\n"
msgstr "%s: modifilo '%c%s' ne permesas argumenton\n"
-#: lib/getopt.c:715 lib/getopt.c:734
-#, c-format
-msgid "%s: option '--%s' requires an argument\n"
+#: lib/getopt.c:360
+#, fuzzy, c-format
+msgid "%s: option '%s%s' requires an argument\n"
msgstr "%s: modifilo '--%s' postulas argumenton\n"
-#: lib/getopt.c:772 lib/getopt.c:775
-#, c-format
-msgid "%s: unrecognized option '--%s'\n"
-msgstr "%s: nerekonata modifilo '--%s'\n"
-
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr "%s: nerekonata modifilo '%c%s'\n"
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr "%s: malvalida modifilo -- '%c'\n"
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr "%s: modifilo postulas argumenton -- '%c'\n"
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr "%s: modifilo '-W %s' estas plursenca\n"
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr "%s: modifilo '-W %s' ne permesas argumenton\n"
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr "%s: modifilo '-W %s' postulas argumenton\n"
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
msgid "memory exhausted"
msgstr "mankas memoro"
@@ -153,13 +128,13 @@ msgstr "mankas memoro"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr "‘"
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr "’"
@@ -231,7 +206,7 @@ msgstr "Regula esprimo tro granda"
msgid "Unmatched ) or \\)"
msgstr "Neparigita ) aŭ \\)"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Mankas antaŭa regula esprimo"
@@ -258,9 +233,10 @@ msgid "(C)"
msgstr "©"
#: lib/version-etc.c:86
+#, fuzzy
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -407,12 +383,13 @@ msgid "%s home page: <%s>\n"
msgstr "%s hejm-paĝo: <%s>\n"
#: lib/version-etc.c:253
-#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+#, fuzzy, c-format
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
msgstr "%s hejm-paĝo: <http://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+#, fuzzy
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
"Ĝenerala helpo por uzi programaron GNU: <http://www.gnu.org/gethelp/>\n"
@@ -539,72 +516,76 @@ msgstr "%s: dosiero %s linio %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e esprimo #%lu, signo %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "ne povas trovi etikedon por salto al '%s'"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr "uskleco-konverto produktis malvalidan signon"
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: ne povas legi %s: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "ne povis redakti %s: estas terminalo"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "ne povis redakti %s: ne estas normala dosiero"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: averto: malsukcesis difini aprioran dosier-krean kuntekston al %s: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: averto: malsukcesis preni sekurecan kuntekston de %s: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "ne povis malfermi dumtempan dosieron %s: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "eraro en subprocezo"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "opcio 'e' ne realigita"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "komando 'e' ne realigita"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "mankas enig-dosieroj"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "mankas antaŭa regula esprimo"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "nevalida referenco \\%d ĉe dekstra flanko de komando 's'"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
@@ -622,10 +603,10 @@ msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
#: sed/sed.c:113
-#, c-format
+#, fuzzy, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
"Hejmpaĝo de GNU sed: <http://www.gnu.org/software/sed/>.\n"
"Ĝenerala helpo por uzi programaron GNU: <http://www.gnu.org/gethelp/>.\n"
@@ -752,10 +733,10 @@ msgstr ""
" kontinua longa fluo.\n"
#: sed/sed.c:170
-#, c-format
+#, fuzzy, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
" --sandbox\n"
" operacii laŭ reĝimo de provejo.\n"
@@ -851,6 +832,21 @@ msgstr "ne povas stat-i %s: %s"
msgid "cannot rename %s: %s"
msgstr "ne povas renomi %s: %s"
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: modifilo '--%s' ne permesas argumenton\n"
+
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: nerekonata modifilo '--%s'\n"
+
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: modifilo '-W %s' estas plursenca\n"
+
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: modifilo '-W %s' ne permesas argumenton\n"
+
+#~ msgid "%s: option '-W %s' requires an argument\n"
+#~ msgstr "%s: modifilo '-W %s' postulas argumenton\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr "ne eblas specifi modifilojn ĉe malplena regula esprimo"
diff --git a/po/es.gmo b/po/es.gmo
index 03a42a0..2e6ae3d 100644
--- a/po/es.gmo
+++ b/po/es.gmo
Binary files differ
diff --git a/po/es.po b/po/es.po
index 478b8f5..964820e 100644
--- a/po/es.po
+++ b/po/es.po
@@ -1,139 +1,111 @@
-# Mensajes en español para GNU sed.
-# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# Spanish mensages for GNU sed 4.4.104
+# Copyright (C) 2001- 2018 Free Software Foundation, Inc.
# This file is distributed under the same license as the sed package.
-# Cristian Othón Martínez Vera <cfuga@cfuga.mx>, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011.
-#
+# Cristian Othón Martínez Vera <cfuga@cfuga.mx>, 2001- 2011.
+# Francisco Javier Serrador <fserrador@gmail.com>, 2018
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.1\n"
+"Project-Id-Version: sed 4.4.104\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
-"PO-Revision-Date: 2011-08-24 12:28-0500\n"
-"Last-Translator: Cristian Othón Martínez Vera <cfuga@cfuga.mx>\n"
-"Language-Team: Spanish <es@li.org>\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"PO-Revision-Date: 2018-03-25 21:23+0200\n"
+"Last-Translator: Francisco Javier Serrador <fserrador@gmail.com>\n"
+"Language-Team: Spanish <es@tp.org.es>\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8-bit\n"
+"Content-Transfer-Encoding: 8bit\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Poedit 2.0.4\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
-msgstr ""
+msgstr "error de escritura"
#: lib/copy-acl.c:54
#, c-format
msgid "preserving permissions for %s"
-msgstr ""
+msgstr "se conservan los permisos de %s"
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
-msgstr ""
+msgstr "desbalanceado ["
-#: lib/dfa.c:1071
-#, fuzzy
+#: lib/dfa.c:1079
msgid "invalid character class"
-msgstr "Carácter de nombre de clase inválido"
+msgstr "clase de carácter inválido"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
-msgstr ""
+msgstr "sintaxis de clase de carácter es [[:espacio:]], no [:espacio:]"
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
-msgstr ""
+msgstr "escape \\ no terminado"
-#: lib/dfa.c:1436
-#, fuzzy
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
-msgstr "Contenido inválido de \\{\\}"
+msgstr "contenido inválido de \\{\\}"
-#: lib/dfa.c:1439
-#, fuzzy
+#: lib/dfa.c:1436
msgid "regular expression too big"
-msgstr "Expresión regular demasiado grande"
+msgstr "expresión regular demasiado grande"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
-msgstr ""
+msgstr "desbalanceado ("
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
-msgstr ""
+msgstr "sin sintaxis especificada"
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
-msgstr ""
+msgstr "desbalanceado )"
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
-msgstr ""
+msgstr "Error de sistema desconocido"
-#: lib/getopt.c:575 lib/getopt.c:604
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
+msgid "%s: option '%s%s' is ambiguous\n"
+msgstr "%s: opción «%s%s» es ambigua\n"
-#: lib/getopt.c:619
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
-msgstr ""
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
+msgstr "%s: opción «%s%s» es ambigua; posibilidades:"
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr ""
+msgid "%s: unrecognized option '%s%s'\n"
+msgstr "%s: opción «%s%s» no reconocida\n"
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:345
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
-msgstr ""
+msgid "%s: option '%s%s' doesn't allow an argument\n"
+msgstr "%s: opción «%s%s» no permite un argumento\n"
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:360
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
-msgstr ""
+msgid "%s: option '%s%s' requires an argument\n"
+msgstr "%s: opción «%s%s» requiere un argumento\n"
-#: lib/getopt.c:772 lib/getopt.c:775
-#, c-format
-msgid "%s: unrecognized option '--%s'\n"
-msgstr ""
-
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
-msgstr ""
+msgstr "%s: opción no válida -- «%c»\n"
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
-msgstr ""
-
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
+msgstr "%s: la opción requiere un argumento -- '%c'\n"
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
-#, fuzzy
msgid "memory exhausted"
-msgstr "Memoria agotada"
+msgstr "memoria agotada"
#. TRANSLATORS:
#. Get translations for open and closing quotation marks.
@@ -154,19 +126,19 @@ msgstr "Memoria agotada"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
-msgstr ""
+msgstr "«"
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
-msgstr ""
+msgstr "»"
#: lib/regcomp.c:135
msgid "Success"
-msgstr "Éxito"
+msgstr "Correcto"
#: lib/regcomp.c:138
msgid "No match"
@@ -182,7 +154,7 @@ msgstr "Carácter de ordenamiento inválido"
#: lib/regcomp.c:147
msgid "Invalid character class name"
-msgstr "Carácter de nombre de clase inválido"
+msgstr "Nombre de clase de carácter inválido"
#: lib/regcomp.c:150
msgid "Trailing backslash"
@@ -193,13 +165,12 @@ msgid "Invalid back reference"
msgstr "Referencia hacia atrás inválida"
#: lib/regcomp.c:156
-#, fuzzy
msgid "Unmatched [, [^, [:, [., or [="
-msgstr "[ ó [^ sin pareja"
+msgstr "Incompleto [, [^, [:, [., or [="
#: lib/regcomp.c:159
msgid "Unmatched ( or \\("
-msgstr "( ó \\( sin pareja"
+msgstr "( o \\( sin pareja"
#: lib/regcomp.c:162
msgid "Unmatched \\{"
@@ -231,61 +202,67 @@ msgstr "Expresión regular demasiado grande"
#: lib/regcomp.c:183
msgid "Unmatched ) or \\)"
-msgstr ") ó \\) sin pareja"
+msgstr ") o \\) sin pareja"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "No hay una expresión regular previa"
#: lib/set-acl.c:46
#, c-format
msgid "setting permissions for %s"
-msgstr ""
+msgstr "estableciendo permisos para %s"
#: lib/version-etc.c:74
#, c-format
msgid "Packaged by %s (%s)\n"
-msgstr ""
+msgstr "Empaquetado por %s (%s)\n"
#: lib/version-etc.c:77
#, c-format
msgid "Packaged by %s\n"
-msgstr ""
+msgstr "Empaquetado por %s\n"
#. TRANSLATORS: Translate "(C)" to the copyright symbol
#. (C-in-a-circle), if this symbol is available in the user's
#. locale. Otherwise, do not translate "(C)"; leave it as-is.
#: lib/version-etc.c:84
msgid "(C)"
-msgstr ""
+msgstr "©"
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
"\n"
msgstr ""
+"\n"
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+"This is free software: you are free to change and redistribute it.\n"
+"There is NO WARRANTY, to the extent permitted by law.\n"
+"\n"
#. TRANSLATORS: %s denotes an author name.
#: lib/version-etc.c:102
#, c-format
msgid "Written by %s.\n"
-msgstr ""
+msgstr "Escrito por %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#: lib/version-etc.c:106
#, c-format
msgid "Written by %s and %s.\n"
-msgstr ""
+msgstr "Escrito por %s y %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#: lib/version-etc.c:110
#, c-format
msgid "Written by %s, %s, and %s.\n"
-msgstr ""
+msgstr "Escrito por %s, %s, y %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -296,6 +273,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"and %s.\n"
msgstr ""
+"Escrito por %s, %s, %s,\n"
+"y %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -306,6 +285,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, and %s.\n"
msgstr ""
+"Escrito por %s, %s, %s,\n"
+"%s, y %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -316,6 +297,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, %s, and %s.\n"
msgstr ""
+"Escrito por %s, %s, %s,\n"
+"%s, %s, y %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -326,6 +309,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, %s, %s, and %s.\n"
msgstr ""
+"Escrito por %s, %s, %s,\n"
+"%s, %s, %s, y %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -337,6 +322,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"and %s.\n"
msgstr ""
+"Escrito por %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"y %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -348,6 +336,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"%s, and %s.\n"
msgstr ""
+"Escrito por %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, y %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -359,6 +350,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"%s, %s, and others.\n"
msgstr ""
+"Escrito por %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, y otros.\n"
#. TRANSLATORS: The placeholder indicates the bug-reporting address
#. for this package. Please add _another line_ saying
@@ -370,28 +364,28 @@ msgid ""
"\n"
"Report bugs to: %s\n"
msgstr ""
+"\n"
+"Declarar defectos a: %s\n"
#: lib/version-etc.c:247
#, c-format
msgid "Report %s bugs to: %s\n"
-msgstr ""
+msgstr "Comunicar %s defectos a: %s\n"
#: lib/version-etc.c:251
#, c-format
msgid "%s home page: <%s>\n"
-msgstr ""
+msgstr "%s página inicial: <%s>\n"
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
-msgstr ""
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+msgstr "Página inicial %s: <http://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
-#, fuzzy
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
-"Página web de sed de GNU: <http://www.gnu.org/software/sed/>.\n"
-"Ayuda general para usar software GNU: <http://www.gnu.org/gethelp/>.\n"
+"Ayuda general utilizando software GNU: <https://www.gnu.org/gethelp/>\n"
#: sed/compile.c:146
msgid "multiple `!'s"
@@ -407,7 +401,7 @@ msgstr "uso inválido de +N o ~N como primera dirección"
#: sed/compile.c:150
msgid "unmatched `{'"
-msgstr "`{' sin pareja"
+msgstr "`{' desemparejado"
#: sed/compile.c:151
msgid "unexpected `}'"
@@ -419,7 +413,7 @@ msgstr "caracteres extra después de la orden"
#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
-msgstr "se esperaba \\ después de `a', `c' ó `i'"
+msgstr "se esperaba \\ después de `a', `c' o `i'"
#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
@@ -463,7 +457,7 @@ msgstr "múltiples opciones `p' para la orden `s'"
#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
-msgstr "múltiples opciones `g' para la orden `s'"
+msgstr "múltiples opciones «g» para la orden «s»"
#: sed/compile.c:173
msgid "multiple number options to `s' command"
@@ -495,17 +489,16 @@ msgid "unknown command: `%c'"
msgstr "orden desconocida: `%c'"
#: sed/compile.c:186
-#, fuzzy
msgid "incomplete command"
-msgstr "orden faltante"
+msgstr "orden incompleta"
#: sed/compile.c:188
msgid "\":\" lacks a label"
-msgstr ""
+msgstr "\":\" falta una etiqueta"
#: sed/compile.c:190
msgid "recursive escaping after \\c not allowed"
-msgstr ""
+msgstr "escape recursivo tras \\c no permitido"
#: sed/compile.c:213
#, c-format
@@ -517,102 +510,108 @@ msgstr "%s: fichero %s línea %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expresión #%lu, carácter %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "no se puede encontrar la etiqueta para saltar a `%s'"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
-msgstr ""
+msgstr "conversión case produjo un carácter inválido"
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: no se puede leer %s: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "no se puede editar %s: es una terminal"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "no se puede editar %s: no es un fichero regular"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: aviso: falló al establecer el contexto de creación de fichero por "
"omisión a %s: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: aviso: falló al obtener el contexto de seguridad de %s: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "no se puede abrir el fichero temporal %s: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "error en el subproceso"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
-msgstr "no hay soporte para la opción `e'"
+msgstr " opción `e' no soportada"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
-msgstr "no hay soporte para la orden `e'"
+msgstr "orden `e' no soportada"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "no hay ficheros de entrada"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "no hay una expresión regular previa"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr "referencia \\%d inválida en el lado derecho de la orden `s'"
+msgstr "referencia \\%d inválida en el lado derecho de la orden «s»"
+
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr "longitud de búfer exreg entrante mayor que INT_MAX"
#: sed/sed.c:35
msgid "Jay Fenlason"
-msgstr ""
+msgstr "Jay Fenlason"
#: sed/sed.c:36
msgid "Tom Lord"
-msgstr ""
+msgstr "Tom Lord"
#: sed/sed.c:37
msgid "Ken Pizzini"
-msgstr ""
+msgstr "Ken Pizzini"
#: sed/sed.c:38
msgid "Paolo Bonzini"
-msgstr ""
+msgstr "Paolo Bonzini"
#: sed/sed.c:113
#, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
-"Página web de sed de GNU: <http://www.gnu.org/software/sed/>.\n"
-"Ayuda general para usar software GNU: <http://www.gnu.org/gethelp/>.\n"
+"Página web de sed de GNU: <https://www.gnu.org/software/sed/>.\n"
+"Ayuda general para usar software GNU: <https://www.gnu.org/gethelp/>.\n"
#: sed/sed.c:120
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
+"Correo-e del boletín de defectos a: <%s>.\n"
+" \n"
#: sed/sed.c:129
msgid ""
@@ -629,7 +628,8 @@ msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-"Uso: %s [OPCIÓN]... {guión-sólo-si-no-hay-otro-guión} [fichero-entrada]...\n"
+"Modo de empleo: %s [OPCIÓN]... {guión-sólo-si-no-hay-otro-guión} [fichero-"
+"entrada]...\n"
"\n"
#: sed/sed.c:138
@@ -648,7 +648,7 @@ msgid ""
" add the script to the commands to be executed\n"
msgstr ""
" -e guión, --expression=guión\n"
-" agrega el guión a la lista de órdenes para ejecutar\n"
+" añade el guión a la lista de órdenes para ser ejecutado\n"
#: sed/sed.c:142
#, c-format
@@ -672,14 +672,14 @@ msgstr ""
" sigue los enlaces simbólicos al procesar en el lugar\n"
#: sed/sed.c:149
-#, fuzzy, c-format
+#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
msgstr ""
" -i[SUFIJO], --in-place[=SUFIJO]\n"
" edita ficheros en el lugar (crea un respaldo si se da\n"
-" una extensión)\n"
+" un SUFIJO)\n"
#: sed/sed.c:153
#, c-format
@@ -712,32 +712,34 @@ msgstr ""
" desactiva todas las extensiones de GNU.\n"
#: sed/sed.c:161
-#, fuzzy, c-format
+#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
" use extended regular expressions in the script\n"
" (for portability use POSIX -E).\n"
msgstr ""
-" -r, --regexp-extended\n"
+" -E, --regexp-extended\n"
" utiliza expresiones regulares extendidas en el guión.\n"
#: sed/sed.c:167
-#, fuzzy, c-format
+#, c-format
msgid ""
" -s, --separate\n"
" consider files as separate rather than as a single,\n"
" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
-" considera los ficheros como separados en lugar de un solo\n"
-" flujo, largo y continuo.\n"
+" considera los ficheros como separados en lugar\n"
+"\t\t de un solo flujo, largo y continuo.\n"
#: sed/sed.c:170
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
+" --sandbox\n"
+" opera en modo sandbox (desactiva órdenes e/r/w).\n"
#: sed/sed.c:172
#, c-format
@@ -759,6 +761,8 @@ msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
+" -z, --null-data\n"
+" separa líneas por caracteres NULO\n"
#: sed/sed.c:177
#, c-format
@@ -806,11 +810,11 @@ msgid "couldn't attach to %s: %s"
msgstr "no se puede conectar a %s: %s"
#: sed/utils.c:192
-#, fuzzy, c-format
+#, c-format
msgid "couldn't write %llu item to %s: %s"
msgid_plural "couldn't write %llu items to %s: %s"
-msgstr[0] "no se puede escribir %d elemento a %s: %s"
-msgstr[1] "no se pueden escribir %d elementos a %s: %s"
+msgstr[0] "no se puede escribir %llu elemento a %s: %s"
+msgstr[1] "no se pueden escribir %llu elementos a %s: %s"
#: sed/utils.c:204 sed/utils.c:223
#, c-format
diff --git a/po/et.gmo b/po/et.gmo
index 71a870d..ee8af51 100644
--- a/po/et.gmo
+++ b/po/et.gmo
Binary files differ
diff --git a/po/et.po b/po/et.po
index 8ddecdd..9778d14 100644
--- a/po/et.po
+++ b/po/et.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.2.2.177\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
"PO-Revision-Date: 2016-12-06 16:32+0200\n"
"Last-Translator: Toomas Soome <tsoome@me.com>\n"
"Language-Team: Estonian <linux-ee@lists.eenet.ee>\n"
@@ -20,7 +20,7 @@ msgstr ""
"X-Poedit-Language: Estonian\n"
"X-Poedit-Country: ESTONIA\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr "viga kirjutamisel"
@@ -29,106 +29,81 @@ msgstr "viga kirjutamisel"
msgid "preserving permissions for %s"
msgstr "säilitan %s õigused"
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr "balanseerimata ["
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
msgid "invalid character class"
msgstr "vigane sümbolite klass"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "sümbolite klassi süntaks on [[:space:]], mitte [:space:]"
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr "lõpetamata \\ paojada"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
msgstr "vigane \\{\\} sisu"
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
msgid "regular expression too big"
msgstr "regulaaravaldis on liiga suur"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr "balanseerimata ("
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr "süntaksi pole antud"
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr "balanseerimata )"
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr "Tundmatu süsteemi viga"
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr "%s: võti '%s' on mitmetähenduslik; variandid:"
-
-#: lib/getopt.c:619
-#, c-format
-msgid "%s: option '%s' is ambiguous\n"
+#: lib/getopt.c:278
+#, fuzzy, c-format
+msgid "%s: option '%s%s' is ambiguous\n"
msgstr "%s: võti '%s' on mitmetähenduslik\n"
-#: lib/getopt.c:654 lib/getopt.c:658
-#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr "%s: võti '--%s' ei luba argumenti\n"
+#: lib/getopt.c:284
+#, fuzzy, c-format
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
+msgstr "%s: võti '%s' on mitmetähenduslik; variandid:"
-#: lib/getopt.c:667 lib/getopt.c:672
-#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
+#: lib/getopt.c:319
+#, fuzzy, c-format
+msgid "%s: unrecognized option '%s%s'\n"
+msgstr "%s: tundmatu võti '%c%s'\n"
+
+#: lib/getopt.c:345
+#, fuzzy, c-format
+msgid "%s: option '%s%s' doesn't allow an argument\n"
msgstr "%s: võti '%c%s' ei luba argumenti\n"
-#: lib/getopt.c:715 lib/getopt.c:734
-#, c-format
-msgid "%s: option '--%s' requires an argument\n"
+#: lib/getopt.c:360
+#, fuzzy, c-format
+msgid "%s: option '%s%s' requires an argument\n"
msgstr "%s: võti '--%s' nõuab argumenti\n"
-#: lib/getopt.c:772 lib/getopt.c:775
-#, c-format
-msgid "%s: unrecognized option '--%s'\n"
-msgstr "%s: tundmatu võti '--%s'\n"
-
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr "%s: tundmatu võti '%c%s'\n"
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr "%s: vigane võti -- '%c'\n"
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr "%s: võti nõuab argumenti -- '%c'\n"
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr "%s: võti '-W %s' on mitmetähenduslik\n"
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr "%s: võti '-W %s' ei luba argumenti\n"
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr "%s: võti '-W %s' nõuab argumenti\n"
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
msgid "memory exhausted"
msgstr "mälu on otsas"
@@ -152,13 +127,13 @@ msgstr "mälu on otsas"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr "`"
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr "'"
@@ -230,7 +205,7 @@ msgstr "Regulaaravaldis on liiga suur"
msgid "Unmatched ) or \\)"
msgstr "Puudub ) või \\)"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Eelmist regulaaravaldist pole"
@@ -257,9 +232,10 @@ msgid "(C)"
msgstr "©"
#: lib/version-etc.c:86
+#, fuzzy
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -404,12 +380,13 @@ msgid "%s home page: <%s>\n"
msgstr "%s koduleht: <%s>\n"
#: lib/version-etc.c:253
-#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+#, fuzzy, c-format
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
msgstr "%s koduleht: <http://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+#, fuzzy
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr "Üldine abi GNU tarkvara kasutamiseks: <http://www.gnu.org/gethelp/>\n"
#: sed/compile.c:146
@@ -535,72 +512,76 @@ msgstr "%s: fail %s rida %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e avaldis #%lu, sümbol %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "ei leia märgendit, et hüpata kohale `%s'"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr "Sümboli suuruse teisendus tekitas vigase sümboli"
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: ei saa lugeda %s: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "%s ei saa toimetada: see on terminal"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "%s ei saa toimetada: see ei ole tavaline fail"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: hoiatus: faili loomise vaikimisi konteksti seadmine ebaõnnestus %s: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: hoiatus: %s turvakonteksti lugemine ebaõnnestus: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "ajutist faili %s ei saa avada: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "viga alamprotsessis"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "võtit `e' ei toetata"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "käsku `e' ei toetata"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "sisendfaile pole"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "eelmist regulaaravaldist pole"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "vigane viide \\%d käsu `s' paremas pooles"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
@@ -618,10 +599,10 @@ msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
#: sed/sed.c:113
-#, c-format
+#, fuzzy, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
"GNU sed kodulehekülg: <http://www.gnu.org/software/sed/>.\n"
"Üldine abi GNU tarkvara kasutamiseks: <http://www.gnu.org/gethelp/>.\n"
@@ -745,10 +726,10 @@ msgstr ""
" käsitle faile ükshaaval, mitte ühe jätkuva voona.\n"
#: sed/sed.c:170
-#, c-format
+#, fuzzy, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
" --sandbox\n"
" opereeri liivakasti moodis.\n"
@@ -842,3 +823,18 @@ msgstr "stat %s ei saa teha: %s"
#, c-format
msgid "cannot rename %s: %s"
msgstr "%s ei saa ümber nimetada: %s"
+
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: võti '--%s' ei luba argumenti\n"
+
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: tundmatu võti '--%s'\n"
+
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: võti '-W %s' on mitmetähenduslik\n"
+
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: võti '-W %s' ei luba argumenti\n"
+
+#~ msgid "%s: option '-W %s' requires an argument\n"
+#~ msgstr "%s: võti '-W %s' nõuab argumenti\n"
diff --git a/po/eu.gmo b/po/eu.gmo
index 04a8817..a32ebde 100644
--- a/po/eu.gmo
+++ b/po/eu.gmo
Binary files differ
diff --git a/po/eu.po b/po/eu.po
index a97344e..97cdfe0 100644
--- a/po/eu.po
+++ b/po/eu.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.1.1\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
"PO-Revision-Date: 2004-07-07 22:11+0200\n"
"Last-Translator: Mikel Olasagasti <hey_neken@mundurat.net>\n"
"Language-Team: Basque <translation-team-eu@lists.sourceforge.net>\n"
@@ -20,7 +20,7 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr ""
@@ -29,106 +29,81 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
msgid "invalid character class"
msgstr ""
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
msgstr ""
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
msgid "regular expression too big"
msgstr ""
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr ""
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr ""
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
-
-#: lib/getopt.c:619
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
+msgid "%s: option '%s%s' is ambiguous\n"
msgstr ""
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
msgstr ""
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
+msgid "%s: unrecognized option '%s%s'\n"
msgstr ""
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:345
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
+msgid "%s: option '%s%s' doesn't allow an argument\n"
msgstr ""
-#: lib/getopt.c:772 lib/getopt.c:775
+#: lib/getopt.c:360
#, c-format
-msgid "%s: unrecognized option '--%s'\n"
+msgid "%s: option '%s%s' requires an argument\n"
msgstr ""
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr ""
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr ""
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
#, fuzzy
msgid "memory exhausted"
@@ -153,13 +128,13 @@ msgstr "Memoria agortuta"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr ""
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr ""
@@ -231,7 +206,7 @@ msgstr ""
msgid "Unmatched ) or \\)"
msgstr ""
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr ""
@@ -260,7 +235,7 @@ msgstr ""
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -381,11 +356,11 @@ msgstr ""
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
msgstr ""
#: lib/version-etc.c:256
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
#: sed/compile.c:146
@@ -511,71 +486,75 @@ msgstr "%s: %s fitxategia %lu lerroa: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expresioa #%lu, %lu karakterea: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr ""
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: ezin irakurri %s: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "ezin izan da %s editatu: terminal bat da"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "ezin izan da %s editatu: ez da fitxategi erregular bat"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr ""
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "errorea subprozezuan"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr ""
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr ""
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr ""
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr ""
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr ""
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
@@ -595,8 +574,8 @@ msgstr ""
#: sed/sed.c:113
#, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
#: sed/sed.c:120
@@ -695,7 +674,7 @@ msgstr ""
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
#: sed/sed.c:172
diff --git a/po/fi.gmo b/po/fi.gmo
index 4ef86e1..7d04557 100644
--- a/po/fi.gmo
+++ b/po/fi.gmo
Binary files differ
diff --git a/po/fi.po b/po/fi.po
index 8d094b8..5f57175 100644
--- a/po/fi.po
+++ b/po/fi.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.2.2.177\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
"PO-Revision-Date: 2016-12-15 19:17+0200\n"
"Last-Translator: Jorma Karvonen <karvonen.jorma@gmail.com>\n"
"Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n"
@@ -21,7 +21,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: KBabel 1.11.2\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr "kirjoitusvirhe"
@@ -33,106 +33,81 @@ msgstr "taltioidaan kohteen %s käyttöoikeudet"
# the older messages are with quotation marks (msgid "unmatched `{'"),
# the newer ones are without quotation marks (msgid "unbalanced [")
# in Finnish translations quotation marks (”) are used in both cases
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr "pariton ”[”"
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
msgid "invalid character class"
msgstr "Virheellinen merkkiluokka"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "merkkiluokan syntaksi on [[:space:]], ei [:space:]"
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr "päättämätön \\-koodinvaihto"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
msgstr "Kohteen \\{\\} virheellinen sisältö"
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
msgid "regular expression too big"
msgstr "säännöllinen lauseke on liian suuri"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr "pariton ”(”"
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr "syntaksia ei ole määritelty"
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr "pariton ”)”"
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr "Tuntematon järjestelmävirhe"
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr "%s: valitsin ’%s’ ei ole yksiselitteinen; mahdollisuudet:"
-
-#: lib/getopt.c:619
-#, c-format
-msgid "%s: option '%s' is ambiguous\n"
+#: lib/getopt.c:278
+#, fuzzy, c-format
+msgid "%s: option '%s%s' is ambiguous\n"
msgstr "%s: valitsin ’%s’ ei ole yksiselitteinen\n"
-#: lib/getopt.c:654 lib/getopt.c:658
-#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr "%s: valitsin ’--%s’ ei salli argumenttia\n"
+#: lib/getopt.c:284
+#, fuzzy, c-format
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
+msgstr "%s: valitsin ’%s’ ei ole yksiselitteinen; mahdollisuudet:"
-#: lib/getopt.c:667 lib/getopt.c:672
-#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
+#: lib/getopt.c:319
+#, fuzzy, c-format
+msgid "%s: unrecognized option '%s%s'\n"
+msgstr "%s: tunnistamaton valitsin ’%c%s’\n"
+
+#: lib/getopt.c:345
+#, fuzzy, c-format
+msgid "%s: option '%s%s' doesn't allow an argument\n"
msgstr "%s: valitsin ’%c%s’ ei salli argumenttia\n"
-#: lib/getopt.c:715 lib/getopt.c:734
-#, c-format
-msgid "%s: option '--%s' requires an argument\n"
+#: lib/getopt.c:360
+#, fuzzy, c-format
+msgid "%s: option '%s%s' requires an argument\n"
msgstr "%s: valitsin ’--%s’ vaatii argumentin\n"
-#: lib/getopt.c:772 lib/getopt.c:775
-#, c-format
-msgid "%s: unrecognized option '--%s'\n"
-msgstr "%s: tunnistamaton valitsin ’--%s’\n"
-
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr "%s: tunnistamaton valitsin ’%c%s’\n"
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr "%s: virheellinen valitsin -- ’%c’\n"
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr "%s: valitsin vaatii argumentin -- ’%c’\n"
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr "%s: valitsin ’-W %s’ ei ole yksiselitteinen\n"
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr "%s: valitsin ’-W %s’ ei salli argumenttia\n"
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr "%s: valitsin ’-W %s’ vaatii argumentin\n"
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
msgid "memory exhausted"
msgstr "muisti loppui"
@@ -156,13 +131,13 @@ msgstr "muisti loppui"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr "”"
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr "”"
@@ -234,7 +209,7 @@ msgstr "Säännöllinen lauseke on liian suuri"
msgid "Unmatched ) or \\)"
msgstr "Pariton ”)” tai ”\\)”"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Ei aikaisempaa säännöllistä lausetta"
@@ -261,9 +236,10 @@ msgid "(C)"
msgstr "©"
#: lib/version-etc.c:86
+#, fuzzy
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -414,12 +390,13 @@ msgid "%s home page: <%s>\n"
msgstr "%s kotisivu: <%s>\n"
#: lib/version-etc.c:253
-#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+#, fuzzy, c-format
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
msgstr "%s kotisivu: <http://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+#, fuzzy
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
"Yleinen opaste GNU-ohjelmiston käytöstä: <http://www.gnu.org/gethelp/>\n"
@@ -546,73 +523,77 @@ msgstr "%s: tiedosto %s rivi %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e lauseke #%lu, merkki %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "nimikettä hypylle kohteeseen ”%s” ei löydy"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr "kirjainkoon muunnos tuotti virheellisen merkin"
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: syötteen %s lukeminen epäonnistui: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "kohteen %s muokkaaminen epäonnistui: se on pääte"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "kohteen %s muokkaaminen epäonnistui: se ei ole tavallinen tiedosto"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: varoitus: oletustiedostonluontikontekstin asettaminen epäonnistui "
"kohteeseen %s: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: varoitus: ei saatu turvakontekstia kohteesta %s: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "Väliaikaistiedoston %s avaaminen epäonnistui: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "virhe lapsiprosessissa"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "valitsin ”e” ei ole tuettu"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "komento ”e” ei ole tuettu"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "ei syötetiedostoja"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "ei aikaisempaa säännöllistä lauseketta"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "virheellinen viittaus \\%d komennon ”s” oikealla puolella"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
@@ -630,10 +611,10 @@ msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
#: sed/sed.c:113
-#, c-format
+#, fuzzy, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
"GNU sed -kotisivu: <http://www.gnu.org/software/sed/>.\n"
"Yleinen opaste GNU-ohjelmiston käytöstä: <http://www.gnu.org/gethelp/>.\n"
@@ -761,10 +742,10 @@ msgstr ""
" jatkuvana pitkänä virtana.\n"
#: sed/sed.c:170
-#, c-format
+#, fuzzy, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
" --sandbox\n"
" toimi hiekkalaatikkotilassa.\n"
@@ -862,6 +843,21 @@ msgstr "stat %s-käskyn suorittaminen epäonnistui: %s"
msgid "cannot rename %s: %s"
msgstr "kohteen %s nimeäminen uudelleen epäonnistui: %s"
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: valitsin ’--%s’ ei salli argumenttia\n"
+
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: tunnistamaton valitsin ’--%s’\n"
+
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: valitsin ’-W %s’ ei ole yksiselitteinen\n"
+
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: valitsin ’-W %s’ ei salli argumenttia\n"
+
+#~ msgid "%s: option '-W %s' requires an argument\n"
+#~ msgstr "%s: valitsin ’-W %s’ vaatii argumentin\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr ""
#~ "määriteosien määritteleminen tyhjään säännölliseen lausekkeeseen "
diff --git a/po/fr.gmo b/po/fr.gmo
index f59538c..363570e 100644
--- a/po/fr.gmo
+++ b/po/fr.gmo
Binary files differ
diff --git a/po/fr.po b/po/fr.po
index 8a5611d..2892b72 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -1,143 +1,115 @@
# French translation of GNU sed.
# This file is distributed under the same license as the sed package.
-# Copyright (C) 1998, 2000, 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
-# Gal Quri <gael@lautre.net>, 1998.
+# Copyright (C) 2017 Free Software Foundation, Inc.
+# Gaël Quéri <gael@lautre.net>, 1998.
+# Frédéric Marchal <fmarchal@perso.be>, 2018
#
-# J'ai prfr utiliser le terme <<Expression rgulire>> plutt
-# qu'<<expression rationnelle>> car celui-l est moins droutant
-# pour ceux qui sont habitus la formulation anglaise
+# Gaël Quéri: J'ai préféré utiliser le terme <<Expression régulière>> plutôt
+# qu'<<expression rationnelle>> car celui-là est moins déroutant
+# pour ceux qui sont habitués à la formulation anglaise
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.1\n"
+"Project-Id-Version: sed 4.4.104\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
-"PO-Revision-Date: 2009-11-04 13:22+0100\n"
-"Last-Translator: Gael Queri <gael@lautre.net>\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"PO-Revision-Date: 2018-03-24 17:45+0100\n"
+"Last-Translator: Frédéric Marchal <fmarchal@perso.be>\n"
"Language-Team: French <traduc@traduc.org>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"Plural-Forms: nplurals=2; plural=(n >= 2);\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
-msgstr ""
+msgstr "erreur d'écriture"
#: lib/copy-acl.c:54
#, c-format
msgid "preserving permissions for %s"
-msgstr ""
+msgstr "préserve les permissions de %s"
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
-msgstr ""
+msgstr "[ non appariée"
-#: lib/dfa.c:1071
-#, fuzzy
+#: lib/dfa.c:1079
msgid "invalid character class"
-msgstr "Nom de classe de caractres invalide"
+msgstr "classe de caractères invalide"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
-msgstr ""
+msgstr "la syntaxe d'une classe de caractères est [[:space:]] et non [:space:]"
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
-msgstr ""
+msgstr "séquence d'échappement \\ non terminée"
-#: lib/dfa.c:1436
-#, fuzzy
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
-msgstr "Contenu de \\{\\} invalide"
+msgstr "contenu de \\{\\} invalide"
-#: lib/dfa.c:1439
-#, fuzzy
+#: lib/dfa.c:1436
msgid "regular expression too big"
-msgstr "Expression rgulire trop grande"
+msgstr "expression régulière trop grande"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
-msgstr ""
+msgstr "( non appariée"
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
-msgstr ""
+msgstr "aucune syntaxe spécifiée"
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
-msgstr ""
+msgstr ") non appariée"
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
-msgstr ""
-
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
+msgstr "Erreur système inconnue"
-#: lib/getopt.c:619
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:654 lib/getopt.c:658
-#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr ""
+msgid "%s: option '%s%s' is ambiguous\n"
+msgstr "%s: l'option « %s%s » est ambigüe\n"
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
-msgstr ""
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
+msgstr "%s: l'option « %s%s » est ambigüe; les possibilités sont:"
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
-msgstr ""
+msgid "%s: unrecognized option '%s%s'\n"
+msgstr "%s: option « %s%s » non reconnue\n"
-#: lib/getopt.c:772 lib/getopt.c:775
+#: lib/getopt.c:345
#, c-format
-msgid "%s: unrecognized option '--%s'\n"
-msgstr ""
+msgid "%s: option '%s%s' doesn't allow an argument\n"
+msgstr "%s: l'option « %s%s » n'accepte pas d'argument\n"
-#: lib/getopt.c:783 lib/getopt.c:786
+#: lib/getopt.c:360
#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
+msgid "%s: option '%s%s' requires an argument\n"
+msgstr "%s: l'option « %s%s » requiert un argument\n"
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
-msgstr ""
+msgstr "%s: option invalide -- « %c »\n"
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
-msgstr ""
-
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
+msgstr "%s: l'option requiert un argument -- « %c »\n"
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
-#, fuzzy
msgid "memory exhausted"
-msgstr "Mmoire puise"
+msgstr "mémoire épuisée"
#. TRANSLATORS:
#. Get translations for open and closing quotation marks.
@@ -158,19 +130,19 @@ msgstr "Mmoire puise"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
-msgstr ""
+msgstr "« "
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
-msgstr ""
+msgstr " »"
#: lib/regcomp.c:135
msgid "Success"
-msgstr "Succs"
+msgstr "Succès"
#: lib/regcomp.c:138
msgid "No match"
@@ -178,36 +150,35 @@ msgstr "Pas de concordance"
#: lib/regcomp.c:141
msgid "Invalid regular expression"
-msgstr "Expression rgulire invalide"
+msgstr "Expression régulière invalide"
#: lib/regcomp.c:144
msgid "Invalid collation character"
-msgstr "Caractre de collation invalide"
+msgstr "Caractère de regroupement invalide"
#: lib/regcomp.c:147
msgid "Invalid character class name"
-msgstr "Nom de classe de caractres invalide"
+msgstr "Nom de classe de caractères invalide"
#: lib/regcomp.c:150
msgid "Trailing backslash"
-msgstr "Antislash de protection"
+msgstr "Barre oblique inverse seule à la fin"
#: lib/regcomp.c:153
msgid "Invalid back reference"
-msgstr "Rfrence arrire invalide"
+msgstr "Référence arrière invalide"
#: lib/regcomp.c:156
-#, fuzzy
msgid "Unmatched [, [^, [:, [., or [="
-msgstr "[ ou [^ non referm"
+msgstr "[, [^, [:, [. ou [= non apparié"
#: lib/regcomp.c:159
msgid "Unmatched ( or \\("
-msgstr "( ou \\( non referm"
+msgstr "( ou \\( non apparié"
#: lib/regcomp.c:162
msgid "Unmatched \\{"
-msgstr "\\{ non referm"
+msgstr "\\{ non apparié"
#: lib/regcomp.c:165
msgid "Invalid content of \\{\\}"
@@ -219,77 +190,84 @@ msgstr "Fin d'intervalle invalide"
#: lib/regcomp.c:171
msgid "Memory exhausted"
-msgstr "Mmoire puise"
+msgstr "Mémoire épuisée"
#: lib/regcomp.c:174
msgid "Invalid preceding regular expression"
-msgstr "L'expression rgulire prcdente est invalide"
+msgstr "L'expression régulière précédente est invalide"
#: lib/regcomp.c:177
msgid "Premature end of regular expression"
-msgstr "Fin prmature d'une expression rgulire"
+msgstr "Fin prématurée d'une expression régulière"
#: lib/regcomp.c:180
msgid "Regular expression too big"
-msgstr "Expression rgulire trop grande"
+msgstr "Expression régulière trop grande"
#: lib/regcomp.c:183
msgid "Unmatched ) or \\)"
-msgstr ") ou \\) non referm"
+msgstr ") ou \\) non apparié"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
-msgstr "Pas d'expression rgulire prcdente"
+msgstr "Pas d'expression régulière précédente"
#: lib/set-acl.c:46
#, c-format
msgid "setting permissions for %s"
-msgstr ""
+msgstr "défini les permissions pour %s"
#: lib/version-etc.c:74
#, c-format
msgid "Packaged by %s (%s)\n"
-msgstr ""
+msgstr "Empaqueté par %s (%s)\n"
#: lib/version-etc.c:77
#, c-format
msgid "Packaged by %s\n"
-msgstr ""
+msgstr "Empaqueté par %s\n"
#. TRANSLATORS: Translate "(C)" to the copyright symbol
#. (C-in-a-circle), if this symbol is available in the user's
#. locale. Otherwise, do not translate "(C)"; leave it as-is.
#: lib/version-etc.c:84
msgid "(C)"
-msgstr ""
+msgstr "©"
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
"\n"
msgstr ""
+"\n"
+"Licence GPLv3+: GNU GPL version 3 ou ultérieure <https://www.gnu.org/"
+"licenses/gpl-3.0.fr.html>.\n"
+"Ceci est un logiciel libre: vous êtes libre de le modifier et de le "
+"redistribuer.\n"
+"Il n'y a AUCUNE GARANTIE dans les limites permises par la loi.\n"
+"\n"
#. TRANSLATORS: %s denotes an author name.
#: lib/version-etc.c:102
#, c-format
msgid "Written by %s.\n"
-msgstr ""
+msgstr "Écrit par %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#: lib/version-etc.c:106
#, c-format
msgid "Written by %s and %s.\n"
-msgstr ""
+msgstr "Écrit par %s et %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#: lib/version-etc.c:110
#, c-format
msgid "Written by %s, %s, and %s.\n"
-msgstr ""
+msgstr "Écrit par %s, %s et %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -300,6 +278,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"and %s.\n"
msgstr ""
+"Écrit par %s, %s, %s\n"
+"et %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -310,6 +290,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, and %s.\n"
msgstr ""
+"Écrit par %s, %s, %s,\n"
+"%s et %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -320,6 +302,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, %s, and %s.\n"
msgstr ""
+"Écrit par %s, %s, %s,\n"
+"%s, %s et %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -330,6 +314,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, %s, %s, and %s.\n"
msgstr ""
+"Écrit par %s, %s, %s,\n"
+"%s, %s, %s et %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -341,6 +327,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"and %s.\n"
msgstr ""
+"Écrit par %s, %s, %s,\n"
+"%s, %s, %s, %s\n"
+"et %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -352,6 +341,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"%s, and %s.\n"
msgstr ""
+"Écrit par %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s et %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -363,6 +355,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"%s, %s, and others.\n"
msgstr ""
+"Écrit par %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s et d'autres.\n"
#. TRANSLATORS: The placeholder indicates the bug-reporting address
#. for this package. Please add _another line_ saying
@@ -374,61 +369,62 @@ msgid ""
"\n"
"Report bugs to: %s\n"
msgstr ""
+"\n"
+"Rapportez les anomalies à: %s\n"
+"Rapportez les erreurs de traduction à <traduc@traduc.org>\n"
#: lib/version-etc.c:247
#, c-format
msgid "Report %s bugs to: %s\n"
-msgstr ""
+msgstr "Rapportez les bogues %s à: %s\n"
#: lib/version-etc.c:251
#, c-format
msgid "%s home page: <%s>\n"
-msgstr ""
+msgstr "page d'accueil de %s: <%s>\n"
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
-msgstr ""
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+msgstr "page d'accueil de %s: <https://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
-#, fuzzy
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
-"Page de GNU sed: <http://www.gnu.org/software/sed/>.\n"
-"Aide gnrale pour utiliser les logiciels GNU: <http://www.gnu.org/help/"
+"Aide générale sur l'utilisation des logiciels GNU: <https://www.gnu.org/help/"
"gethelp.fr.html>.\n"
#: sed/compile.c:146
msgid "multiple `!'s"
-msgstr "`!' multiples"
+msgstr "« ! » multiples"
#: sed/compile.c:147
msgid "unexpected `,'"
-msgstr "`,' inattendue"
+msgstr "« , » inattendue"
#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
-msgstr "utilisation invalide de +N ou ~N comme premire adresse"
+msgstr "utilisation invalide de +N ou ~N comme première adresse"
#: sed/compile.c:150
msgid "unmatched `{'"
-msgstr "`{' non referme"
+msgstr "« { » non appariée"
#: sed/compile.c:151
msgid "unexpected `}'"
-msgstr "`}' inattendu"
+msgstr "« } » inattendue"
#: sed/compile.c:153
msgid "extra characters after command"
-msgstr "caractres inutiles aprs la commande"
+msgstr "caractères inutiles après la commande"
#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
-msgstr "\\ attendu aprs `a', `c' ou `i'"
+msgstr "\\ attendu après « a », « c » ou « i »"
#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
-msgstr "`}' n'a besoin d'aucune adresse"
+msgstr "« } » n'a besoin d'aucune adresse"
#: sed/compile.c:159
msgid ": doesn't want any addresses"
@@ -448,47 +444,48 @@ msgstr "la commande n'utilise qu'une adresse"
#: sed/compile.c:164
msgid "unterminated address regex"
-msgstr "expression rgulire d'adresse inacheve"
+msgstr "expression régulière d'adresse inachevée"
#: sed/compile.c:165
msgid "unterminated `s' command"
-msgstr "commande `s' inacheve"
+msgstr "commande « s » inachevée"
#: sed/compile.c:166
msgid "unterminated `y' command"
-msgstr "commande `y' inacheve"
+msgstr "commande « y » inachevée"
#: sed/compile.c:167
msgid "unknown option to `s'"
-msgstr "option inconnue pour `s'"
+msgstr "option inconnue pour « s »"
#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
-msgstr "plusieurs options `p' la commande `s'"
+msgstr "plusieurs options « p » à la commande « s »"
#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
-msgstr "plusieurs options `g' la commande `s'"
+msgstr "plusieurs options « g » à la commande « s »"
#: sed/compile.c:173
msgid "multiple number options to `s' command"
-msgstr "plusieurs options numriques la commande `s'"
+msgstr "plusieurs options numériques à la commande « s »"
#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
-msgstr "l'option numrique de la comande `s' ne peut tre nulle"
+msgstr "l'option numérique de la commande « s » ne peut pas être nulle"
#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
-msgstr "les chanes destines la commande `y' ont des longueurs diffrentes"
+msgstr ""
+"les chaînes destinées à la commande « y » ont des longueurs différentes"
#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
-msgstr "le caractre dlimiteur n'est pas un caractre un seul octet"
+msgstr "le caractère délimiteur n'est pas un caractère à un seul octet"
#: sed/compile.c:181
msgid "expected newer version of sed"
-msgstr "une version plus rcente de sed est attendue"
+msgstr "une version plus récente de sed est attendue"
#: sed/compile.c:183
msgid "invalid usage of line address 0"
@@ -497,20 +494,19 @@ msgstr "utilisation invalide de l'adresse de ligne 0"
#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
-msgstr "commande inconnue: `%c'"
+msgstr "commande inconnue: « %c »"
#: sed/compile.c:186
-#, fuzzy
msgid "incomplete command"
-msgstr "commande manquante"
+msgstr "commande incomplète"
#: sed/compile.c:188
msgid "\":\" lacks a label"
-msgstr ""
+msgstr "une étiquette est manquante pour « : »"
#: sed/compile.c:190
msgid "recursive escaping after \\c not allowed"
-msgstr ""
+msgstr "un échappement récursif après \\c n'est pas permis"
#: sed/compile.c:213
#, c-format
@@ -520,106 +516,112 @@ msgstr "%s: fichier %s ligne %lu: %s\n"
#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
-msgstr "%s: -e expression n%lu, caractre %lu: %s\n"
+msgstr "%s: -e expression n°%lu, caractère %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
-msgstr "impossible de trouver l'tiquette pour sauter `%s'"
+msgstr "impossible de trouver l'étiquette pour sauter à « %s »"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
-msgstr ""
+msgstr "la conversion de casse à produit un caractère invalide"
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: impossible de lire %s: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "impossible d'diter %s: est un terminal"
+msgstr "impossible d'éditer %s: est un terminal"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "impossible d'diter %s: ce n'est pas un fichier rgulier"
+msgstr "impossible d'éditer %s: ce n'est pas un fichier régulier"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-"%s: avertissement: impossible de changer le contexte de cration de fichier "
-"par dfaut %s: %s"
+"%s: avertissement: impossible de changer le contexte de création de fichier "
+"par défaut à %s: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-"%s: avertissement: impossible de prendre le contexte de scurit de %s: %s"
+"%s: avertissement: impossible d'obtenir le contexte de sécurité de %s: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "impossible d'ouvrir le fichier temporaire %s: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "erreur dans le sous-processus"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
-msgstr "l'option `e' n'est pas supporte"
+msgstr "l'option « e » n'est pas supportée"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
-msgstr "la commande `e' n'est pas supporte"
+msgstr "la commande « e » n'est pas supportée"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
-msgstr "pas de fichier d'entre"
+msgstr "pas de fichier d'entrée"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
-msgstr "pas d'expression rgulire prcdente"
+msgstr "pas d'expression régulière précédente"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr "rfrence \\%d invalide dans le ct droit de la commande `s'"
+msgstr "référence \\%d invalide dans le membre de droite de la commande « s »"
+
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+"la taille du tampon d'entrée d'expression régulière est plus grand que "
+"INT_MAX"
#: sed/sed.c:35
msgid "Jay Fenlason"
-msgstr ""
+msgstr "Jay Fenlason"
#: sed/sed.c:36
msgid "Tom Lord"
-msgstr ""
+msgstr "Tom Lord"
#: sed/sed.c:37
msgid "Ken Pizzini"
-msgstr ""
+msgstr "Ken Pizzini"
#: sed/sed.c:38
msgid "Paolo Bonzini"
-msgstr ""
+msgstr "Paolo Bonzini"
#: sed/sed.c:113
#, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
-"Page de GNU sed: <http://www.gnu.org/software/sed/>.\n"
-"Aide gnrale pour utiliser les logiciels GNU: <http://www.gnu.org/help/"
+"Page d'accueil de GNU sed: <https://www.gnu.org/software/sed/>.\n"
+"Aide générale sur l'utilisation des logiciels GNU: <https://www.gnu.org/help/"
"gethelp.fr.html>.\n"
#: sed/sed.c:120
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
-msgstr ""
+msgstr "Envoyez les rapports d'anomalies par mail à: <%s>.\n"
#: sed/sed.c:129
msgid ""
@@ -627,7 +629,7 @@ msgid ""
" use Perl 5's regular expressions syntax in the script.\n"
msgstr ""
" -R, --regexp-perl\n"
-" utiliser la syntaxe des expressions rgulires\n"
+" utiliser la syntaxe des expressions régulières\n"
" de Perl 5 dans le script.\n"
#: sed/sed.c:134
@@ -637,7 +639,7 @@ msgid ""
"\n"
msgstr ""
"Utilisation: %s [OPTION]... {script-seulement-si-pas-d'autre-script}\n"
-"[fichier-d'entre]...\n"
+"[fichier-d'entrée]...\n"
"\n"
#: sed/sed.c:138
@@ -647,7 +649,7 @@ msgid ""
" suppress automatic printing of pattern space\n"
msgstr ""
" -n, --quiet, --silent\n"
-" supprimer l'criture automatique de l'espace des motifs\n"
+" supprimer l'écriture automatique de l'espace des motifs\n"
#: sed/sed.c:140
#, c-format
@@ -656,7 +658,7 @@ msgid ""
" add the script to the commands to be executed\n"
msgstr ""
" -e script, --expression=script\n"
-" ajouter le script aux commandes tre excutes\n"
+" ajouter le script aux commandes à exécuter\n"
#: sed/sed.c:142
#, c-format
@@ -667,7 +669,7 @@ msgid ""
msgstr ""
" -f fichier-script, --file=fichier-script\n"
" ajouter le contenu de fichier-script aux commandes\n"
-" tre excutes\n"
+" à exécuter\n"
#: sed/sed.c:146
#, c-format
@@ -679,14 +681,14 @@ msgstr ""
" suivre les liens symboliques pendant le traitement\n"
#: sed/sed.c:149
-#, fuzzy, c-format
+#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
msgstr ""
" -i[SUFFIXE], --in-place[=SUFFIXE]\n"
-" diter les fichiers leur place (fait une\n"
-" sauvegarde si l'extension est fournie)\n"
+" éditer les fichiers à leur place (fait une\n"
+" sauvegarde si le SUFFIXE est fourni)\n"
#: sed/sed.c:153
#, c-format
@@ -696,8 +698,8 @@ msgid ""
"specially)\n"
msgstr ""
" -b, --binary\n"
-" ouvrir les fichiers en mode binaire (CR+LF ne sont pas "
-"traits comme une exception)\n"
+" ouvrir les fichiers en mode binaire (CR+LF n'ont pas de "
+"traitement spécial)\n"
#: sed/sed.c:157
#, c-format
@@ -706,8 +708,8 @@ msgid ""
" specify the desired line-wrap length for the `l' command\n"
msgstr ""
" -l N, --line-length=N\n"
-" spcifier la longueur de coupure de ligne dsire pour la\n"
-" commande `l'\n"
+" spécifier la longueur de coupure de ligne désirée pour la\n"
+" commande « l »\n"
#: sed/sed.c:159
#, c-format
@@ -716,36 +718,39 @@ msgid ""
" disable all GNU extensions.\n"
msgstr ""
" --posix\n"
-" dsactiver toutes les extensions GNU.\n"
+" désactiver toutes les extensions GNU.\n"
#: sed/sed.c:161
-#, fuzzy, c-format
+#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
" use extended regular expressions in the script\n"
" (for portability use POSIX -E).\n"
msgstr ""
-" -r, --regexp-extended\n"
-" utiliser la syntaxe des expressions rgulires\n"
-" tendues dans le script.\n"
+" -E, -r, --regexp-extended\n"
+" utiliser la syntaxe des expressions régulières\n"
+" étendues dans le script.\n"
+" (utilisez -E pour la portabilité).\n"
#: sed/sed.c:167
-#, fuzzy, c-format
+#, c-format
msgid ""
" -s, --separate\n"
" consider files as separate rather than as a single,\n"
" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
-" considrer les fichiers comme spars plutt que comme un\n"
+" considérer les fichiers comme séparés plutôt que comme un\n"
" simple flux long et continu.\n"
#: sed/sed.c:170
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
+" --sandbox\n"
+" opère en mode sandbox (désactive les commandes e/r/w)..\n"
#: sed/sed.c:172
#, c-format
@@ -756,9 +761,9 @@ msgid ""
" the output buffers more often\n"
msgstr ""
" -u, --unbuffered\n"
-" charger des quantits minimales de donnes depuis les\n"
-" fichiers d'entre et librer les tampons de sortie plus\n"
-" souvent\n"
+" charger des quantités minimales de données depuis les\n"
+" fichiers d'entrée et écrire les tampons de sortie plus\n"
+" souvent sur le disque\n"
#: sed/sed.c:175
#, c-format
@@ -766,6 +771,8 @@ msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
+" -z, --null-data\n"
+" séparer les lignes avec un caractère NUL\n"
#: sed/sed.c:177
#, c-format
@@ -789,11 +796,12 @@ msgid ""
"\n"
msgstr ""
"\n"
-"Si aucune option -e, --expression, -f ou --file n'est donne, le\n"
-"premier argument qui n'est pas une option sera pris comme tant le script\n"
-"sed interprter. Tous les arguments restants sont les noms des fichiers\n"
-"d'entre; si aucun fichier d'entre n'est spcifie, l'entre standard\n"
+"Si aucune option -e, --expression, -f ou --file n'est donnée, le\n"
+"premier argument qui n'est pas une option sera pris comme étant le script\n"
+"sed à interpréter. Tous les arguments restants sont les noms des fichiers\n"
+"d'entrée; si aucun fichier d'entrée n'est spécifiée, l'entrée standard\n"
"est lue.\n"
+"\n"
#: sed/utils.c:73 sed/utils.c:384
#, c-format
@@ -808,14 +816,14 @@ msgstr "impossible d'ouvrir le fichier %s: %s"
#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
-msgstr "impossible d'attacher %s: %s"
+msgstr "impossible d'attacher à %s: %s"
#: sed/utils.c:192
-#, fuzzy, c-format
+#, c-format
msgid "couldn't write %llu item to %s: %s"
msgid_plural "couldn't write %llu items to %s: %s"
-msgstr[0] "impossible d'crire %d item %s: %s"
-msgstr[1] "impossible d'crire %d items %s: %s"
+msgstr[0] "impossible d'écrire %llu élément dans %s: %s"
+msgstr[1] "impossible d'écrire %llu éléments dans %s: %s"
#: sed/utils.c:204 sed/utils.c:223
#, c-format
@@ -830,23 +838,38 @@ msgstr "impossible de suivre le lien symbolique %s: %s"
#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
-msgstr "impossible de faire un appel systme \"stat\" sur le fichier %s: %s"
+msgstr "impossible de faire un appel système « stat » sur le fichier %s: %s"
#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "impossible de renommer %s: %s"
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: l'option « --%s » n'accepte pas d'argument\n"
+
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: option « --%s » non reconnue\n"
+
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: l'option « -W %s » est ambigüe\n"
+
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: l'option « -W %s » n'accepte pas d'argument\n"
+
+#~ msgid "%s: option '-W %s' requires an argument\n"
+#~ msgstr "%s: l'option « -W %s » requiert un argument\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr ""
-#~ "impossible de spcifier des modifieurs sur une expression\n"
+#~ "impossible de spécifier des modifieurs sur une expression\n"
#~ "rationnelle vide"
#~ msgid ""
#~ "E-mail bug reports to: <%s>.\n"
#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
#~ msgstr ""
-#~ "Rapporter toutes anomalies : <%s>.\n"
+#~ "Rapporter toutes anomalies à: <%s>.\n"
#~ "N'oubliez pas d'inclure le mot ``%s'' quelque-part dans la zone "
#~ "``Subject:''.\n"
@@ -857,7 +880,7 @@ msgstr "impossible de renommer %s: %s"
#~ "based on GNU sed version %s\n"
#~ "\n"
#~ msgstr ""
-#~ "fond sur GNU sed version %s\n"
+#~ "fondé sur GNU sed version %s\n"
#~ "\n"
#~ msgid "GNU sed version %s\n"
@@ -874,5 +897,5 @@ msgstr "impossible de renommer %s: %s"
#~ "Copyright (C) %d Free Software Foundation, Inc.\n"
#~ "Ce logiciel est libre; voir les sources pour les conditions de "
#~ "reproduction.\n"
-#~ "AUCUNE garantie n'est donne; y compris pour des RAISONS COMMERCIALES ou\n"
-#~ "pour RPONDRE A UN BESOIN PARTICULIER, l'tendue permise par la loi.\n"
+#~ "AUCUNE garantie n'est donnée; y compris pour des RAISONS COMMERCIALES ou\n"
+#~ "pour RÉPONDRE A UN BESOIN PARTICULIER, à l'étendue permise par la loi.\n"
diff --git a/po/ga.gmo b/po/ga.gmo
index 26ed789..9bf0787 100644
--- a/po/ga.gmo
+++ b/po/ga.gmo
Binary files differ
diff --git a/po/ga.po b/po/ga.po
index 9543858..3be6eb6 100644
--- a/po/ga.po
+++ b/po/ga.po
@@ -1,13 +1,14 @@
# Irish translations for sed
# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
# This file is distributed under the same license as the sed package.
-# Kevin Patrick Scannell <kscanne@gmail.com>, 2003, 2004, 2006, 2008, 2017.
+# Kevin Patrick Scannell <kscanne@gmail.com>, 2003, 2004, 2006, 2008, 2017,
+# 2018.
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.2.177\n"
+"Project-Id-Version: sed 4.4.104\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
-"PO-Revision-Date: 2017-01-10 11:04-0500\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"PO-Revision-Date: 2018-03-24 11:04-0500\n"
"Last-Translator: Kevin Scannell <kscanne@gmail.com>\n"
"Language-Team: Irish <gaeilge-gnulinux@lists.sourceforge.net>\n"
"Language: ga\n"
@@ -18,7 +19,7 @@ msgstr ""
"Plural-Forms: nplurals=5; plural=n==1 ? 0 : n==2 ? 1 : (n>2 && n<7) ? 2 :"
"(n>6 && n<11) ? 3 : 4;\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr "earráid scríofa"
@@ -27,107 +28,82 @@ msgstr "earráid scríofa"
msgid "preserving permissions for %s"
msgstr "ceadanna %s á gcaomhnú"
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr "[ corr"
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
msgid "invalid character class"
msgstr "aicme charachtair neamhbhailí"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
"is é [[:space:]] an chomhréir cheart ar aicme charactair, in áit [:space:]"
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr "éálúchán \\ gan críochnú"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
msgstr "ábhar neamhbhailí idir \\{\\}"
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
msgid "regular expression too big"
msgstr "slonn ionadaíochta rómhór"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr "( corr"
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr "níor sonraíodh aon chomhréir"
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr ") corr"
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr "Earráid chórais anaithnid"
-#: lib/getopt.c:575 lib/getopt.c:604
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr "%s: Tá an rogha '%s' débhríoch; féidearthachtaí:"
+msgid "%s: option '%s%s' is ambiguous\n"
+msgstr "%s: Tá an rogha '%s%s' débhríoch\n"
-#: lib/getopt.c:619
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
-msgstr "%s: Tá an rogha '%s' débhríoch\n"
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
+msgstr "%s: Tá an rogha '%s%s' débhríoch; féidearthachtaí:"
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr "%s: ní cheadaítear argóint i ndiaidh na rogha '--%s'\n"
+msgid "%s: unrecognized option '%s%s'\n"
+msgstr "%s: rogha anaithnid '%s%s'\n"
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:345
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
-msgstr "%s: ní cheadaítear argóint i ndiaidh na rogha '%c%s'\n"
+msgid "%s: option '%s%s' doesn't allow an argument\n"
+msgstr "%s: ní cheadaítear argóint i ndiaidh na rogha '%s%s'\n"
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:360
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
-msgstr "%s: tá argóint de dhíth i ndiaidh na rogha '--%s'\n"
+msgid "%s: option '%s%s' requires an argument\n"
+msgstr "%s: tá argóint de dhíth i ndiaidh na rogha '%s%s'\n"
-#: lib/getopt.c:772 lib/getopt.c:775
-#, c-format
-msgid "%s: unrecognized option '--%s'\n"
-msgstr "%s: rogha anaithnid '--%s'\n"
-
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr "%s: rogha anaithnid '%c%s'\n"
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr "%s: rogha neamhbhailí -- '%c'\n"
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr "%s: tá argóint de dhíth i ndiaidh na rogha -- '%c'\n"
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr "%s: tá an rogha '-W %s' débhríoch\n"
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr "%s: ní cheadaítear argóint i ndiaidh na rogha '-W %s'\n"
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr "%s: tá argóint de dhíth i ndiaidh na rogha '-W `%s'\n"
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
msgid "memory exhausted"
msgstr "cuimhne ídithe"
@@ -151,13 +127,13 @@ msgstr "cuimhne ídithe"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr "`"
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr "'"
@@ -230,7 +206,7 @@ msgstr "Slonn ionadaíochta rómhór"
msgid "Unmatched ) or \\)"
msgstr ") nó \\) corr"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Níl aon slonn ionadaíochta roimhe seo"
@@ -259,14 +235,14 @@ msgstr "©"
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
"\n"
msgstr ""
"\n"
-"Ceadúnas GPLv3+: GNU GPL leagan 3 nó níos déanaí <http://gnu.org/licenses/"
+"Ceadúnas GPLv3+: GNU GPL leagan 3 nó níos déanaí <https://gnu.org/licenses/"
"gpl.html>.\n"
"Is saorbhogearra é seo: ceadaítear duit é a athrú agus a athdháileadh.\n"
"Níl baránta AR BITH ann, an oiread atá ceadaithe de réir dlí.\n"
@@ -405,12 +381,12 @@ msgstr "Leathanach baile %s: <%s>\n"
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
-msgstr "Leathanach baile %s: <http://www.gnu.org/software/%s/>\n"
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+msgstr "Leathanach baile %s: <https://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
-msgstr "Cabhair ghinearálta le bogearraí GNU: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
+msgstr "Cabhair ghinearálta le bogearraí GNU: <https://www.gnu.org/gethelp/>\n"
#: sed/compile.c:146
msgid "multiple `!'s"
@@ -535,75 +511,79 @@ msgstr "%s: comhad %s líne %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e slonn #%lu, char %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "níl aon fháil ar an lipéad `%s' don léim"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr "tháinig carachtar neamhbhailí ó thiontú cáis"
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: ní féidir %s a léamh: %s\n"
# Irish is nice this way, no initial mutation on 'rud'! -- KPS
# Include all three b/c I'm using template version of "Plural-Forms"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "níorbh fhéidir %s a chur in eagar; is teirminéal é"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "níorbh fhéidir %s a chur in eagar: ní gnáthchomhad é"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: rabhadh: níorbh fhéidir an comhthéacs réamhshocraithe cruthaithe comhad "
"a shocrú mar %s: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: rabhadh: níorbh fhéidir comhthéacs slándála de %s a fháil: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "níorbh fhéidir an comhad sealadach %s a oscailt: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "earráid i bhfo-phróiseas"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "níl an rogha `e' ar fáil"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "níl an t-ordú `e' ar fáil"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "gan inchomhad"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "níl aon slonn ionadaíochta roimhe seo"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "tagairt neamhbhailí \\%d ar dheis ordú `s'"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr "fad an mhaoláin ionchurtha níos mó ná INT_MAX"
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
@@ -623,11 +603,11 @@ msgstr "Paolo Bonzini"
#: sed/sed.c:113
#, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
-"Leathanach baile GNU sed: <http://www.gnu.org/software/sed/>.\n"
-"Cabhair ghinearálta le bogearraí GNU: <http://www.gnu.org/gethelp/>.\n"
+"Leathanach baile GNU sed: <https://www.gnu.org/software/sed/>.\n"
+"Cabhair ghinearálta le bogearraí GNU: <https://www.gnu.org/gethelp/>.\n"
#: sed/sed.c:120
#, c-format
@@ -755,10 +735,10 @@ msgstr ""
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
" --sandbox\n"
-" oibríonn sed i mbosca gainimh.\n"
+" úsáid sed i mbosca gainimh (díchumasaigh orduithe e/r/w).\n"
#: sed/sed.c:172
#, c-format
@@ -854,6 +834,21 @@ msgstr "ní féidir %s a 'stat': %s"
msgid "cannot rename %s: %s"
msgstr "ní féidir %s a athainmniú: %s"
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: ní cheadaítear argóint i ndiaidh na rogha '--%s'\n"
+
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: rogha anaithnid '--%s'\n"
+
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: tá an rogha '-W %s' débhríoch\n"
+
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: ní cheadaítear argóint i ndiaidh na rogha '-W %s'\n"
+
+#~ msgid "%s: option '-W %s' requires an argument\n"
+#~ msgstr "%s: tá argóint de dhíth i ndiaidh na rogha '-W `%s'\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr "ní féidir mionathraitheoirí a shonrú le slonn bán"
diff --git a/po/gl.gmo b/po/gl.gmo
index 026eb0f..7cae7dd 100644
--- a/po/gl.gmo
+++ b/po/gl.gmo
Binary files differ
diff --git a/po/gl.po b/po/gl.po
index 7890be9..fb836fc 100644
--- a/po/gl.po
+++ b/po/gl.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.2.2\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
"PO-Revision-Date: 2016-08-07 17:31+0200\n"
"Last-Translator: Francisco Javier Tsao Santín <tsao@members.fsf.org>\n"
"Language-Team: Galician <proxecto@trasno.net>\n"
@@ -19,7 +19,7 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=n!=1;\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr ""
@@ -28,109 +28,84 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
#, fuzzy
msgid "invalid character class"
msgstr "Nome de clase de caracteres non válido"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "Contido de \\{\\} non válido"
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
#, fuzzy
msgid "regular expression too big"
msgstr "Expresión regular grande de máis"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr ""
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr ""
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
-
-#: lib/getopt.c:619
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
+msgid "%s: option '%s%s' is ambiguous\n"
msgstr ""
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
msgstr ""
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
+msgid "%s: unrecognized option '%s%s'\n"
msgstr ""
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:345
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
+msgid "%s: option '%s%s' doesn't allow an argument\n"
msgstr ""
-#: lib/getopt.c:772 lib/getopt.c:775
+#: lib/getopt.c:360
#, c-format
-msgid "%s: unrecognized option '--%s'\n"
+msgid "%s: option '%s%s' requires an argument\n"
msgstr ""
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr ""
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr ""
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
#, fuzzy
msgid "memory exhausted"
@@ -155,13 +130,13 @@ msgstr "Memoria esgotada"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr ""
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr ""
@@ -234,7 +209,7 @@ msgstr "Expresión regular grande de máis"
msgid "Unmatched ) or \\)"
msgstr ") ou \\) sen parella"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Non hai unha expresión regular anterior"
@@ -263,7 +238,7 @@ msgstr ""
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -384,12 +359,12 @@ msgstr ""
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
msgstr ""
#: lib/version-etc.c:256
#, fuzzy
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
"Páxina principal de GNU sed: <http://www.gnu.org/software/sed/>.\n"
"Axuda xeral usando software GNU: <http://www.gnu.org/gethelp/>.\n"
@@ -517,73 +492,77 @@ msgstr "%s: ficheiro %s liña %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expresión #%lu, carácter %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "non se puido atopa-la etiqueta para saltar a `%s'"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: non se puido ler %s: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "non se puido editar %s: é unha terminal"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "non se puido editar %s: non é un ficheiro regular"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: advertencia: fallou ó establecer un contexto de creación de ficheiro por "
"defecto a %s: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: advertencia: fallou ó adoita-lo contexto de seguridade de %s: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "non se puido abri-lo ficheiro temporal %s: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "erro no subproceso"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "a opción `e' non está soportada"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "o comando `e' non está soportado"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "non hai ficheiros de entrada"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "non hai unha expresión regular anterior"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "referencia \\%d non válida no lado dereito do comando `s'"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
@@ -601,10 +580,10 @@ msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
#: sed/sed.c:113
-#, c-format
+#, fuzzy, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
"Páxina principal de GNU sed: <http://www.gnu.org/software/sed/>.\n"
"Axuda xeral usando software GNU: <http://www.gnu.org/gethelp/>.\n"
@@ -734,7 +713,7 @@ msgstr ""
#, fuzzy, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
" -z, --null-data\n"
" separa liñas por caracteres NUL\n"
diff --git a/po/he.gmo b/po/he.gmo
index cafc083..a259ef1 100644
--- a/po/he.gmo
+++ b/po/he.gmo
Binary files differ
diff --git a/po/he.po b/po/he.po
index 0d08d50..115c16c 100644
--- a/po/he.po
+++ b/po/he.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 3.02.80\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
"PO-Revision-Date: 2001-08-04 20:37+0300\n"
"Last-Translator: Eli Zaretskii <eliz@gnu.org>\n"
"Language-Team: Hebrew <eliz@gnu.org>\n"
@@ -16,7 +16,7 @@ msgstr ""
"Content-Transfer-Encoding: 8-bit\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr ""
@@ -25,106 +25,81 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
msgid "invalid character class"
msgstr ""
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
msgstr ""
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
msgid "regular expression too big"
msgstr ""
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr ""
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr ""
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
-
-#: lib/getopt.c:619
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
+msgid "%s: option '%s%s' is ambiguous\n"
msgstr ""
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
msgstr ""
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
+msgid "%s: unrecognized option '%s%s'\n"
msgstr ""
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:345
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
+msgid "%s: option '%s%s' doesn't allow an argument\n"
msgstr ""
-#: lib/getopt.c:772 lib/getopt.c:775
+#: lib/getopt.c:360
#, c-format
-msgid "%s: unrecognized option '--%s'\n"
+msgid "%s: option '%s%s' requires an argument\n"
msgstr ""
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr ""
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr ""
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
msgid "memory exhausted"
msgstr ""
@@ -148,13 +123,13 @@ msgstr ""
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr ""
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr ""
@@ -229,7 +204,7 @@ msgstr ""
msgid "Unmatched ) or \\)"
msgstr "- `{'"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr ""
@@ -258,7 +233,7 @@ msgstr ""
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -379,11 +354,11 @@ msgstr ""
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
msgstr ""
#: lib/version-etc.c:256
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
#: sed/compile.c:146
@@ -525,71 +500,75 @@ msgstr "%s (%s %lu ) %s \n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s (%lu ' -e %lu ' ) %s \n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, fuzzy, c-format
msgid "can't find label for jump to `%s'"
msgstr " `%s' "
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s %s (%s) \n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr ""
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr ""
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, fuzzy, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "%s "
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr ""
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr ""
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr ""
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr ""
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr ""
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr ""
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
@@ -609,8 +588,8 @@ msgstr ""
#: sed/sed.c:113
#, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
#: sed/sed.c:120
@@ -709,7 +688,7 @@ msgstr ""
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
#: sed/sed.c:172
diff --git a/po/hr.gmo b/po/hr.gmo
index de3a6bf..cbf7db3 100644
--- a/po/hr.gmo
+++ b/po/hr.gmo
Binary files differ
diff --git a/po/hr.po b/po/hr.po
index df217ce..0a2f78d 100644
--- a/po/hr.po
+++ b/po/hr.po
@@ -1,16 +1,17 @@
# Translation of sed to Croatian
# Copyright (C) 2002 Free Software Foundation, Inc.
# This file is distributed under the same license as the sed package.
+#
# Denis Lacković <delacko@fly.srk.fer.hr>, 2002.
# Tomislav Krznar <tomislav.krznar@gmail.com>, 2012.
-#
+# Božidar Putanec <bozidarp@yahoo.com>, 2018.
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.1\n"
+"Project-Id-Version: sed-4.4.104\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
-"PO-Revision-Date: 2012-07-04 18:15+0200\n"
-"Last-Translator: Tomislav Krznar <tomislav.krznar@gmail.com>\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"PO-Revision-Date: 2018-03-29 22:34-0700\n"
+"Last-Translator: Božidar Putanec <bozidarp@yahoo.com>\n"
"Language-Team: Croatian <lokalizacija@linux.hr>\n"
"Language: hr\n"
"MIME-Version: 1.0\n"
@@ -18,125 +19,96 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
-"X-Generator: TransDict server\n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"X-Generator: Poedit 2.0.6\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
-msgstr ""
+msgstr "greška pisanja"
#: lib/copy-acl.c:54
#, c-format
msgid "preserving permissions for %s"
-msgstr ""
+msgstr "zadržavaju se prava pristupa za %s"
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
-msgstr ""
+msgstr "nesparena ["
-#: lib/dfa.c:1071
-#, fuzzy
+#: lib/dfa.c:1079
msgid "invalid character class"
-msgstr "Neispravno ime razreda znakova"
+msgstr "nevaljana znakovna klasa"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
-msgstr ""
+msgstr "sintaksa znakovne klase je [[:space]], ne [:space:]"
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
-msgstr ""
+msgstr "nedovršena \\ escape sekvencija"
-#: lib/dfa.c:1436
-#, fuzzy
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
-msgstr "Neispravan sadržaj \\{\\}"
+msgstr "nevaljani sadržaj od \\{\\}"
-#: lib/dfa.c:1439
-#, fuzzy
+#: lib/dfa.c:1436
msgid "regular expression too big"
-msgstr "Regularni izraz je prevelik"
+msgstr "regularni izraz je preveliki"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
-msgstr ""
+msgstr "nesparena ("
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
-msgstr ""
+msgstr "sintaksa nije navedena"
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
-msgstr ""
+msgstr "nesparena )"
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
-msgstr ""
+msgstr "Nepoznata greška sustava"
-#: lib/getopt.c:575 lib/getopt.c:604
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
+msgid "%s: option '%s%s' is ambiguous\n"
+msgstr "%s: opcija „%s%s“ je dvosmislena\n"
-#: lib/getopt.c:619
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
-msgstr ""
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
+msgstr "%s: opcija „%s%s“ je dvosmislena; mogućnosti:"
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr ""
+msgid "%s: unrecognized option '%s%s'\n"
+msgstr "%s: neprepoznata opcija „%s%s“\n"
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:345
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
-msgstr ""
+msgid "%s: option '%s%s' doesn't allow an argument\n"
+msgstr "%s: opcija „%s%s“ ne dopušta argument\n"
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:360
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
-msgstr ""
+msgid "%s: option '%s%s' requires an argument\n"
+msgstr "%s: opcija „%s%s“ zahtijeva argument\n"
-#: lib/getopt.c:772 lib/getopt.c:775
-#, c-format
-msgid "%s: unrecognized option '--%s'\n"
-msgstr ""
-
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
-msgstr ""
+msgstr "%s: neispravna opcija -- „%c“\n"
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
-msgstr ""
-
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
+msgstr "%s: opcija zahtijeva argument -- „%c“\n"
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
-#, fuzzy
msgid "memory exhausted"
-msgstr "Memorija iscrpljena"
+msgstr "nema dovoljno memorije"
#. TRANSLATORS:
#. Get translations for open and closing quotation marks.
@@ -157,15 +129,15 @@ msgstr "Memorija iscrpljena"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
-msgstr ""
+msgstr "„"
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
-msgstr ""
+msgstr "“"
#: lib/regcomp.c:135
msgid "Success"
@@ -173,122 +145,127 @@ msgstr "Uspjeh"
#: lib/regcomp.c:138
msgid "No match"
-msgstr "Nema poklapanja"
+msgstr "Nema podudaranja"
#: lib/regcomp.c:141
msgid "Invalid regular expression"
-msgstr "Neispravan regularni izraz"
+msgstr "Nevaljani regularni izraz"
#: lib/regcomp.c:144
msgid "Invalid collation character"
-msgstr "Neispravan znak razvrstavanja"
+msgstr "Nevaljani znak za razvrstavanje"
#: lib/regcomp.c:147
msgid "Invalid character class name"
-msgstr "Neispravno ime razreda znakova"
+msgstr "Nevaljano ime klase znakova"
#: lib/regcomp.c:150
msgid "Trailing backslash"
-msgstr "Obrnuta kosa crta na kraju"
+msgstr "Zaostala obratna kosa crta"
#: lib/regcomp.c:153
msgid "Invalid back reference"
-msgstr "Neispravna povratna referenca"
+msgstr "Nevaljana povratna referencija"
#: lib/regcomp.c:156
-#, fuzzy
msgid "Unmatched [, [^, [:, [., or [="
-msgstr "Neuparena [ ili [^"
+msgstr "Nespareni: [, [^, [:, [., ili [="
#: lib/regcomp.c:159
msgid "Unmatched ( or \\("
-msgstr "Neuparena ( ili \\("
+msgstr "Nesparena ( ili \\("
#: lib/regcomp.c:162
msgid "Unmatched \\{"
-msgstr "Neuparena \\{"
+msgstr "Nesparena \\{"
#: lib/regcomp.c:165
msgid "Invalid content of \\{\\}"
-msgstr "Neispravan sadržaj \\{\\}"
+msgstr "Nevaljani sadržaj od \\{\\}"
#: lib/regcomp.c:168
msgid "Invalid range end"
-msgstr "Neispravan kraj raspona"
+msgstr "Nevaljani kraj raspona"
#: lib/regcomp.c:171
msgid "Memory exhausted"
-msgstr "Memorija iscrpljena"
+msgstr "Nema dovoljno memorije"
#: lib/regcomp.c:174
msgid "Invalid preceding regular expression"
-msgstr "Neispravan prethodni regularni izraz"
+msgstr "Nevaljani prethodni regularni izraz"
#: lib/regcomp.c:177
msgid "Premature end of regular expression"
-msgstr "Preuranjen kraj regularnog izraza"
+msgstr "Preuranjeni kraj regularnog izraza"
#: lib/regcomp.c:180
msgid "Regular expression too big"
-msgstr "Regularni izraz je prevelik"
+msgstr "Regularni izraz je preveliki"
#: lib/regcomp.c:183
msgid "Unmatched ) or \\)"
-msgstr "Neuparena ) ili \\)"
+msgstr "Nesparena ) ili \\)"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
-msgstr "Nedostaje prethodni regularni izraz"
+msgstr "Nema prethodnog regularnog izraza"
#: lib/set-acl.c:46
#, c-format
msgid "setting permissions for %s"
-msgstr ""
+msgstr "postavljanje prava pristupa za %s"
#: lib/version-etc.c:74
#, c-format
msgid "Packaged by %s (%s)\n"
-msgstr ""
+msgstr "Pakirao %s (%s)\n"
#: lib/version-etc.c:77
#, c-format
msgid "Packaged by %s\n"
-msgstr ""
+msgstr "Pakirao %s\n"
#. TRANSLATORS: Translate "(C)" to the copyright symbol
#. (C-in-a-circle), if this symbol is available in the user's
#. locale. Otherwise, do not translate "(C)"; leave it as-is.
#: lib/version-etc.c:84
msgid "(C)"
-msgstr ""
+msgstr "©"
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
"\n"
msgstr ""
+"\n"
+"Licencija:\n"
+"GPLv3+: GNU GPL inačica 3 ili kasnija <https://gnu.org/licenses/gpl.html>.\n"
+"Ovo je slobodan softver: slobodno ga mijenjajte i dijelite.\n"
+"NEMA JAMSTVA do granica dopuštenih zakonom.\n"
+"\n"
#. TRANSLATORS: %s denotes an author name.
#: lib/version-etc.c:102
#, c-format
msgid "Written by %s.\n"
-msgstr ""
+msgstr "Napisao %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#: lib/version-etc.c:106
#, c-format
msgid "Written by %s and %s.\n"
-msgstr ""
+msgstr "Napisali %s i %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#: lib/version-etc.c:110
#, c-format
msgid "Written by %s, %s, and %s.\n"
-msgstr ""
+msgstr "Napisali %s, %s i %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -299,6 +276,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"and %s.\n"
msgstr ""
+"Napisali %s, %s, %s,\n"
+"i %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -309,6 +288,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, and %s.\n"
msgstr ""
+"Napisali %s, %s, %s,\n"
+"%s, i %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -319,6 +300,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, %s, and %s.\n"
msgstr ""
+"Napisali %s, %s, %s,\n"
+"%s, %s, i %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -329,6 +312,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, %s, %s, and %s.\n"
msgstr ""
+"Napisali %s, %s, %s,\n"
+"%s, %s, %s, i %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -340,6 +325,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"and %s.\n"
msgstr ""
+"Napisali %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"i %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -351,6 +339,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"%s, and %s.\n"
msgstr ""
+"Napisali %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, i %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -362,6 +353,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"%s, %s, and others.\n"
msgstr ""
+"Napisali %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, i ostali.\n"
#. TRANSLATORS: The placeholder indicates the bug-reporting address
#. for this package. Please add _another line_ saying
@@ -373,64 +367,65 @@ msgid ""
"\n"
"Report bugs to: %s\n"
msgstr ""
+"\n"
+"Pogreške (bugs) na engleskom (LC_ALL=C) prijavite na <%s>.\n"
+"Primjedbe i pogreške u prijevodu prijavite na <lokalizacija@linux.hr>.\n"
#: lib/version-etc.c:247
#, c-format
msgid "Report %s bugs to: %s\n"
-msgstr ""
+msgstr "Prijavite greške „%s“ na <%s>\n"
#: lib/version-etc.c:251
#, c-format
msgid "%s home page: <%s>\n"
-msgstr ""
+msgstr "Web stranica od „%s“: <%s>\n"
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
-msgstr ""
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+msgstr "Web stranica od „%s“: <https://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
-#, fuzzy
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
-"GNU sed početna stranica: <http://www.gnu.org/software/sed/>.\n"
-"Općenita pomoć za korištenje GNU softvera: <http://www.gnu.org/gethelp/>.\n"
+"Općenita pomoć za korištenje GNU softvera: <https://www.gnu.org/gethelp/>\n"
#: sed/compile.c:146
msgid "multiple `!'s"
-msgstr "višestruki „!”"
+msgstr "višestruki „!“"
#: sed/compile.c:147
msgid "unexpected `,'"
-msgstr "neočekivani „,”"
+msgstr "neočekivani „,“"
#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
-msgstr "neispravno korištenje +N ili ~N za prvu adresu"
+msgstr "nevaljano korištenje +N ili ~N kao prva adresa"
#: sed/compile.c:150
msgid "unmatched `{'"
-msgstr "neuparena „{”"
+msgstr "nesparena „{“"
#: sed/compile.c:151
msgid "unexpected `}'"
-msgstr "neočekivana „}”"
+msgstr "neočekivana „}“"
#: sed/compile.c:153
msgid "extra characters after command"
-msgstr "višak znakova nakon naredbe"
+msgstr "suvišni znakovi nakon naredbe"
#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
-msgstr "očekujem \\ nakon „a”, „c” ili „i”"
+msgstr "očekivana je „\\“ nakon „a“, „c“ ili „i“"
#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
-msgstr "„}” ne želi nikakve adrese"
+msgstr "„}“ ne prihvaća nikakve adrese"
#: sed/compile.c:159
msgid ": doesn't want any addresses"
-msgstr ": ne želi nikakve adrese"
+msgstr "„:“ ne prihvaća nikakve adrese"
#: sed/compile.c:161
msgid "comments don't accept any addresses"
@@ -450,35 +445,35 @@ msgstr "nezavršeni regularni izraz adrese"
#: sed/compile.c:165
msgid "unterminated `s' command"
-msgstr "nezavršena naredba „s”"
+msgstr "nezavršena naredba „s“"
#: sed/compile.c:166
msgid "unterminated `y' command"
-msgstr "nezavršena naredba „y”"
+msgstr "nezavršena naredba „y“"
#: sed/compile.c:167
msgid "unknown option to `s'"
-msgstr "nepoznata opcija za „s”"
+msgstr "nepoznata opcija za „s“"
#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
-msgstr "višestruke opcije „p” za naredbu „s”"
+msgstr "višestruke opcije „p“ za naredbu „s“"
#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
-msgstr "višestruke opcije „g” za naredbu „s”"
+msgstr "višestruke opcije „g“ za naredbu „s“"
#: sed/compile.c:173
msgid "multiple number options to `s' command"
-msgstr "višestruke brojčane opcije za naredbu „s”"
+msgstr "višestruke brojčane opcije za naredbu „s“"
#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
-msgstr "brojčana opcija za naredbu „s” ne smije biti nula"
+msgstr "brojčana opcija za naredbu „s“ ne smije biti nula"
#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
-msgstr "znakovni nizovi za naredbu „y” su različitih duljina"
+msgstr "stringovi za naredbu „y“ su različitih duljina"
#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
@@ -486,29 +481,28 @@ msgstr "znak razdvajanja nije jednobajtni znak"
#: sed/compile.c:181
msgid "expected newer version of sed"
-msgstr "očekujem noviju inačicu programa sed"
+msgstr "očekivala se novija inačica programa sed"
#: sed/compile.c:183
msgid "invalid usage of line address 0"
-msgstr "neispravno korištenje adrese retka 0"
+msgstr "nevaljano korištenje adrese retka 0"
#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
-msgstr "nepoznata naredba: „%c”"
+msgstr "nepoznata naredba: „%c“"
#: sed/compile.c:186
-#, fuzzy
msgid "incomplete command"
-msgstr "nedostaje naredba"
+msgstr "nepotpuna naredba"
#: sed/compile.c:188
msgid "\":\" lacks a label"
-msgstr ""
+msgstr "\":\" nema etikete"
#: sed/compile.c:190
msgid "recursive escaping after \\c not allowed"
-msgstr ""
+msgstr "rekurzivno maskiranje (escaping) nakon \\c nije dopušteno"
#: sed/compile.c:213
#, c-format
@@ -520,102 +514,107 @@ msgstr "%s: datoteka %s redak %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e izraz #%lu, znak %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
-msgstr "ne mogu pronaći oznaku na koju bi trebalo skočiti „%s”"
+msgstr "nije moguće naći etiketu za skok na „%s“"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
-msgstr ""
+msgstr "pretvaranje veličine slova proizvelo je nevaljani znak"
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
-msgstr "%s: ne mogu čitati %s: %s\n"
+msgstr "%s: ne može se čitati %s: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "ne mogu urediti %s: to je terminal"
+msgstr "nije bilo moguće urediti %s: to je terminal"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "ne mogu urediti %s: nije obična datoteka"
+msgstr "ne može se uređivati %s: to nije obična datoteka"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-"%s: upozorenje: nisam uspio postaviti zadani kontekst izrade datoteka u %s: "
-"%s"
+"%s: upozorenje: nije uspjelo postaviti zadani kontekst za stvaranje datoteke "
+"na %s: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
-msgstr "%s: upozorenje: nisam uspio dohvatiti sigurnosni kontekst %s: %s"
+msgstr "%s: upozorenje: nije uspjelo dobiti sigurnosni kontekst %s: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
-msgstr "ne mogu otvoriti privremenu datoteku %s: %s"
+msgstr "nije bilo moguće otvoriti privremenu datoteku %s: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "greška u potprocesu"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
-msgstr "opcija „e” nije podržana"
+msgstr "opcija „e“ nije podržana"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
-msgstr "naredba „e” nije podržana"
+msgstr "naredba „e“ nije podržana"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "nema ulaznih datoteka"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
-msgstr "nedostaje prethodni regularni izraz"
+msgstr "nema prethodnoga regularnog izraza"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr "neispravna referenca \\%d na RHS-u naredbe „s”"
+msgstr "nevaljana referencija \\%d na desnoj strani naredbe „s“"
+
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+"duljina ulaznog međuspremnika regularnog izraza (regex) je veća od INT_MAX"
#: sed/sed.c:35
msgid "Jay Fenlason"
-msgstr ""
+msgstr "Jay Fenlason"
#: sed/sed.c:36
msgid "Tom Lord"
-msgstr ""
+msgstr "Tom Lord"
#: sed/sed.c:37
msgid "Ken Pizzini"
-msgstr ""
+msgstr "Ken Pizzini"
#: sed/sed.c:38
msgid "Paolo Bonzini"
-msgstr ""
+msgstr "Paolo Bonzini"
#: sed/sed.c:113
#, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
-"GNU sed početna stranica: <http://www.gnu.org/software/sed/>.\n"
+"Web stranica GNU sed: <http://www.gnu.org/software/sed/>.\n"
"Općenita pomoć za korištenje GNU softvera: <http://www.gnu.org/gethelp/>.\n"
#: sed/sed.c:120
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
-msgstr ""
+msgstr "Pogreške u ovom programu javite na: <%s>.\n"
#: sed/sed.c:129
msgid ""
@@ -623,7 +622,7 @@ msgid ""
" use Perl 5's regular expressions syntax in the script.\n"
msgstr ""
" -R, --regexp-perl\n"
-" koristi Perl 5 sintaksu regularnih izraza u skripti.\n"
+" koristi Perl 5 sintaksu za regularne izraze u skripti\n"
#: sed/sed.c:134
#, c-format
@@ -631,7 +630,7 @@ msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-"Uporaba: %s [OPCIJA]... {skripta-samo-ako-nema-drugih} [ulazna-datoteka]...\n"
+"Uporaba: %s [OPCIJA]... {SKRIPTA-samo-kad-je-jedina} [ulazna-datoteka]...\n"
"\n"
#: sed/sed.c:138
@@ -641,7 +640,7 @@ msgid ""
" suppress automatic printing of pattern space\n"
msgstr ""
" -n, --quiet, --silent\n"
-" izostavi automatsko ispisivanje prostora uzoraka\n"
+" izostavi automatsko ispisivanje prostora uzorka\n"
#: sed/sed.c:140
#, c-format
@@ -649,8 +648,8 @@ msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
-" -e script, --expression=script\n"
-" dodaj skriptu naredbama koje će se izvršiti\n"
+" -e script, --expression=SKRIPT\n"
+" doda SKRIPTU naredbama koje će se izvršiti\n"
#: sed/sed.c:142
#, c-format
@@ -659,9 +658,8 @@ msgid ""
" add the contents of script-file to the commands to be "
"executed\n"
msgstr ""
-" -f datoteka-skripte, --file=datoteka-skripte\n"
-" dodaj sadržaj datoteke skripte naredbama koje će se "
-"izvršiti\n"
+" -f datoteka-skripte, --file=SKRIPT-DATOTEKA\n"
+" doda sadržaj SKRIPT-DATOTEKE naredbama koje će se izvršiti\n"
#: sed/sed.c:146
#, c-format
@@ -670,17 +668,17 @@ msgid ""
" follow symlinks when processing in place\n"
msgstr ""
" --follow-symlinks\n"
-" slijedi simboličke veze dok je obrada u tijeku\n"
+" slijedi simboličke veze (kad radi na-mjestu (in-place))\n"
#: sed/sed.c:149
-#, fuzzy, c-format
+#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
msgstr ""
" -i[SUFIKS], --in-place[=SUFIKS]\n"
-" uredi datoteke bez kopiranja (osim ako je navedena "
-"ekstenzija)\n"
+" izravno, na-mjestu, mijenja ulaznu datoteku\n"
+" (napravi osiguranje ako je navedeni SUFIKS)\n"
#: sed/sed.c:153
#, c-format
@@ -690,8 +688,8 @@ msgid ""
"specially)\n"
msgstr ""
" -b, --binary\n"
-" otvori datoteke u binarnom načinu (CR+LF se posebno ne "
-"obrađuje)\n"
+" otvori datoteke i obradi ih kao da su binarne\n"
+" (CR+LF ne obrađuju se specijalno)\n"
#: sed/sed.c:157
#, c-format
@@ -699,8 +697,8 @@ msgid ""
" -l N, --line-length=N\n"
" specify the desired line-wrap length for the `l' command\n"
msgstr ""
-" -l N, --line-length=N\n"
-" navodi željeno prelamanje redaka za naredbu „l”\n"
+" -l N, --line-length=BROJ\n"
+" na toj duljini prelamaju se redci za „l“ naredbu\n"
#: sed/sed.c:159
#, c-format
@@ -709,36 +707,37 @@ msgid ""
" disable all GNU extensions.\n"
msgstr ""
" --posix\n"
-" onemogućuje sva GNU proširenja.\n"
+" onemogućuje sva GNU proširenja\n"
#: sed/sed.c:161
-#, fuzzy, c-format
+#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
" use extended regular expressions in the script\n"
" (for portability use POSIX -E).\n"
msgstr ""
" -r, --regexp-extended\n"
-" koristi proširene regularne izraze u skripti.\n"
+" koristi proširene regularne izraze u skripti\n"
+" (za prenosivost rabite POSIX opciju -E)\n"
#: sed/sed.c:167
-#, fuzzy, c-format
+#, c-format
msgid ""
" -s, --separate\n"
" consider files as separate rather than as a single,\n"
" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
-" radi s datotekama kao zasebnima umjesto kao s "
-"kontinuiranim\n"
-" dugačkim tokom podataka.\n"
+" smatra datoteke kao zasebne a ne kao jedan dugački stream\n"
#: sed/sed.c:170
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
+" --sandbox\n"
+" radi u sandbox načinu (onemogući e/r/w naredbe)\n"
#: sed/sed.c:172
#, c-format
@@ -749,8 +748,8 @@ msgid ""
" the output buffers more often\n"
msgstr ""
" -u, --unbuffered\n"
-" učitava minimalne količine podataka iz ulaznih datoteka i\n"
-" češće prazni izlazne međuspremnike\n"
+" učitava minimalne količine podataka iz ulaznih datoteka\n"
+" i češće prazni izlazne međuspremnike\n"
#: sed/sed.c:175
#, c-format
@@ -758,16 +757,18 @@ msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
+" -z, --null-data\n"
+" retke odvaja s NUL znakom\n"
#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
-msgstr " --help prikaži ovu pomoć i izađi\n"
+msgstr " --help pokaže ovu pomoć i završi\n"
#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
-msgstr " --version ispiši informacije o inačici i izađi\n"
+msgstr " --version pokaže informacije o inačici ovog programa i završi\n"
#: sed/sed.c:179
#, c-format
@@ -780,34 +781,36 @@ msgid ""
"\n"
msgstr ""
"\n"
-"Ako nisu navedene opcije -e, --expression, -f ili --file, sed skripta će\n"
-"interpretirati prvi argument koji nije opcija. Svi preostali argumenti\n"
-"su imena ulaznih datoteka; ako nisu navedene ulazne datoteke, čita se sa\n"
-"standardnog ulaza.\n"
+"Ako na naredbenom retku nije dana ni jedna od -e, --expression, -f, ili\n"
+"--file opcija, onda se prvi argument na naredbenom retku koji nije opcija\n"
+"smatra sed skriptom koju treba izvršiti. Svi preostali parametri na "
+"naredbenom\n"
+"retku tumače se kao imena ulaznih datoteka; ako nije navedena ni jedna\n"
+"datoteka, čita se standardni ulaz.\n"
"\n"
#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
-msgstr "ne mogu ukloniti %s: %s"
+msgstr "nije moguće ukloniti %s: %s"
#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
-msgstr "ne mogu otvoriti datoteku %s: %s"
+msgstr "nije bilo moguće otvoriti datoteku %s: %s"
#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
-msgstr "ne mogu povezati na %s: %s"
+msgstr "nije bilo moguće pridružiti na %s: %s"
#: sed/utils.c:192
-#, fuzzy, c-format
+#, c-format
msgid "couldn't write %llu item to %s: %s"
msgid_plural "couldn't write %llu items to %s: %s"
-msgstr[0] "ne mogu zapisati %d element u %s: %s"
-msgstr[1] "ne mogu zapisati %d elementa u %s: %s"
-msgstr[2] "ne mogu zapisati %d elemenata u %s: %s"
+msgstr[0] "ne može zapisati %llu stavku na %s: %s"
+msgstr[1] "ne može zapisati %llu stavke na %s: %s"
+msgstr[2] "ne može zapisati %llu stavki na %s: %s"
#: sed/utils.c:204 sed/utils.c:223
#, c-format
@@ -817,17 +820,17 @@ msgstr "greška čitanja na %s: %s"
#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
-msgstr "ne mogu slijediti simboličku vezu %s: %s"
+msgstr "nije bilo moguće slijediti simboličku vezu %s: %s"
#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
-msgstr "ne mogu izvršiti stat %s: %s"
+msgstr "ne može se dobiti status od %s: %s"
#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
-msgstr "ne mogu preimenovati %s: %s"
+msgstr "ne može se preimenovati %s: %s"
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr "ne možete navesti modifikatore praznog regularnog izraza"
diff --git a/po/hu.gmo b/po/hu.gmo
index ea5104c..11e886e 100644
--- a/po/hu.gmo
+++ b/po/hu.gmo
Binary files differ
diff --git a/po/hu.po b/po/hu.po
index b17a161..439f34a 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -1,18 +1,18 @@
# Hungarian translation of sed
-# Copyright (C) 2002, 2014, 2016 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2014, 2016, 2018 Free Software Foundation, Inc.
# This file is distributed under the same license as the sed package.
#
# First translator: Gábor István <stive@mezobereny.hu>, 2002.
# Mihály Gyulai <gyulai@fbi.hu>, 2003, 2004.
# Balázs Úr <urbalazs@gmail.com>, 2014.
-# Gabor Kelemen <kelemeng@gnome.hu>, 2016.
+# Gabor Kelemen <kelemeng@gnome.hu>, 2016, 2018.
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.2\n"
+"Project-Id-Version: sed 4.2.2.177\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
-"PO-Revision-Date: 2016-06-19 13:19+0200\n"
-"Last-Translator: Balazs Ur <urbalazs@gmail.com>\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"PO-Revision-Date: 2018-03-20 22:12+0100\n"
+"Last-Translator: Gabor Kelemen <kelemeng@gnome.hu>\n"
"Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net>\n"
"Language: hu\n"
"MIME-Version: 1.0\n"
@@ -22,122 +22,93 @@ msgstr ""
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Lokalize 1.5\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
-msgstr ""
+msgstr "íráshiba"
#: lib/copy-acl.c:54
#, c-format
msgid "preserving permissions for %s"
-msgstr ""
+msgstr "%s jogosultságainak megtartása"
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
-msgstr ""
+msgstr "kiegyensúlyozatlan ["
-#: lib/dfa.c:1071
-#, fuzzy
+#: lib/dfa.c:1079
msgid "invalid character class"
-msgstr "Érvénytelen karakterosztály-név"
+msgstr "érvénytelen karakterosztály"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
-msgstr ""
+msgstr "a karakterosztály szintaxisa [[:space:]], nem [:space:]"
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
-msgstr ""
+msgstr "befejezetlen \\ escape"
-#: lib/dfa.c:1436
-#, fuzzy
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
-msgstr "\\{\\}-nek érvénytelen a tartalma"
+msgstr "a \\{\\} tartalma érvénytelen"
-#: lib/dfa.c:1439
-#, fuzzy
+#: lib/dfa.c:1436
msgid "regular expression too big"
-msgstr "Túl nagy reguláris kifejezés"
+msgstr "a szabályos kifejezés túl nagy"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
-msgstr ""
+msgstr "kiegyensúlyozatlan ("
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
-msgstr ""
+msgstr "nincs szintaxis megadva"
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
-msgstr ""
+msgstr "kiegyensúlyozatlan )"
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
-msgstr ""
-
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
-
-#: lib/getopt.c:619
-#, c-format
-msgid "%s: option '%s' is ambiguous\n"
-msgstr ""
+msgstr "Ismeretlen rendszerhiba"
-#: lib/getopt.c:654 lib/getopt.c:658
-#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr ""
+#: lib/getopt.c:278
+#, fuzzy, c-format
+msgid "%s: option '%s%s' is ambiguous\n"
+msgstr "%s: a(z) „%s” kapcsoló nem egyértelmű\n"
-#: lib/getopt.c:667 lib/getopt.c:672
-#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
-msgstr ""
+#: lib/getopt.c:284
+#, fuzzy, c-format
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
+msgstr "%s: a(z) „%s” kapcsoló nem egyértelmű, lehetőségek:"
-#: lib/getopt.c:715 lib/getopt.c:734
-#, c-format
-msgid "%s: option '--%s' requires an argument\n"
-msgstr ""
+#: lib/getopt.c:319
+#, fuzzy, c-format
+msgid "%s: unrecognized option '%s%s'\n"
+msgstr "%s: a(z) „%c%s” kapcsoló ismeretlen\n"
-#: lib/getopt.c:772 lib/getopt.c:775
-#, c-format
-msgid "%s: unrecognized option '--%s'\n"
-msgstr ""
+#: lib/getopt.c:345
+#, fuzzy, c-format
+msgid "%s: option '%s%s' doesn't allow an argument\n"
+msgstr "%s: a(z) „%c%s” kapcsoló nem enged meg argumentumot\n"
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
+#: lib/getopt.c:360
+#, fuzzy, c-format
+msgid "%s: option '%s%s' requires an argument\n"
+msgstr "%s: a(z) „--%s” kapcsolóhoz argumentum szükséges\n"
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
-msgstr ""
+msgstr "%s: érvénytelen kapcsoló -- „%c”\n"
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
-msgstr ""
-
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
+msgstr "%s: a kapcsoló egy argumentumot igényel -- „%c”\n"
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
-#, fuzzy
msgid "memory exhausted"
-msgstr "Elfogyott a memória"
+msgstr "elfogyott a memória"
#. TRANSLATORS:
#. Get translations for open and closing quotation marks.
@@ -158,15 +129,15 @@ msgstr "Elfogyott a memória"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
-msgstr ""
+msgstr "„"
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
-msgstr ""
+msgstr "”"
#: lib/regcomp.c:135
msgid "Success"
@@ -197,9 +168,8 @@ msgid "Invalid back reference"
msgstr "Érvénytelen vissza-hivatkozás"
#: lib/regcomp.c:156
-#, fuzzy
msgid "Unmatched [, [^, [:, [., or [="
-msgstr "Nincs párban [ vagy [^"
+msgstr "Pár nélküli [, [^, [:, [., vagy [="
#: lib/regcomp.c:159
msgid "Unmatched ( or \\("
@@ -237,59 +207,66 @@ msgstr "Túl nagy reguláris kifejezés"
msgid "Unmatched ) or \\)"
msgstr "Nincs párban ) vagy \\)"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Nincsen előző reguláris kifejezés"
#: lib/set-acl.c:46
#, c-format
msgid "setting permissions for %s"
-msgstr ""
+msgstr "%s jogosultságainak beállítása"
#: lib/version-etc.c:74
#, c-format
msgid "Packaged by %s (%s)\n"
-msgstr ""
+msgstr "Csomagolta: %s (%s)\n"
#: lib/version-etc.c:77
#, c-format
msgid "Packaged by %s\n"
-msgstr ""
+msgstr "Csomagolta: %s\n"
#. TRANSLATORS: Translate "(C)" to the copyright symbol
#. (C-in-a-circle), if this symbol is available in the user's
#. locale. Otherwise, do not translate "(C)"; leave it as-is.
#: lib/version-etc.c:84
msgid "(C)"
-msgstr ""
+msgstr "©"
#: lib/version-etc.c:86
+#, fuzzy
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
"\n"
msgstr ""
+"\n"
+"A licenc GPLv3+: a GNU GPL 3. vagy újabb változata <http://gnu.org/licenses/"
+"gpl.html>\n"
+"Ez egy szabad szoftver, terjesztheti és/vagy módosíthatja.\n"
+"NINCS GARANCIA, a törvény által engedélyezett mértékig.\n"
+"\n"
#. TRANSLATORS: %s denotes an author name.
#: lib/version-etc.c:102
#, c-format
msgid "Written by %s.\n"
-msgstr ""
+msgstr "Írta: %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#: lib/version-etc.c:106
#, c-format
msgid "Written by %s and %s.\n"
-msgstr ""
+msgstr "Írta: %s és %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#: lib/version-etc.c:110
#, c-format
msgid "Written by %s, %s, and %s.\n"
-msgstr ""
+msgstr "Írta: %s, %s és %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -300,6 +277,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"and %s.\n"
msgstr ""
+"Írta: %s, %s, %s\n"
+"és %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -310,6 +289,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, and %s.\n"
msgstr ""
+"Írta: %s, %s, %s,\n"
+"%s és %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -320,6 +301,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, %s, and %s.\n"
msgstr ""
+"Írta: %s, %s, %s,\n"
+"%s, %s és %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -330,6 +313,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, %s, %s, and %s.\n"
msgstr ""
+"Írta: %s, %s, %s,\n"
+"%s, %s, %s és %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -341,6 +326,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"and %s.\n"
msgstr ""
+"Írta: %s, %s, %s,\n"
+"%s, %s, %s, %s\n"
+"és %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -352,6 +340,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"%s, and %s.\n"
msgstr ""
+"Írta: %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s és %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -363,6 +354,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"%s, %s, and others.\n"
msgstr ""
+"Írta: %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s és mások.\n"
#. TRANSLATORS: The placeholder indicates the bug-reporting address
#. for this package. Please add _another line_ saying
@@ -374,29 +368,30 @@ msgid ""
"\n"
"Report bugs to: %s\n"
msgstr ""
+"\n"
+"A hibák a(z) %s címen jelenthetők.\n"
#: lib/version-etc.c:247
#, c-format
msgid "Report %s bugs to: %s\n"
-msgstr ""
+msgstr "A(z) %s hibái a(z) %s címen jelenthetők.\n"
#: lib/version-etc.c:251
#, c-format
msgid "%s home page: <%s>\n"
-msgstr ""
+msgstr "A(z) %s honlapja: <%s>\n"
#: lib/version-etc.c:253
-#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
-msgstr ""
+#, fuzzy, c-format
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+msgstr "A %s honlapja: <http://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
#, fuzzy
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
-"GNU sed honlap: <http://www.gnu.org/software/sed/>.\n"
"Általános segítség a GNU szoftverek használatához: <http://www.gnu.org/"
-"gethelp/>.\n"
+"gethelp/>\n"
#: sed/compile.c:146
msgid "multiple `!'s"
@@ -505,11 +500,11 @@ msgstr "hiányos parancs"
#: sed/compile.c:188
msgid "\":\" lacks a label"
-msgstr ""
+msgstr "„:” után hiányzik a címke"
#: sed/compile.c:190
msgid "recursive escaping after \\c not allowed"
-msgstr ""
+msgstr "rekurzív escapelés a \\c után nem engedélyezett"
#: sed/compile.c:213
#, c-format
@@ -521,73 +516,77 @@ msgstr "%s: %s fájl %lu sor: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e kifejezés #%lu, karakter %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "az ugráshoz („%s”) nem található címke"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
-msgstr ""
+msgstr "a kis- és nagybetűk átalakítása érvénytelen karaktert eredményezett"
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %s nem olvasható: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "nem lehet szerkeszteni (%s): terminál"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "nem lehet szerkeszteni (%s): nem szabályos fájl"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: figyelem: nem sikerült beállítani a(z) %s alapértelmezett fájl "
"létrehozási környezetét: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: figyelem: nem sikerült lekérni a(z) %s biztonsági környezetét: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "nem lehet megnyitni a(z) %s átmeneti fájlt: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "hiba az alfolyamatban"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "az „e” kapcsoló nem támogatott"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "az „e” parancs nem támogatott"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "nincsenek bemeneti fájlok"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "nincs előző reguláris kifejezés"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "érvénytelen hivatkozás (\\%d) az „s” parancs RHS-ére"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
@@ -605,10 +604,10 @@ msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
#: sed/sed.c:113
-#, c-format
+#, fuzzy, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
"GNU sed honlap: <http://www.gnu.org/software/sed/>.\n"
"Általános segítség a GNU szoftverek használatához: <http://www.gnu.org/"
@@ -617,7 +616,7 @@ msgstr ""
#: sed/sed.c:120
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
-msgstr ""
+msgstr "Hibajelentést a következő címre küldhet: <%s>.\n"
#: sed/sed.c:129
msgid ""
@@ -717,18 +716,19 @@ msgstr ""
" minden GNU kiterjesztés letiltása.\n"
#: sed/sed.c:161
-#, fuzzy, c-format
+#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
" use extended regular expressions in the script\n"
" (for portability use POSIX -E).\n"
msgstr ""
-" -r, --regexp-extended\n"
+" -E, -r, --regexp-extended\n"
" kiterjesztett reguláris kifejezések használata a\n"
-" parancsfájlban.\n"
+" parancsfájlban (a hordozhatóságért használja a -E "
+"kapcsolót)\n"
#: sed/sed.c:167
-#, fuzzy, c-format
+#, c-format
msgid ""
" -s, --separate\n"
" consider files as separate rather than as a single,\n"
@@ -742,10 +742,10 @@ msgstr ""
#, fuzzy, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
-" -z, --null-data\n"
-" sorok elválasztása NULL karakterekkel\n"
+" --sandbox\n"
+" működés homokozó módban.\n"
#: sed/sed.c:172
#, c-format
@@ -812,10 +812,10 @@ msgid "couldn't attach to %s: %s"
msgstr "nem lehet csatolni ehhez: %s: %s"
#: sed/utils.c:192
-#, fuzzy, c-format
+#, c-format
msgid "couldn't write %llu item to %s: %s"
msgid_plural "couldn't write %llu items to %s: %s"
-msgstr[0] "nem lehet %d elemet írni ebbe: %s: %s"
+msgstr[0] "nem lehet %llu elemet írni ebbe: %s: %s"
#: sed/utils.c:204 sed/utils.c:223
#, c-format
@@ -837,6 +837,21 @@ msgstr "nem lehet stat-olni: %s: %s"
msgid "cannot rename %s: %s"
msgstr "nem lehet átnevezni: %s: %s"
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: a(z) „--%s” kapcsoló nem enged meg argumentumot\n"
+
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: a(z) „--%s” kapcsoló ismeretlen\n"
+
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: a „-W %s” kapcsoló nem egyértelmű\n"
+
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: a „-W %s” kapcsoló nem enged meg argumentumot\n"
+
+#~ msgid "%s: option '-W %s' requires an argument\n"
+#~ msgstr "%s: a(z) „-W%s” kapcsolóhoz argumentum szükséges\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr "nem lehet módosítót megadni üres reguláris kifejezéshez"
diff --git a/po/id.gmo b/po/id.gmo
index b3e41b9..37c7096 100644
--- a/po/id.gmo
+++ b/po/id.gmo
Binary files differ
diff --git a/po/id.po b/po/id.po
index de1ec43..5e42431 100644
--- a/po/id.po
+++ b/po/id.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.2.1\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
"PO-Revision-Date: 2014-08-04 10:15+0700\n"
"Last-Translator: Arif E. Nugroho <arif_endro@yahoo.com>\n"
"Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n"
@@ -20,7 +20,7 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr ""
@@ -29,109 +29,84 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
#, fuzzy
msgid "invalid character class"
msgstr "Nama kelas karakter tidak valid"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "Isi \\{\\} tidak valid"
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
#, fuzzy
msgid "regular expression too big"
msgstr "Reguler ekspresi terlalu besar"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr ""
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr ""
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
-
-#: lib/getopt.c:619
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
+msgid "%s: option '%s%s' is ambiguous\n"
msgstr ""
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
msgstr ""
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
+msgid "%s: unrecognized option '%s%s'\n"
msgstr ""
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:345
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
+msgid "%s: option '%s%s' doesn't allow an argument\n"
msgstr ""
-#: lib/getopt.c:772 lib/getopt.c:775
+#: lib/getopt.c:360
#, c-format
-msgid "%s: unrecognized option '--%s'\n"
+msgid "%s: option '%s%s' requires an argument\n"
msgstr ""
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr ""
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr ""
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
#, fuzzy
msgid "memory exhausted"
@@ -156,13 +131,13 @@ msgstr "Kehabisan memori"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr ""
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr ""
@@ -235,7 +210,7 @@ msgstr "Reguler ekspresi terlalu besar"
msgid "Unmatched ) or \\)"
msgstr ") atau \\) tidak sesuai"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Tidak ada reguler ekspresi sebelumnya"
@@ -264,7 +239,7 @@ msgstr ""
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -385,12 +360,12 @@ msgstr ""
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
msgstr ""
#: lib/version-etc.c:256
#, fuzzy
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
"Bantuan umum dalam menggunakan aplikasi GNU: <http://www.gnu.org/gethelp/>.\n"
@@ -519,71 +494,75 @@ msgstr "%s: berkas %s baris %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e ekspresi #%lu, char %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "Tidak dapat menemukan label untuk melompat ke `%s'"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: tidak dapat membaca %s: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "tidak dapat mengubah %s: adalah sebuah terminal"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "tidak dapat mengubah %s: bukan berkas regular"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr "%s: warning: failed to set default file creation context to %s: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: warning: failed to get security context of %s: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "Tidak dapat membuka berkas sementara %s: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "kesalahan dalam subproses"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "optsi `e' tidak didukung"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "perintah `e' tidak didukung"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "tidak ada berkas masukan"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "Tidak ada reguler ekspresi sebelumnya"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "referensi tidak valid \\%d pada perintah `s' RHS"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
@@ -601,10 +580,10 @@ msgid "Paolo Bonzini"
msgstr ""
#: sed/sed.c:113
-#, c-format
+#, fuzzy, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
"Bantuan umum dalam menggunakan aplikasi GNU: <http://www.gnu.org/gethelp/>.\n"
@@ -736,7 +715,7 @@ msgstr ""
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
#: sed/sed.c:172
diff --git a/po/it.gmo b/po/it.gmo
index 1e206c2..27fb0b0 100644
--- a/po/it.gmo
+++ b/po/it.gmo
Binary files differ
diff --git a/po/it.po b/po/it.po
index 3004562..b000ead 100644
--- a/po/it.po
+++ b/po/it.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.2.0\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
"PO-Revision-Date: 2008-01-16 12:44+0100\n"
"Last-Translator: Paolo Bonzini <bonzini@gnu.org>\n"
"Language-Team: Italian <tp@lists.linux.it>\n"
@@ -18,7 +18,7 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr ""
@@ -27,112 +27,87 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr ""
# lib/regcomp.c:191
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
#, fuzzy
msgid "invalid character class"
msgstr "Nome non valido per una classe di caratteri"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr ""
# lib/regcomp.c:209
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "numero di ripetizioni specificato tra graffe non valido"
# lib/regcomp.c:224
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
#, fuzzy
msgid "regular expression too big"
msgstr "Espressione regolare troppo grande"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr ""
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr ""
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
-
-#: lib/getopt.c:619
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
+msgid "%s: option '%s%s' is ambiguous\n"
msgstr ""
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
msgstr ""
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
+msgid "%s: unrecognized option '%s%s'\n"
msgstr ""
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:345
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
+msgid "%s: option '%s%s' doesn't allow an argument\n"
msgstr ""
-#: lib/getopt.c:772 lib/getopt.c:775
+#: lib/getopt.c:360
#, c-format
-msgid "%s: unrecognized option '--%s'\n"
+msgid "%s: option '%s%s' requires an argument\n"
msgstr ""
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr ""
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr ""
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
-
# lib/regcomp.c:215
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
#, fuzzy
@@ -158,13 +133,13 @@ msgstr "Memoria esaurita"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr ""
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr ""
@@ -255,7 +230,7 @@ msgid "Unmatched ) or \\)"
msgstr "`)' o `\\)' non bilanciata"
# lib/regcomp.c:658 sed/regex.c:47
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Occorre un'espressione regolare precedente"
@@ -284,7 +259,7 @@ msgstr ""
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -405,11 +380,11 @@ msgstr ""
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
msgstr ""
#: lib/version-etc.c:256
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
# sed/compile.c:166
@@ -563,79 +538,83 @@ msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: espressione -e #%lu, carattere %lu: %s\n"
# sed/compile.c:1543
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "impossibile trovare un'etichetta per il salto a `%s'"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
# sed/execute.c:516
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: impossibile leggere %s: %s\n"
# sed/execute.c:675
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "impossibile modificare %s: un terminale"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "impossibile modificare %s: non un file normale"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
# lib/utils.c:131
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "impossibile aprire il file temporaneo %s: %s"
# sed/execute.c:1003 sed/execute.c:1183
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "errore in un sottoprocesso"
# sed/execute.c:1005
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "opzione `e' non supportata"
# sed/execute.c:1185
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "comando `e' non supportato"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "nessun file in ingresso"
# lib/regcomp.c:658 sed/regex.c:47
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "occorre un'espressione regolare precedente"
# sed/regex.c:146
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "riferimento non valido \\%d nel secondo membro del comando `s'"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
@@ -655,8 +634,8 @@ msgstr ""
#: sed/sed.c:113
#, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
#: sed/sed.c:120
@@ -787,7 +766,7 @@ msgstr ""
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
#: sed/sed.c:172
diff --git a/po/ja.gmo b/po/ja.gmo
index a64facd..84eaaea 100644
--- a/po/ja.gmo
+++ b/po/ja.gmo
Binary files differ
diff --git a/po/ja.po b/po/ja.po
index 58ffe79..43018c4 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -15,7 +15,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.2.1\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
"PO-Revision-Date: 2010-10-21 13:04+0900\n"
"Last-Translator: Yasuaki Taniguchi <yasuakit@gmail.com>\n"
"Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\n"
@@ -26,7 +26,7 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr "書き込みエラー"
@@ -35,109 +35,84 @@ msgstr "書き込みエラー"
msgid "preserving permissions for %s"
msgstr "%s のパーミッションを保存しています"
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
#, fuzzy
msgid "invalid character class"
msgstr "無効な文字クラス名です"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "\\{\\} の中身が無効です"
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
#, fuzzy
msgid "regular expression too big"
msgstr "正規表現が大きすぎます"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr ""
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr "不明なシステムエラー"
-#: lib/getopt.c:575 lib/getopt.c:604
+#: lib/getopt.c:278
#, fuzzy, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
+msgid "%s: option '%s%s' is ambiguous\n"
msgstr "%s: オプション '%s' は曖昧です\n"
-#: lib/getopt.c:619
-#, c-format
-msgid "%s: option '%s' is ambiguous\n"
+#: lib/getopt.c:284
+#, fuzzy, c-format
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
msgstr "%s: オプション '%s' は曖昧です\n"
-#: lib/getopt.c:654 lib/getopt.c:658
-#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr "%s: オプション '--%s' は引数を取ることができません\n"
+#: lib/getopt.c:319
+#, fuzzy, c-format
+msgid "%s: unrecognized option '%s%s'\n"
+msgstr "%s: オプション '%c%s' を認識できません\n"
-#: lib/getopt.c:667 lib/getopt.c:672
-#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
+#: lib/getopt.c:345
+#, fuzzy, c-format
+msgid "%s: option '%s%s' doesn't allow an argument\n"
msgstr "%s: オプション '%c%s' は引数を取ることができません\n"
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:360
#, fuzzy, c-format
-msgid "%s: option '--%s' requires an argument\n"
+msgid "%s: option '%s%s' requires an argument\n"
msgstr "%s: オプション '--%s' は引数が必要です\n"
-#: lib/getopt.c:772 lib/getopt.c:775
-#, c-format
-msgid "%s: unrecognized option '--%s'\n"
-msgstr "%s: オプション '--%s' を認識できません\n"
-
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr "%s: オプション '%c%s' を認識できません\n"
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr "%s: 無効なオプション -- '%c'\n"
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr "%s: オプションには引数が必要です -- '%c'\n"
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr "%s: オプション '-W %s' は曖昧です\n"
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr "%s: オプション '-W %s' は引数を取ることができません\n"
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, fuzzy, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr "%s: オプション '--%s' は引数が必要です\n"
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
msgid "memory exhausted"
msgstr "メモリを使い果たしました"
@@ -161,13 +136,13 @@ msgstr "メモリを使い果たしました"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr "`"
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr "'"
@@ -240,7 +215,7 @@ msgstr "正規表現が大きすぎます"
msgid "Unmatched ) or \\)"
msgstr ") または \\) が不一致です"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "以前に正規表現がありません"
@@ -267,9 +242,10 @@ msgid "(C)"
msgstr "(C)"
#: lib/version-etc.c:86
+#, fuzzy
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -416,12 +392,13 @@ msgid "%s home page: <%s>\n"
msgstr "%s のホームページ: <%s>\n"
#: lib/version-etc.c:253
-#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+#, fuzzy, c-format
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
msgstr "%s のホームページ: <http://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+#, fuzzy
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
"GNU ソフトウェアを使用する際の一般的なヘルプ: <http://www.gnu.org/gethelp/>\n"
@@ -549,72 +526,76 @@ msgstr "%s: ファイル %s 行 %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expression #%lu, char %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "`%s' へジャンプするためのラベルが見つかりません"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %s を読み込めません: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "%s を編集できませんでした: 端末です"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "%s を編集できませんでした: 通常ファイルでありません"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: 警告: %s にデフォルトのファイル作成コンテキストを設定できませんでした: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: 警告: %s のセキュリティコンテキストの取得に失敗しました: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "一時ファイル %s を開くことができませんでした: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "子プロセスのエラーです"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "オプション `e' はサポートされていません"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "`e' コマンドはサポートされていません"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "入力ファイルがありません"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "以前に正規表現がありません"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "`s' コマンドの右側に無効な参照 \\%d があります"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
@@ -632,10 +613,10 @@ msgid "Paolo Bonzini"
msgstr ""
#: sed/sed.c:113
-#, c-format
+#, fuzzy, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
"GNU sed ホームページ: <http://www.gnu.org/software/sed/>.\n"
"GNU ソフトウェアを使用する際の一般的なヘルプ: <http://www.gnu.org/gethelp/"
@@ -763,7 +744,7 @@ msgstr ""
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
#: sed/sed.c:172
@@ -853,6 +834,22 @@ msgstr "%s の状態取得 (stat) ができません: %s"
msgid "cannot rename %s: %s"
msgstr "%s の名前を変更できません: %s"
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: オプション '--%s' は引数を取ることができません\n"
+
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: オプション '--%s' を認識できません\n"
+
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: オプション '-W %s' は曖昧です\n"
+
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: オプション '-W %s' は引数を取ることができません\n"
+
+#, fuzzy
+#~ msgid "%s: option '-W %s' requires an argument\n"
+#~ msgstr "%s: オプション '--%s' は引数が必要です\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr "空の正規表現に対して修飾子を指定できません"
diff --git a/po/ko.gmo b/po/ko.gmo
index cda2f5c..98b3b7a 100644
--- a/po/ko.gmo
+++ b/po/ko.gmo
Binary files differ
diff --git a/po/ko.po b/po/ko.po
index 441c153..a58bdf5 100644
--- a/po/ko.po
+++ b/po/ko.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: GNU sed 3.02.80\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
"PO-Revision-Date: 2001-10-12 17:26+0900\n"
"Last-Translator: Jong-Hoon Ryu <redhat4u@netian.com>\n"
"Language-Team: Korean <ko@li.org>\n"
@@ -16,7 +16,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr ""
@@ -25,106 +25,81 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
msgid "invalid character class"
msgstr ""
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
msgstr ""
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
msgid "regular expression too big"
msgstr ""
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr ""
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr ""
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
-
-#: lib/getopt.c:619
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
+msgid "%s: option '%s%s' is ambiguous\n"
msgstr ""
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
msgstr ""
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
+msgid "%s: unrecognized option '%s%s'\n"
msgstr ""
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:345
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
+msgid "%s: option '%s%s' doesn't allow an argument\n"
msgstr ""
-#: lib/getopt.c:772 lib/getopt.c:775
+#: lib/getopt.c:360
#, c-format
-msgid "%s: unrecognized option '--%s'\n"
+msgid "%s: option '%s%s' requires an argument\n"
msgstr ""
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr ""
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr ""
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
msgid "memory exhausted"
msgstr ""
@@ -148,13 +123,13 @@ msgstr ""
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr ""
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr ""
@@ -229,7 +204,7 @@ msgstr ""
msgid "Unmatched ) or \\)"
msgstr "`{' ġ ʽϴ"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr ""
@@ -258,7 +233,7 @@ msgstr ""
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -379,11 +354,11 @@ msgstr ""
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
msgstr ""
#: lib/version-etc.c:256
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
#: sed/compile.c:146
@@ -525,71 +500,75 @@ msgstr "%s: %s %lu ° : %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expression #%lu, char %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, fuzzy, c-format
msgid "can't find label for jump to `%s'"
msgstr "`%s' () ̺ ã ϴ"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %s () : %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr ""
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr ""
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, fuzzy, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "%s ϴ"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr ""
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr ""
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr ""
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr ""
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr ""
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr ""
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
@@ -609,8 +588,8 @@ msgstr ""
#: sed/sed.c:113
#, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
#: sed/sed.c:120
@@ -709,7 +688,7 @@ msgstr ""
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
#: sed/sed.c:172
diff --git a/po/nb.gmo b/po/nb.gmo
index bc1aa0b..b105607 100644
--- a/po/nb.gmo
+++ b/po/nb.gmo
Binary files differ
diff --git a/po/nb.po b/po/nb.po
index e65fd25..4cecfc5 100644
--- a/po/nb.po
+++ b/po/nb.po
@@ -2,14 +2,14 @@
# Copyright (C) 2012 Free Software Foundation, Inc.
# This file is distributed under the same license as the sed package.
#
-# Johnny A. Solbu <johnny@solbu.net>, 2012 - 2016
+# Johnny A. Solbu <johnny@solbu.net>, 2012 - 2018
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.2\n"
+"Project-Id-Version: sed 4.4.104\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
-"PO-Revision-Date: 2016-06-20 17:22+0200\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"PO-Revision-Date: 2018-03-26 15:16+0200\n"
"Last-Translator: Johnny A. Solbu <johnny@solbu.net>\n"
"Language-Team: Norwegian Bokmaal <i18n-nb@lister.ping.uio.no>\n"
"Language: nb\n"
@@ -20,122 +20,93 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.8.7.1\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
-msgstr ""
+msgstr "skrivefeil"
#: lib/copy-acl.c:54
#, c-format
msgid "preserving permissions for %s"
-msgstr ""
+msgstr "bevare tillatelser for %s"
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
-msgstr ""
+msgstr "ubalansert ["
-#: lib/dfa.c:1071
-#, fuzzy
+#: lib/dfa.c:1079
msgid "invalid character class"
-msgstr "Ugyldig tegnklassenavn"
+msgstr "ugyldig tegnklassenavn"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
-msgstr ""
+msgstr "tegnklassesyntaksen er [[:space:]], ikke [:space:]"
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
-msgstr ""
+msgstr "uferdig \\ escape"
-#: lib/dfa.c:1436
-#, fuzzy
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
-msgstr "Ugyldig bruk av \\{\\}"
+msgstr "ugyldig innhold av \\{\\}"
-#: lib/dfa.c:1439
-#, fuzzy
+#: lib/dfa.c:1436
msgid "regular expression too big"
-msgstr "Regulært uttrykk for stort"
+msgstr "regulært uttrykk for stort"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
-msgstr ""
+msgstr "ubalansert ("
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
-msgstr ""
+msgstr "ingen syntax spesifisert"
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
-msgstr ""
+msgstr "ubalansert )"
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
-msgstr ""
-
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
-
-#: lib/getopt.c:619
-#, c-format
-msgid "%s: option '%s' is ambiguous\n"
-msgstr ""
+msgstr "Ukjent systemfeil"
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr ""
+msgid "%s: option '%s%s' is ambiguous\n"
+msgstr "%s: valget «%s%s» er tvetydig\n"
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
-msgstr ""
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
+msgstr "%s: valget «%s%s» er tvetydig: muligheter:"
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
-msgstr ""
+msgid "%s: unrecognized option '%s%s'\n"
+msgstr "%s: ukjent valg «%s%s»\n"
-#: lib/getopt.c:772 lib/getopt.c:775
+#: lib/getopt.c:345
#, c-format
-msgid "%s: unrecognized option '--%s'\n"
-msgstr ""
+msgid "%s: option '%s%s' doesn't allow an argument\n"
+msgstr "%s: valget «%s%s» tillater ikke argumenter\n"
-#: lib/getopt.c:783 lib/getopt.c:786
+#: lib/getopt.c:360
#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
+msgid "%s: option '%s%s' requires an argument\n"
+msgstr "%s: valget «%s%s» krever et argument\n"
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
-msgstr ""
+msgstr "%s: ugyldig valg -- «%c»\n"
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
-msgstr ""
-
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
+msgstr "%s: valget krever et argument -- «%c»\n"
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
-#, fuzzy
msgid "memory exhausted"
-msgstr "Minnet oppbrukt"
+msgstr "minnet oppbrukt"
#. TRANSLATORS:
#. Get translations for open and closing quotation marks.
@@ -156,15 +127,15 @@ msgstr "Minnet oppbrukt"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
-msgstr ""
+msgstr "«"
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
-msgstr ""
+msgstr "»"
#: lib/regcomp.c:135
msgid "Success"
@@ -195,9 +166,8 @@ msgid "Invalid back reference"
msgstr "Ugyldig bak-referanse"
#: lib/regcomp.c:156
-#, fuzzy
msgid "Unmatched [, [^, [:, [., or [="
-msgstr "Ubalansert [ eller [^"
+msgstr "Ubalansert [, [^, [:, [., eller [="
#: lib/regcomp.c:159
msgid "Unmatched ( or \\("
@@ -235,59 +205,65 @@ msgstr "Regulært uttrykk for stort"
msgid "Unmatched ) or \\)"
msgstr "Ubalansert ) eller \\)"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Intet foregående regulært uttrykk"
#: lib/set-acl.c:46
#, c-format
msgid "setting permissions for %s"
-msgstr ""
+msgstr "setter tillatelser for %s"
#: lib/version-etc.c:74
#, c-format
msgid "Packaged by %s (%s)\n"
-msgstr ""
+msgstr "Pakket av %s (%s)\n"
#: lib/version-etc.c:77
#, c-format
msgid "Packaged by %s\n"
-msgstr ""
+msgstr "Pakket av %s\n"
#. TRANSLATORS: Translate "(C)" to the copyright symbol
#. (C-in-a-circle), if this symbol is available in the user's
#. locale. Otherwise, do not translate "(C)"; leave it as-is.
#: lib/version-etc.c:84
msgid "(C)"
-msgstr ""
+msgstr "©"
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
"\n"
msgstr ""
+"\n"
+"Lisens GPLv3+: GNU GPL versjon 3 eller senere <https://gnu.org/licenses/gpl."
+"html>\n"
+"Dette er Fri programvare: du står fritt til å endre og redistribuere det.\n"
+"Det er INGEN GARANTI, i den grad loven tillater det.\n"
+"\n"
#. TRANSLATORS: %s denotes an author name.
#: lib/version-etc.c:102
#, c-format
msgid "Written by %s.\n"
-msgstr ""
+msgstr "Skrevet av %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#: lib/version-etc.c:106
#, c-format
msgid "Written by %s and %s.\n"
-msgstr ""
+msgstr "Skrevet av %s og %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#: lib/version-etc.c:110
#, c-format
msgid "Written by %s, %s, and %s.\n"
-msgstr ""
+msgstr "Skrevet av %s, %s og %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -298,6 +274,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"and %s.\n"
msgstr ""
+"Skrevet av %s, %s, %s\n"
+"og %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -308,6 +286,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, and %s.\n"
msgstr ""
+"Skrevet av %s, %s, %s,\n"
+"%s og %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -318,6 +298,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, %s, and %s.\n"
msgstr ""
+"Skrevet av %s, %s, %s,\n"
+"%s, %s og %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -328,6 +310,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, %s, %s, and %s.\n"
msgstr ""
+"Skrevet av %s, %s, %s,\n"
+"%s, %s, %s og %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -339,6 +323,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"and %s.\n"
msgstr ""
+"Skrevet av %s, %s, %s,\n"
+"%s, %s, %s, %s\n"
+"og %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -350,6 +337,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"%s, and %s.\n"
msgstr ""
+"Skrevet av %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s og %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -361,6 +351,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"%s, %s, and others.\n"
msgstr ""
+"Skrevet av %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s og andre.\n"
#. TRANSLATORS: The placeholder indicates the bug-reporting address
#. for this package. Please add _another line_ saying
@@ -372,28 +365,28 @@ msgid ""
"\n"
"Report bugs to: %s\n"
msgstr ""
+"\n"
+"Rapporter feil, på engelsk, til <%s>.\n"
+"Oversettelsesfeil kan rapporteres til <i18n-nb@lister.ping.uio.no>.\n"
#: lib/version-etc.c:247
#, c-format
msgid "Report %s bugs to: %s\n"
-msgstr ""
+msgstr "Rapporter %s-feil til %s.\n"
#: lib/version-etc.c:251
#, c-format
msgid "%s home page: <%s>\n"
-msgstr ""
+msgstr "%s hjemmeside: <%s>\n"
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
-msgstr ""
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+msgstr "%s hjemmeside: <https://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
-#, fuzzy
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
-msgstr ""
-"GNU sed hjemmeside:. <http://www.gnu.org/software/sed/>\n"
-"Generelt hjelp med GNU-programvare:. <http://www.gnu.org/gethelp/>.\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
+msgstr "Generelt hjelp med GNU-programvare:. <https://www.gnu.org/gethelp/>.\n"
#: sed/compile.c:146
msgid "multiple `!'s"
@@ -502,11 +495,11 @@ msgstr "ufullstendig kommando"
#: sed/compile.c:188
msgid "\":\" lacks a label"
-msgstr ""
+msgstr "«:» mangler etikett"
#: sed/compile.c:190
msgid "recursive escaping after \\c not allowed"
-msgstr ""
+msgstr "Rekursiv escape etter \\c ikke tillatt"
#: sed/compile.c:213
#, c-format
@@ -518,72 +511,76 @@ msgstr "%s: fil %s linje %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e uttrykk #%lu, tegn %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "kan ikke finne etiketten for hopp til «%s»"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
-msgstr ""
+msgstr "konvertering av bokstavstørrelse ga et ugyldig tegn"
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: kan ikke lese %s: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "Kan ikke redigere %s: er en terminal"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "Kan ikke redigere %s: ikke en vanlig fil "
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: advarsel: klarte ikke å sette standard filopprettelseskontekst til %s: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: advarsel: Klarte ikke å få sikkerhetskontekst med %s: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "Kunne ikke åpne midlertidig fil %s: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "Feil i underprosessen"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "«e»-valget støttes ikke"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "«e»-kommandoen støttes ikke"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "ingen inndatafiler"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "Intet foregående regulært uttrykk"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "ugyldig referanse \\%d på «s»-kommandoens RHS"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr "regex inngangsbufferlengde lengre enn INT_MAX"
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
@@ -603,16 +600,16 @@ msgstr "Paolo Bonzini"
#: sed/sed.c:113
#, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
-"GNU sed hjemmeside:. <http://www.gnu.org/software/sed/>\n"
-"Generelt hjelp med GNU-programvare:. <http://www.gnu.org/gethelp/>.\n"
+"GNU sed hjemmeside:. <https://www.gnu.org/software/sed/>\n"
+"Generelt hjelp med GNU-programvare:. <https://www.gnu.org/gethelp/>.\n"
#: sed/sed.c:120
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
-msgstr ""
+msgstr "Send feilrapporter på e-post til: <%s>\n"
#: sed/sed.c:129
msgid ""
@@ -707,7 +704,7 @@ msgstr ""
" deaktivere alle GNU-utvidelser.\n"
#: sed/sed.c:161
-#, fuzzy, c-format
+#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
" use extended regular expressions in the script\n"
@@ -715,26 +712,27 @@ msgid ""
msgstr ""
" -r, --regexp-extended\n"
" bruk utvidede regulære uttrykk i skriptet.\n"
+" (for portabilitet bruk POSIX -E).\n"
#: sed/sed.c:167
-#, fuzzy, c-format
+#, c-format
msgid ""
" -s, --separate\n"
" consider files as separate rather than as a single,\n"
" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
-" vurder filer som separat i stedet for som en enkelt\n"
+" vurder filer som separate i stedet for en enkelt\n"
" sammenhengende lang strøm.\n"
#: sed/sed.c:170
-#, fuzzy, c-format
+#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
-" -z, --null-data\n"
-" skille linjer ved NULL-tegn\n"
+" --sandbox\n"
+" operere I sandkassemodus (deaktiver e/r/w-kommandoer).\n"
#: sed/sed.c:172
#, c-format
@@ -800,11 +798,11 @@ msgid "couldn't attach to %s: %s"
msgstr "kunne ikke koble til %s: %s"
#: sed/utils.c:192
-#, fuzzy, c-format
+#, c-format
msgid "couldn't write %llu item to %s: %s"
msgid_plural "couldn't write %llu items to %s: %s"
-msgstr[0] "Klarte ikke å skrive %d element til %s: %s"
-msgstr[1] "Klarte ikke å skrive %d elementer til %s: %s"
+msgstr[0] "Klarte ikke å skrive %llu element til %s: %s"
+msgstr[1] "Klarte ikke å skrive %llu elementer til %s: %s"
#: sed/utils.c:204 sed/utils.c:223
#, c-format
@@ -826,6 +824,21 @@ msgstr "kan ikke lese status på %s: %s"
msgid "cannot rename %s: %s"
msgstr "Kan ikke omdøpe %s: %s"
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: valget «--%s» tillater ikke argumenter\n"
+
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: ukjent valg «--%s»\n"
+
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: valget «-W %s» er tvetydig\n"
+
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: valget «-W %s» tillater ikke argumenter\n"
+
+#~ msgid "%s: option '-W %s' requires an argument\n"
+#~ msgstr "%s: valget «-W %s» krever et argument\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr "kan ikke angi modifikatorer på tomt regulært uttrykk"
diff --git a/po/nl.gmo b/po/nl.gmo
index b0409b9..0fc543b 100644
--- a/po/nl.gmo
+++ b/po/nl.gmo
Binary files differ
diff --git a/po/nl.po b/po/nl.po
index eae3920..78f0252 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -1,19 +1,18 @@
# Dutch translations for GNU sed.
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2018 Free Software Foundation, Inc.
# This file is distributed under the same license as the sed package.
#
-# "I wish Europe would let Russia annihilate Turkey a little -- not much,
-# but enough to make it difficult to find the place again."
+# "Zou zij er niet goed aan doen haar oude karakter te huichelen?"
#
# Taco Witte <tcwitte@cs.uu.nl>, 2004, 2005.
-# Benno Schulenberg <benno@vertaalt.nl>, 2005, 2006, 2007, 2008, 2010, 2016.
+# Benno Schulenberg <benno@vertaalt.nl>, 2005, 2006, 2007, 2008, 2010, 2016, 2018.
msgid ""
msgstr ""
-"Project-Id-Version: sed-4.2.2.177\n"
+"Project-Id-Version: sed-4.4.104\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
-"PO-Revision-Date: 2016-12-06 11:39+0100\n"
-"Last-Translator: Benno Schulenberg <benno@vertaalt.nl>\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"PO-Revision-Date: 2018-03-25 15:22+0200\n"
+"Last-Translator: Benno Schulenberg <vertaling@coevern.nl>\n"
"Language-Team: Dutch <vertaling@vrijschrift.org>\n"
"Language: nl\n"
"MIME-Version: 1.0\n"
@@ -21,9 +20,9 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Lokalize 1.0\n"
+"X-Generator: Poedit 2.0.4\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr "schrijffout"
@@ -32,106 +31,81 @@ msgstr "schrijffout"
msgid "preserving permissions for %s"
msgstr "behouden van toegangsrechten van %s"
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr "ongepaarde ["
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
msgid "invalid character class"
msgstr "ongeldige tekenklasse"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "syntax van tekenklasse is [[:space:]], niet [:space:]"
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr "onafgemaakte \\-stuurcode"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
msgstr "ongeldige inhoud van \\{\\}"
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
msgid "regular expression too big"
msgstr "reguliere expressie is te groot"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr "ongepaarde ("
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr "geen syntax opgegeven"
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr "ongepaarde )"
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr "Onbekende systeemfout"
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr "%s: optie '%s' is niet eenduidig; mogelijkheden zijn:"
-
-#: lib/getopt.c:619
-#, c-format
-msgid "%s: option '%s' is ambiguous\n"
-msgstr "%s: optie '%s' is niet eenduidig\n"
-
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr "%s: optie '--%s' staat geen argument toe\n"
+msgid "%s: option '%s%s' is ambiguous\n"
+msgstr "%s: optie '%s%s' is niet eenduidig\n"
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
-msgstr "%s: optie '%c%s' staat geen argument toe\n"
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
+msgstr "%s: optie '%s%s' is niet eenduidig; mogelijkheden zijn:"
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
-msgstr "%s: optie '--%s' vereist een argument\n"
+msgid "%s: unrecognized option '%s%s'\n"
+msgstr "%s: onbekende optie '%s%s'\n"
-#: lib/getopt.c:772 lib/getopt.c:775
+#: lib/getopt.c:345
#, c-format
-msgid "%s: unrecognized option '--%s'\n"
-msgstr "%s: onbekende optie '--%s'\n"
+msgid "%s: option '%s%s' doesn't allow an argument\n"
+msgstr "%s: optie '%s%s' staat geen argument toe\n"
-#: lib/getopt.c:783 lib/getopt.c:786
+#: lib/getopt.c:360
#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr "%s: onbekende optie '%c%s'\n"
+msgid "%s: option '%s%s' requires an argument\n"
+msgstr "%s: optie '%s%s' vereist een argument\n"
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr "%s: ongeldige optie -- '%c'\n"
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr "%s: optie vereist een argument -- '%c'\n"
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr "%s: optie '-W %s' is niet eenduidig\n"
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr "%s: optie '-W %s' staat geen argument toe\n"
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr "%s: optie '-W %s' vereist een argument\n"
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
msgid "memory exhausted"
msgstr "onvoldoende geheugen beschikbaar"
@@ -155,13 +129,13 @@ msgstr "onvoldoende geheugen beschikbaar"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr "‘"
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr "’"
@@ -233,7 +207,7 @@ msgstr "Reguliere expressie is te groot"
msgid "Unmatched ) or \\)"
msgstr "Ongepaarde ) of \\)"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Geen eerdere reguliere expressie"
@@ -262,7 +236,7 @@ msgstr "©"
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -272,7 +246,7 @@ msgstr ""
"Dit is vrije software: u mag het vrijelijk wijzigen en verder verspreiden.\n"
"De precieze licentie is GPL-3+: GNU General Public License versie 3 of "
"later.\n"
-"Zie http://gnu.org/licenses/gpl.html voor de volledige (Engelse) tekst.\n"
+"Zie https://gnu.org/licenses/gpl.html voor de volledige (Engelse) tekst.\n"
"Deze software kent GEEN GARANTIE, voor zover de wet dit toestaat.\n"
"\n"
@@ -412,13 +386,13 @@ msgstr "Webpagina van '%s': <%s>\n"
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
-msgstr "Webpagina van '%s': <http://www.gnu.org/software/%s/>\n"
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+msgstr "Webpagina van '%s': <https://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
-"Algemene hulp bij gebruik van GNU-software: <http://www.gnu.org/gethelp/>\n"
+"Algemene hulp bij gebruik van GNU-software: <https://www.gnu.org/gethelp/>\n"
#: sed/compile.c:146
msgid "multiple `!'s"
@@ -543,73 +517,77 @@ msgstr "%s: bestand %s, regel %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: expressie #%lu, teken %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "kan label voor sprong naar '%s' niet vinden"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr "kastomzetting produceerde een ongeldig teken"
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: kan %s niet lezen: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "kan %s niet bewerken: is een terminal"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "kan %s niet bewerken: is geen gewoon bestand"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: Waarschuwing: kan standaard bestandscreatiecontext niet op %s instellen: "
"%s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: Waarschuwing: kan geen veiligheidscontext van %s verkrijgen: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "kan tijdelijk bestand %s niet openen: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "fout in subproces"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "'e'-opdracht is niet mogelijk"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "'e'-opdracht is niet mogelijk"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "geen invoerbestanden"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "geen eerdere reguliere expressie"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "ongeldige verwijzing \\%d rechts van 's'-opdracht"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr "lengte van regex-invoerbuffer is groter dan INT_MAX"
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
@@ -629,11 +607,11 @@ msgstr "Paolo Bonzini"
#: sed/sed.c:113
#, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
-"Webpagina van GNU sed: <http://www.gnu.org/software/sed/>.\n"
-"Algemene hulp bij gebruik van GNU-software: <http://www.gnu.org/gethelp/>.\n"
+"Webpagina van GNU sed: <https://www.gnu.org/software/sed/>.\n"
+"Algemene hulp bij gebruik van GNU-software: <https://www.gnu.org/gethelp/>.\n"
#: sed/sed.c:120
#, c-format
@@ -761,10 +739,10 @@ msgstr ""
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
" --sandbox\n"
-" in sandbox-modus opereren\n"
+" in sandbox-modus opereren (de e/r/w-commando's uitschakelen)\n"
#: sed/sed.c:172
#, c-format
@@ -857,6 +835,21 @@ msgstr "kan de status van %s niet opvragen: %s"
msgid "cannot rename %s: %s"
msgstr "kan %s niet hernoemen: %s"
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: optie '--%s' staat geen argument toe\n"
+
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: onbekende optie '--%s'\n"
+
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: optie '-W %s' is niet eenduidig\n"
+
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: optie '-W %s' staat geen argument toe\n"
+
+#~ msgid "%s: option '-W %s' requires an argument\n"
+#~ msgstr "%s: optie '-W %s' vereist een argument\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr "bij een lege reguliere expressie passen geen veranderaars"
@@ -880,16 +873,3 @@ msgstr "kan %s niet hernoemen: %s"
#~ msgid "GNU sed version %s\n"
#~ msgstr "GNU sed versie %s\n"
-
-#~ msgid ""
-#~ "Copyright (C) %d Free Software Foundation, Inc.\n"
-#~ "This is free software; see the source for copying conditions. There is "
-#~ "NO\n"
-#~ "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR "
-#~ "PURPOSE,\n"
-#~ "to the extent permitted by law.\n"
-#~ msgstr ""
-#~ "Copyright (C) %d Free Software Foundation, Inc.\n"
-#~ "Dit is vrije software; zie de programmatekst voor de kopieervoorwaarden.\n"
-#~ "Er is GEEN ENKELE garantie, zelfs niet voor VERHANDELBAARHEID of\n"
-#~ "GESCHIKTHEID VOOR EEN BEPAALD DOEL, voor zover de wet dit toestaat.\n"
diff --git a/po/pl.gmo b/po/pl.gmo
index 970f098..a094d0a 100644
--- a/po/pl.gmo
+++ b/po/pl.gmo
Binary files differ
diff --git a/po/pl.po b/po/pl.po
index 3370c7d..fd3eab9 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.2.1\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
"PO-Revision-Date: 2010-06-12 20:01+0200\n"
"Last-Translator: Wojciech Polak <polak@gnu.org>\n"
"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
@@ -21,7 +21,7 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2);\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr ""
@@ -30,109 +30,84 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
#, fuzzy
msgid "invalid character class"
msgstr "Nieprawidłowa nazwa klasy znaku"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "Nieprawidłowa zawartość \\{\\}"
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
#, fuzzy
msgid "regular expression too big"
msgstr "Wyrażenie regularne jest zbyt duże"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr ""
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr ""
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
-
-#: lib/getopt.c:619
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
+msgid "%s: option '%s%s' is ambiguous\n"
msgstr ""
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
msgstr ""
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
+msgid "%s: unrecognized option '%s%s'\n"
msgstr ""
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:345
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
+msgid "%s: option '%s%s' doesn't allow an argument\n"
msgstr ""
-#: lib/getopt.c:772 lib/getopt.c:775
+#: lib/getopt.c:360
#, c-format
-msgid "%s: unrecognized option '--%s'\n"
+msgid "%s: option '%s%s' requires an argument\n"
msgstr ""
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr ""
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr ""
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
#, fuzzy
msgid "memory exhausted"
@@ -157,13 +132,13 @@ msgstr "Pamięć wyczerpana"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr ""
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr ""
@@ -236,7 +211,7 @@ msgstr "Wyrażenie regularne jest zbyt duże"
msgid "Unmatched ) or \\)"
msgstr "Niedopasowany znak ) lub \\)"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Brak poprzedniego wyrażenia regularnego"
@@ -265,7 +240,7 @@ msgstr ""
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -386,12 +361,12 @@ msgstr ""
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
msgstr ""
#: lib/version-etc.c:256
#, fuzzy
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
"Strona projektu GNU sed: <http://www.gnu.org/software/sed/>.\n"
"Pomoc dotycząca oprogramowania GNU: <http://www.gnu.org/gethelp/>.\n"
@@ -520,74 +495,78 @@ msgstr "%s: plik %s linia %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e wyrażenie #%lu, znak %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "nie można znaleźć etykiety dla skoku do `%s'"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: nie można odczytać %s: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "nie można edytować %s: plik jest terminalem"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "nie można edytować %s: to nie jest regularny plik"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: ostrzeżenie: nie powiodło się ustawienie domyślnego kontekstu utworzenia "
"pliku dla %s: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
"%s: ostrzeżenie: nie powiodło się pobranie kontekstu bezpieczeństwa %s: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "nie można otworzyć tymczasowego pliku %s: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "błąd w podprocesie"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "opcja `e' nie jest wspierana"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "polecenie `e' nie jest wspierane"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "brak plików wejściowych"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "brak poprzedniego wyrażenia regularnego"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "nieprawidłowe odwołanie \\%d po prawej stronie polecenia `s'"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
@@ -605,10 +584,10 @@ msgid "Paolo Bonzini"
msgstr ""
#: sed/sed.c:113
-#, c-format
+#, fuzzy, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
"Strona projektu GNU sed: <http://www.gnu.org/software/sed/>.\n"
"Pomoc dotycząca oprogramowania GNU: <http://www.gnu.org/gethelp/>.\n"
@@ -740,7 +719,7 @@ msgstr ""
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
#: sed/sed.c:172
diff --git a/po/pt.gmo b/po/pt.gmo
index b3102fb..44c84bd 100644
--- a/po/pt.gmo
+++ b/po/pt.gmo
Binary files differ
diff --git a/po/pt.po b/po/pt.po
index cf913c6..57950e9 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.2.0\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
"PO-Revision-Date: 2008-01-17 21:25+0100\n"
"Last-Translator: Helder Correia <helder.pereira.correia@gmail.com>\n"
"Language-Team: Portuguese <translation-team-pt@lists.sourceforge.net>\n"
@@ -18,7 +18,7 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=n!=1;\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr ""
@@ -27,109 +27,84 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
#, fuzzy
msgid "invalid character class"
msgstr "Nome de classe de carácter inválido"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "Conteúdo de \\{\\} inválido"
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
#, fuzzy
msgid "regular expression too big"
msgstr "Expressão regular demasiado grande"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr ""
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr ""
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
-
-#: lib/getopt.c:619
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
+msgid "%s: option '%s%s' is ambiguous\n"
msgstr ""
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
msgstr ""
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
+msgid "%s: unrecognized option '%s%s'\n"
msgstr ""
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:345
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
+msgid "%s: option '%s%s' doesn't allow an argument\n"
msgstr ""
-#: lib/getopt.c:772 lib/getopt.c:775
+#: lib/getopt.c:360
#, c-format
-msgid "%s: unrecognized option '--%s'\n"
+msgid "%s: option '%s%s' requires an argument\n"
msgstr ""
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr ""
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr ""
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
#, fuzzy
msgid "memory exhausted"
@@ -154,13 +129,13 @@ msgstr "Memória esgotada"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr ""
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr ""
@@ -233,7 +208,7 @@ msgstr "Expressão regular demasiado grande"
msgid "Unmatched ) or \\)"
msgstr ") ou \\) não correspondido"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Expressão regular anterior não existente"
@@ -262,7 +237,7 @@ msgstr ""
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -383,11 +358,11 @@ msgstr ""
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
msgstr ""
#: lib/version-etc.c:256
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
#: sed/compile.c:146
@@ -514,71 +489,75 @@ msgstr "%s: ficheiro %s linha %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expressão #%lu, carácter %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "etiqueta para saltar para '%s' não encontrada"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: não é possível ler %s: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "não foi possível editar %s: é um terminal"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "não foi possível editar %s: ficheiro não regular"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "não foi possível abrir ficheiro temporário %s: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "erro no subprocesso"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "opção 'e' não suportada"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "comando 'e' não suportado"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "nenhum ficheiro de entrada"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "não há expressão regular anterior"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "referência \\%d inválida no RHS do comando 's'"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
@@ -598,8 +577,8 @@ msgstr ""
#: sed/sed.c:113
#, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
#: sed/sed.c:120
@@ -727,7 +706,7 @@ msgstr ""
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
#: sed/sed.c:172
diff --git a/po/pt_BR.gmo b/po/pt_BR.gmo
index f80abc8..6f838e3 100644
--- a/po/pt_BR.gmo
+++ b/po/pt_BR.gmo
Binary files differ
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 8b159e7..7a8ead3 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -1,18 +1,18 @@
# Brazilian Portuguese translations for sed package
# Traduções em português brasileiro para o pacote sed
-# Copyright (C) 2017 Free Software Foundation, Inc.
+# Copyright (C) 2018 Free Software Foundation, Inc.
# This file is distributed under the same license as the sed package.
# Tradução original da versão 4.01:
-# Juan Carlos Castro y Castro <jcastro@vialink.com.br>, 2002.
+# Juan Carlos Castro y Castro <jcastro@vialink.com.br>, 2002.
# Aurelio Jargas <verde@aurelio.net>, 1999-2010.
-# Rafael Fontenelle <rffontenelle@gmail.com>, 2016, 2017.
+# Rafael Fontenelle <rafaelff@gnome.org>, 2016-2018.
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.2.177\n"
+"Project-Id-Version: sed 4.4.104\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
-"PO-Revision-Date: 2017-01-20 10:44-0200\n"
-"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"PO-Revision-Date: 2018-03-24 12:26-0200\n"
+"Last-Translator: Rafael Fontenelle <rafaelff@gnome.org>\n"
"Language-Team: Brazilian Portuguese <ldpbr-translation@lists.sourceforge."
"net>\n"
"Language: pt_BR\n"
@@ -23,7 +23,7 @@ msgstr ""
"X-Generator: Virtaal 1.0.0-beta1\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr "erro de escrita"
@@ -32,106 +32,81 @@ msgstr "erro de escrita"
msgid "preserving permissions for %s"
msgstr "preservando permissões de %s"
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr "[ sem correspondente"
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
msgid "invalid character class"
msgstr "classe de caracteres inválida"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "a sintaxe de classe de caracteres é [[:space:]], e não [:space:]"
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr "escape \\ não terminado"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
msgstr "conteúdo inválido de \\{\\}"
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
msgid "regular expression too big"
msgstr "expressão regular grande demais"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr "( sem correspondente"
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr "nenhuma sintaxe especificada"
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr ") sem correspondente"
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr "Erro desconhecido de sistema"
-#: lib/getopt.c:575 lib/getopt.c:604
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr "%s: a opção \"%s\" é ambígua; possibilidades:"
+msgid "%s: option '%s%s' is ambiguous\n"
+msgstr "%s: a opção \"%s%s\" é ambígua\n"
-#: lib/getopt.c:619
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
-msgstr "%s: a opção \"%s\" é ambígua\n"
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
+msgstr "%s: a opção \"%s%s\" é ambígua; possibilidades:"
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr "%s: a opção \"--%s\" não permite um argumento\n"
+msgid "%s: unrecognized option '%s%s'\n"
+msgstr "%s: opção não reconhecida \"%s%s\"\n"
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:345
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
-msgstr "%s: a opção \"%c%s\" não permite um argumento\n"
+msgid "%s: option '%s%s' doesn't allow an argument\n"
+msgstr "%s: a opção \"%s%s\" não permite um argumento\n"
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:360
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
-msgstr "%s: a opção \"--%s\" exige um argumento\n"
+msgid "%s: option '%s%s' requires an argument\n"
+msgstr "%s: a opção \"%s%s\" requer um argumento\n"
-#: lib/getopt.c:772 lib/getopt.c:775
-#, c-format
-msgid "%s: unrecognized option '--%s'\n"
-msgstr "%s: opção desconhecida \"--%s\"\n"
-
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr "%s: opção desconhecida \"%c%s\"\n"
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr "%s: opção inválida -- \"%c\"\n"
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr "%s: a opção exige um argumento -- \"%c\"\n"
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr "%s: a opção \"-W %s\" é ambígua\n"
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr "%s: a opção \"-W %s\" não permite um argumento\n"
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr "%s: a opção \"-W %s\" exige um argumento\n"
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
msgid "memory exhausted"
msgstr "memória esgotada"
@@ -155,13 +130,13 @@ msgstr "memória esgotada"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr "“"
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr "”"
@@ -233,7 +208,7 @@ msgstr "Expressão regular grande demais"
msgid "Unmatched ) or \\)"
msgstr ") ou \\) sem correspondente"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Nenhuma expressão regular anterior"
@@ -262,14 +237,14 @@ msgstr "(C)"
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
"\n"
msgstr ""
"\n"
-"Licença GPLv3+: GNU GPL versão 3 ou posterior <http://gnu.org/licenses/gpl."
+"Licença GPLv3+: GNU GPL versão 3 ou posterior <https://gnu.org/licenses/gpl."
"html>\n"
"Este é um software livre: você é livre para alterá-lo e redistribuí-lo.\n"
"NÃO HÁ QUALQUER GARANTIA, na máxima extensão permitida em lei.\n"
@@ -410,12 +385,12 @@ msgstr "Página do %s: <%s>\n"
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
-msgstr "Página do %s: <http://www.gnu.org/software/%s/>\n"
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+msgstr "Página do %s: <https://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
-msgstr "Ajuda geral no uso de software GNU: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
+msgstr "Ajuda geral no uso de software GNU: <https://www.gnu.org/gethelp/>\n"
#: sed/compile.c:146
msgid "multiple `!'s"
@@ -540,72 +515,76 @@ msgstr "%s: arquivo %s linha %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expressão #%lu, caractere %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "não foi possível encontrar a marcação `%s'"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr "conversão maiúsculo/minúsculo produziu um caractere inválido"
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: não foi possível ler %s: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "não foi possível editar %s, pois é um terminal"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "não foi possível editar %s, pois não é um arquivo comum"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: aviso: falha ao definir o default file creation context para %s: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: aviso: falha ao obter o contexto de segurança de %s: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "não foi possível abrir o arquivo temporário %s: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "erro no subprocesso"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "sem suporte à opção `e'"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "sem suporte ao comando `e'"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "nenhum arquivo de entrada"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "não há expressão regular anterior"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "referência inválida \\%d na segunda parte do comando `s'"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr "tamanho do buffer de entrada da expressão regular maior que INT_MAX"
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
@@ -625,11 +604,11 @@ msgstr "Paolo Bonzini"
#: sed/sed.c:113
#, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
-"Página do GNU sed: <http://www.gnu.org/software/sed/>.\n"
-"Ajuda sobre softwares GNU: <http://www.gnu.org/gethelp/>.\n"
+"Página do GNU sed: <https://www.gnu.org/software/sed/>.\n"
+"Ajuda sobre softwares GNU: <https://www.gnu.org/gethelp/>.\n"
#: sed/sed.c:120
#, c-format
@@ -756,10 +735,10 @@ msgstr ""
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
" --sandbox\n"
-" opera em modo sandbox.\n"
+" opera em modo sandbox (desabilita comandos e/r/w).\n"
#: sed/sed.c:172
#, c-format
@@ -853,6 +832,21 @@ msgstr "não foi possível obter o estado de %s: %s"
msgid "cannot rename %s: %s"
msgstr "não foi possível renomear %s: %s"
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: a opção \"--%s\" não permite um argumento\n"
+
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: opção desconhecida \"--%s\"\n"
+
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: a opção \"-W %s\" é ambígua\n"
+
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: a opção \"-W %s\" não permite um argumento\n"
+
+#~ msgid "%s: option '-W %s' requires an argument\n"
+#~ msgstr "%s: a opção \"-W %s\" exige um argumento\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr ""
#~ "Não é permitido especificar modificadores numa expressão regular vazia"
diff --git a/po/ro.gmo b/po/ro.gmo
index d15927d..2c0f446 100644
--- a/po/ro.gmo
+++ b/po/ro.gmo
Binary files differ
diff --git a/po/ro.po b/po/ro.po
index 0dfff74..2916025 100644
--- a/po/ro.po
+++ b/po/ro.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.1.4\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
"PO-Revision-Date: 2005-04-19 12:00-0500\n"
"Last-Translator: Laurentiu Buzdugan <lbuz@rolix.org>\n"
"Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n"
@@ -19,7 +19,7 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr ""
@@ -28,109 +28,84 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
#, fuzzy
msgid "invalid character class"
msgstr "Nume de clas de caractere incorect"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "Coninut incorect pentru \\{\\}"
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
#, fuzzy
msgid "regular expression too big"
msgstr "Expresie regular prea mare"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr ""
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr ""
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
-
-#: lib/getopt.c:619
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
+msgid "%s: option '%s%s' is ambiguous\n"
msgstr ""
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
msgstr ""
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
+msgid "%s: unrecognized option '%s%s'\n"
msgstr ""
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:345
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
+msgid "%s: option '%s%s' doesn't allow an argument\n"
msgstr ""
-#: lib/getopt.c:772 lib/getopt.c:775
+#: lib/getopt.c:360
#, c-format
-msgid "%s: unrecognized option '--%s'\n"
+msgid "%s: option '%s%s' requires an argument\n"
msgstr ""
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr ""
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr ""
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
#, fuzzy
msgid "memory exhausted"
@@ -155,13 +130,13 @@ msgstr "Memorie epuizat"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr ""
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr ""
@@ -234,7 +209,7 @@ msgstr "Expresie regular prea mare"
msgid "Unmatched ) or \\)"
msgstr ") sau \\) fr pereche"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Nici o expresie regular anterioar"
@@ -263,7 +238,7 @@ msgstr ""
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -384,11 +359,11 @@ msgstr ""
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
msgstr ""
#: lib/version-etc.c:256
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
#: sed/compile.c:146
@@ -515,71 +490,75 @@ msgstr "%s: fiierul %s linia %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expresia #%lu, caracterul %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "nu pot gsi eticheta pentru saltul la `%s'"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: nu pot citi %s: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "nu am putut edita %s: acesta este un terminal"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "nu ap putu edita %s: acesta nu este un fiier normal"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "nu am putut deschide fiierul temporar %s: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "eroare n subproces"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "opiunea `e' nu e suportat"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "comanda `e' nu e suportat"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr ""
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "nici o expresie regular anterioar"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "referin invalid \\%d pentru expresia din dreapta a comenzii `s'"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
@@ -599,8 +578,8 @@ msgstr ""
#: sed/sed.c:113
#, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
#: sed/sed.c:120
@@ -725,7 +704,7 @@ msgstr ""
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
#: sed/sed.c:172
diff --git a/po/ru.gmo b/po/ru.gmo
index 1058df5..70b2802 100644
--- a/po/ru.gmo
+++ b/po/ru.gmo
Binary files differ
diff --git a/po/ru.po b/po/ru.po
index b81ec7a..c377ff3 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.2.2.177\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
"PO-Revision-Date: 2016-12-06 19:25+0300\n"
"Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n"
"Language-Team: Russian <gnu@d07.ru>\n"
@@ -22,7 +22,7 @@ msgstr ""
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 1.5\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr "ошибка записи"
@@ -31,106 +31,81 @@ msgstr "ошибка записи"
msgid "preserving permissions for %s"
msgstr "сохранение прав доступа для %s"
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr "несбалансированная ["
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
msgid "invalid character class"
msgstr "неправильный класс символов"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "синтаксис класса символов: [[:space:]], а не [:space:]"
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr "незавершённая \\ экранирующая последовательность"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
msgstr "неправильное содержимое в \\{\\}"
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
msgid "regular expression too big"
msgstr "регулярное выражение слишком большое"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr "несбалансированная ("
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr "не указан синтаксис"
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr "несбалансированная )"
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr "Неизвестная системная ошибка"
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr "%s: двусмысленный параметр «%s»; возможные варианты:"
-
-#: lib/getopt.c:619
-#, c-format
-msgid "%s: option '%s' is ambiguous\n"
+#: lib/getopt.c:278
+#, fuzzy, c-format
+msgid "%s: option '%s%s' is ambiguous\n"
msgstr "%s: двусмысленный параметр «%s»\n"
-#: lib/getopt.c:654 lib/getopt.c:658
-#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr "%s: у параметра «--%s» не может быть аргумента\n"
+#: lib/getopt.c:284
+#, fuzzy, c-format
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
+msgstr "%s: двусмысленный параметр «%s»; возможные варианты:"
-#: lib/getopt.c:667 lib/getopt.c:672
-#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
+#: lib/getopt.c:319
+#, fuzzy, c-format
+msgid "%s: unrecognized option '%s%s'\n"
+msgstr "%s: нераспознанный параметр «%c%s»\n"
+
+#: lib/getopt.c:345
+#, fuzzy, c-format
+msgid "%s: option '%s%s' doesn't allow an argument\n"
msgstr "%s: у параметра «%c%s» не может быть аргумента\n"
-#: lib/getopt.c:715 lib/getopt.c:734
-#, c-format
-msgid "%s: option '--%s' requires an argument\n"
+#: lib/getopt.c:360
+#, fuzzy, c-format
+msgid "%s: option '%s%s' requires an argument\n"
msgstr "%s: для параметра «--%s» требуется аргумент\n"
-#: lib/getopt.c:772 lib/getopt.c:775
-#, c-format
-msgid "%s: unrecognized option '--%s'\n"
-msgstr "%s: нераспознанный параметр «--%s»\n"
-
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr "%s: нераспознанный параметр «%c%s»\n"
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr "%s: недопустимый параметр — «%c»\n"
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr "%s: для параметра требуется аргумент — «%c»\n"
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr "%s: параметр «-W %s» неоднозначен\n"
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr "%s: с параметром «-W %s» нельзя использовать аргумент\n"
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr "%s: для параметра «-W %s» требуется аргумент\n"
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
msgid "memory exhausted"
msgstr "память исчерпана"
@@ -154,13 +129,13 @@ msgstr "память исчерпана"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr "«"
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr "»"
@@ -232,7 +207,7 @@ msgstr "Регулярное выражение слишком большое"
msgid "Unmatched ) or \\)"
msgstr "Непарный символ ) или \\)"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Нет предыдущего регулярного выражения"
@@ -259,9 +234,10 @@ msgid "(C)"
msgstr "©"
#: lib/version-etc.c:86
+#, fuzzy
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -407,12 +383,13 @@ msgid "%s home page: <%s>\n"
msgstr "Домашняя страница %s: <%s>\n"
#: lib/version-etc.c:253
-#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+#, fuzzy, c-format
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
msgstr "Домашняя страница %s: <http://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+#, fuzzy
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr "Справка по работе с программами GNU: <http://www.gnu.org/gethelp/>\n"
#: sed/compile.c:146
@@ -538,73 +515,77 @@ msgstr "%s: файл %s строка %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e выражение #%lu, символ %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "невозможно найти метку для перехода к `%s'"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr "при преобразовании регистра получился некорректный символ"
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: невозможно прочитать %s: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "невозможно редактировать %s: это терминал"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "невозможно редактировать %s: это не обычный файл"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: предупреждение: не удалось установить контекст безопасности файла по "
"умолчанию в %s: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: предупреждение: не удалось получить контекст безопасности %s: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "невозможно открыть временный файл %s: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "ошибка в подпроцессе"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "опция `e' не поддерживается"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "команда `e' не поддерживается"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "отсутствуют входные файлы"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "нет предыдущего регулярного выражения"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "недопустимая ссылка \\%d на RHS команды `s'"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr "Джей Фенласон (Jay Fenlason)"
@@ -622,10 +603,10 @@ msgid "Paolo Bonzini"
msgstr "Паоло Бонзини (Paolo Bonzini)"
#: sed/sed.c:113
-#, c-format
+#, fuzzy, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
"Домашняя страница GNU sed: <http://www.gnu.org/software/sed/>.\n"
"Справка по работе с программами GNU: <http://www.gnu.org/gethelp/>.\n"
@@ -753,10 +734,10 @@ msgstr ""
" длинного непрерывного потока\n"
#: sed/sed.c:170
-#, c-format
+#, fuzzy, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
" --sandbox\n"
" работать в режиме «песочницы»\n"
@@ -852,6 +833,21 @@ msgstr "невозможно выполнить stat для %s: %s"
msgid "cannot rename %s: %s"
msgstr "невозможно переименовать %s: %s"
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: у параметра «--%s» не может быть аргумента\n"
+
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: нераспознанный параметр «--%s»\n"
+
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: параметр «-W %s» неоднозначен\n"
+
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: с параметром «-W %s» нельзя использовать аргумент\n"
+
+#~ msgid "%s: option '-W %s' requires an argument\n"
+#~ msgstr "%s: для параметра «-W %s» требуется аргумент\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr "невозможно указать модификаторы в пустом регулярном выражении"
diff --git a/po/sed.pot b/po/sed.pot
index e973a0a..d3cabeb 100644
--- a/po/sed.pot
+++ b/po/sed.pot
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: GNU sed 4.4\n"
+"Project-Id-Version: GNU sed 4.5\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,7 +18,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr ""
@@ -27,106 +27,81 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
msgid "invalid character class"
msgstr ""
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
msgstr ""
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
msgid "regular expression too big"
msgstr ""
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr ""
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr ""
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
-
-#: lib/getopt.c:619
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
+msgid "%s: option '%s%s' is ambiguous\n"
msgstr ""
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
msgstr ""
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
+msgid "%s: unrecognized option '%s%s'\n"
msgstr ""
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:345
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
+msgid "%s: option '%s%s' doesn't allow an argument\n"
msgstr ""
-#: lib/getopt.c:772 lib/getopt.c:775
+#: lib/getopt.c:360
#, c-format
-msgid "%s: unrecognized option '--%s'\n"
+msgid "%s: option '%s%s' requires an argument\n"
msgstr ""
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr ""
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr ""
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
msgid "memory exhausted"
msgstr ""
@@ -150,13 +125,13 @@ msgstr ""
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr ""
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr ""
@@ -228,7 +203,7 @@ msgstr ""
msgid "Unmatched ) or \\)"
msgstr ""
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr ""
@@ -257,7 +232,7 @@ msgstr ""
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -378,11 +353,11 @@ msgstr ""
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
msgstr ""
#: lib/version-etc.c:256
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
#: sed/compile.c:146
@@ -508,71 +483,75 @@ msgstr ""
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr ""
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr ""
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr ""
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr ""
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr ""
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr ""
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr ""
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr ""
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr ""
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr ""
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr ""
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr ""
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
@@ -592,8 +571,8 @@ msgstr ""
#: sed/sed.c:113
#, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
#: sed/sed.c:120
@@ -692,7 +671,7 @@ msgstr ""
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
#: sed/sed.c:172
diff --git a/po/sk.gmo b/po/sk.gmo
index 471a601..3b60ca7 100644
--- a/po/sk.gmo
+++ b/po/sk.gmo
Binary files differ
diff --git a/po/sk.po b/po/sk.po
index 7cc4386..347bf50 100644
--- a/po/sk.po
+++ b/po/sk.po
@@ -1,15 +1,15 @@
# Slovak translations for GNU sed package.
-# Copyright (C) 1999, 2002, 2003, 2004, 2005, 2008, 2010, 2016 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2002, 2003, 2004, 2005, 2008, 2010, 2016, 2018 Free Software Foundation, Inc.
# This file is distributed under the same license as the sed package.
# Miroslav Vasko <vasko@debian.cz>, 1999.
-# Marcel Telka <marcel@telka.sk>, 2002, 2003, 2004, 2005, 2008, 2010, 2016.
+# Marcel Telka <marcel@telka.sk>, 2002, 2003, 2004, 2005, 2008, 2010, 2016, 2018.
#
msgid ""
msgstr ""
-"Project-Id-Version: GNU sed 4.2.2.177\n"
+"Project-Id-Version: GNU sed 4.4.104\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
-"PO-Revision-Date: 2016-12-25 14:08+0100\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"PO-Revision-Date: 2018-03-24 21:41+0100\n"
"Last-Translator: Marcel Telka <marcel@telka.sk>\n"
"Language-Team: Slovak <sk-i18n@lists.linux.sk>\n"
"Language: sk\n"
@@ -19,7 +19,7 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=3; plural= (n==1) ? 1 : (n>=2 && n<=4) ? 2 : 0;\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr "chyba zápisu"
@@ -28,106 +28,81 @@ msgstr "chyba zápisu"
msgid "preserving permissions for %s"
msgstr "zachovanie oprávnení pre %s"
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr "neuzavretá ["
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
msgid "invalid character class"
msgstr "neplatná trieda znakov"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "syntax triedy znakov je [[:space:]], nie [:space:]"
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr "neukončená riadiaca sekvencia \\"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
msgstr "neplatný obsah \\{\\}"
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
msgid "regular expression too big"
msgstr "regulárny výraz je príliš veľký"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr "neuzavretá ("
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr "nebola zadaná syntax"
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr "neuzavretá )"
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr "Neznáma systémová chyba"
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr "%s: voľba '%s' nie je jednoznačná; možnosti:"
-
-#: lib/getopt.c:619
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
-msgstr "%s: voľba '%s' nie je jednoznačná\n"
+msgid "%s: option '%s%s' is ambiguous\n"
+msgstr "%s: voľba '%s%s' nie je jednoznačná\n"
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr "%s: voľba '--%s' nepovoľuje parameter\n"
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
+msgstr "%s: voľba '%s%s' nie je jednoznačná; možnosti:"
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
-msgstr "%s: voľba '%c%s' nepovoľuje parameter\n"
+msgid "%s: unrecognized option '%s%s'\n"
+msgstr "%s: neznáma voľba '%s%s'\n"
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:345
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
-msgstr "%s: voľba '--%s' vyžaduje parameter\n"
+msgid "%s: option '%s%s' doesn't allow an argument\n"
+msgstr "%s: voľba '%s%s' nepovoľuje parameter\n"
-#: lib/getopt.c:772 lib/getopt.c:775
+#: lib/getopt.c:360
#, c-format
-msgid "%s: unrecognized option '--%s'\n"
-msgstr "%s: neznáma voľba '--%s'\n"
+msgid "%s: option '%s%s' requires an argument\n"
+msgstr "%s: voľba '%s%s' vyžaduje parameter\n"
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr "%s: neznáma voľba '%c%s'\n"
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr "%s: neplatná voľba -- '%c'\n"
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr "%s: voľba vyžaduje parameter -- '%c'\n"
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr "%s: voľba '-W %s' nie je jednoznačná\n"
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr "%s: voľba '-W %s' nepovoľuje parameter\n"
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr "%s: voľba '-W %s' vyžaduje parameter\n"
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
msgid "memory exhausted"
msgstr "vyčerpaná pamäť"
@@ -151,13 +126,13 @@ msgstr "vyčerpaná pamäť"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr "„"
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr "“"
@@ -229,7 +204,7 @@ msgstr "Regulárny výraz je príliš veľký"
msgid "Unmatched ) or \\)"
msgstr "Nezodpovedajúca ) alebo \\)"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Bez predchádzajúceho regulárneho výrazu"
@@ -258,14 +233,14 @@ msgstr "©"
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
"\n"
msgstr ""
"\n"
-"Licencia GPLv3+: GNU GPL verzia 3 alebo novšia <http://gnu.org/licenses/gpl."
+"Licencia GPLv3+: GNU GPL verzia 3 alebo novšia <https://gnu.org/licenses/gpl."
"html>.\n"
"Toto je voľne šíriteľný softvér: môžete ho voľne meniť a ďalej šíriť.\n"
"Neposkytuje sa ŽIADNA ZÁRUKA, v rozsahu povolenom zákonmi.\n"
@@ -407,13 +382,13 @@ msgstr "Domovská stránka %s: <%s>\n"
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
-msgstr "Domovská stránka %s: <http://www.gnu.org/software/%s/>\n"
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+msgstr "Domovská stránka %s: <https://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
-"Všeobecný pomocník na používanie softvéru GNU: <http://www.gnu.org/gethelp/"
+"Všeobecný pomocník na používanie softvéru GNU: <https://www.gnu.org/gethelp/"
">\n"
#: sed/compile.c:146
@@ -539,73 +514,78 @@ msgstr "%s: súbor %s, riadok %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e výraz #%lu, znak %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "nie je možné nájsť návestie pre skok na `%s'"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr "konverzia veľkosti znakov vytvorila neplatný znak"
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %s nie je možné čítať: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "nebolo možné upraviť %s: je to terminál"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "nebolo možné upraviť %s: nie je to bežný súbor"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: upozornenie: zlyhalo nastavenie predvoleného kontextu vytvárania súborov "
"na %s: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: upozornenie: zlyhalo získavanie bezpečnostného kontextu %s: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "nebolo možné otvoriť dočasný súbor %s: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "chyba v podprocese"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "voľba `e' nie je podporovaná"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "príkaz `e' nie je podporovaný"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "bez vstupných súborov"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "bez predchádzajúceho regulárneho výrazu"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "neplatný odkaz \\%d na `s' príkazu RHS"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+"veľkosť vstupnej vyrovnávacej pamäte regulárneho výrazu je väčšia ako INT_MAX"
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
@@ -625,11 +605,11 @@ msgstr "Paolo Bonzini"
#: sed/sed.c:113
#, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
-"Domovská strínka GNU sed: <http://www.gnu.org/software/sed/>.\n"
-"Všeobecný pomocník na používanie softvéru GNU: <http://www.gnu.org/gethelp/"
+"Domovská strínka GNU sed: <https://www.gnu.org/software/sed/>.\n"
+"Všeobecný pomocník na používanie softvéru GNU: <https://www.gnu.org/gethelp/"
">.\n"
#: sed/sed.c:120
@@ -758,10 +738,10 @@ msgstr ""
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
" --sandbox\n"
-" pracovať v režime sandbox.\n"
+" pracovať v režime sandbox (zakázať príkazy e/r/w).\n"
#: sed/sed.c:172
#, c-format
@@ -855,18 +835,3 @@ msgstr "nepodarilo sa zistiť stav %s: %s"
#, c-format
msgid "cannot rename %s: %s"
msgstr "nepodarilo sa premenovať %s: %s"
-
-#~ msgid ""
-#~ "Copyright (C) %d Free Software Foundation, Inc.\n"
-#~ "This is free software; see the source for copying conditions. There is "
-#~ "NO\n"
-#~ "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR "
-#~ "PURPOSE,\n"
-#~ "to the extent permitted by law.\n"
-#~ msgstr ""
-#~ "Copyright (C) %d Free Software Foundation, Inc.\n"
-#~ "Toto je voľné programové vybavenie; podmienky pre kopírovanie a "
-#~ "rozširovanie\n"
-#~ "nájdete v zdrojových textoch. Toto programové vybavenie je BEZ záruky,\n"
-#~ "a to aj bez záruky PREDAJNOSTI alebo VHODNOSTI PRE NEJAKÝ KONKRÉTNY "
-#~ "ÚČEL.\n"
diff --git a/po/sl.gmo b/po/sl.gmo
index 0210776..3ab91b0 100644
--- a/po/sl.gmo
+++ b/po/sl.gmo
Binary files differ
diff --git a/po/sl.po b/po/sl.po
index 43e1b55..830715a 100644
--- a/po/sl.po
+++ b/po/sl.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.2.1\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
"PO-Revision-Date: 2010-11-16 14:45+0100\n"
"Last-Translator: Primož Peterlin <primozz.peterlin@gmail.com>\n"
"Language-Team: Slovenian <translation-team-sl@lists.sourceforge.net>\n"
@@ -20,7 +20,7 @@ msgstr ""
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n"
"%100==4 ? 3 : 0);\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr ""
@@ -29,109 +29,84 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
#, fuzzy
msgid "invalid character class"
msgstr "Neveljavno ime razreda znakov"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "Neveljavna vsebina \\{\\}"
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
#, fuzzy
msgid "regular expression too big"
msgstr "Regularni izraz prevelik"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr ""
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr ""
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
-
-#: lib/getopt.c:619
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
+msgid "%s: option '%s%s' is ambiguous\n"
msgstr ""
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
msgstr ""
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
+msgid "%s: unrecognized option '%s%s'\n"
msgstr ""
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:345
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
+msgid "%s: option '%s%s' doesn't allow an argument\n"
msgstr ""
-#: lib/getopt.c:772 lib/getopt.c:775
+#: lib/getopt.c:360
#, c-format
-msgid "%s: unrecognized option '--%s'\n"
+msgid "%s: option '%s%s' requires an argument\n"
msgstr ""
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr ""
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr ""
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
#, fuzzy
msgid "memory exhausted"
@@ -156,13 +131,13 @@ msgstr "Zmanjkalo pomnilnika"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr ""
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr ""
@@ -235,7 +210,7 @@ msgstr "Regularni izraz prevelik"
msgid "Unmatched ) or \\)"
msgstr "Oklepaj ) ali \\) brez zaklepaja"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Prejšnji regularni izraz manjka"
@@ -264,7 +239,7 @@ msgstr ""
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -385,12 +360,12 @@ msgstr ""
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
msgstr ""
#: lib/version-etc.c:256
#, fuzzy
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
"Domača stran GNU sed: <http://www.gnu.org/software/sed/>.\n"
"Splošna pomoč pri rabi programja GNU: <http://www.gnu.org/gethelp/>.\n"
@@ -519,73 +494,77 @@ msgstr "%s: datoteka %s vrstica %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e izraz #%lu, znak %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "ni moč najti oznake za skok na »%s«"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %s ni mogoče prebrati: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "ni mogoče urejati %s: je terminal"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "ni mogoče urejati %s: ni navadna datoteka"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: opozorilo: neuspešna nastavitev privzetega konteksta ustvarjanja "
"datoteke na %s: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: opozorilo: neuspešno branje varnostnega konteksta za %s: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "ni mogoče odpreti začasne datoteke %s: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "napaka v podprocesu"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "izbira »e« ni podprta"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "ukaz »e« ni podprt"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "ni vhodnih datotek"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "ni prejšnjega regularnega izraza"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "neveljavni sklic \\%d na desni strani ukaza »s«"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
@@ -603,10 +582,10 @@ msgid "Paolo Bonzini"
msgstr ""
#: sed/sed.c:113
-#, c-format
+#, fuzzy, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
"Domača stran GNU sed: <http://www.gnu.org/software/sed/>.\n"
"Splošna pomoč pri rabi programja GNU: <http://www.gnu.org/gethelp/>.\n"
@@ -734,7 +713,7 @@ msgstr ""
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
#: sed/sed.c:172
diff --git a/po/sr.gmo b/po/sr.gmo
index ae4012d..3355779 100644
--- a/po/sr.gmo
+++ b/po/sr.gmo
Binary files differ
diff --git a/po/sr.po b/po/sr.po
index 3210c59..1929756 100644
--- a/po/sr.po
+++ b/po/sr.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed-4.2.2.177\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
"PO-Revision-Date: 2016-12-18 08:03+0200\n"
"Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\n"
"Language-Team: Serbian <(nothing)>\n"
@@ -19,7 +19,7 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr "грешка писања"
@@ -28,106 +28,81 @@ msgstr "грешка писања"
msgid "preserving permissions for %s"
msgstr "причувавам овлашћења за %s"
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr "неуравнотежена ["
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
msgid "invalid character class"
msgstr "неисправна класа знака"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "синтакса класе знака је [[:размак:]], а не [:размак:]"
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr "недовршена \\ излазим"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
msgstr "неисправан садржај \\{\\}"
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
msgid "regular expression too big"
msgstr "регуларни израз је превелик"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr "неуравнотежена ("
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr "синтакса није наведена"
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr "неуравнотежена )"
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr "Непозната грешка система"
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr "%s: опција „%s“ је нејасна; могућности:"
-
-#: lib/getopt.c:619
-#, c-format
-msgid "%s: option '%s' is ambiguous\n"
+#: lib/getopt.c:278
+#, fuzzy, c-format
+msgid "%s: option '%s%s' is ambiguous\n"
msgstr "%s: опција „%s“ је нејасна\n"
-#: lib/getopt.c:654 lib/getopt.c:658
-#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr "%s: опција „--%s“ не дозвољава аргумент\n"
+#: lib/getopt.c:284
+#, fuzzy, c-format
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
+msgstr "%s: опција „%s“ је нејасна; могућности:"
-#: lib/getopt.c:667 lib/getopt.c:672
-#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
+#: lib/getopt.c:319
+#, fuzzy, c-format
+msgid "%s: unrecognized option '%s%s'\n"
+msgstr "%s: непозната опција „%c%s“\n"
+
+#: lib/getopt.c:345
+#, fuzzy, c-format
+msgid "%s: option '%s%s' doesn't allow an argument\n"
msgstr "%s: опција „%c%s“ не дозвољава аргумент\n"
-#: lib/getopt.c:715 lib/getopt.c:734
-#, c-format
-msgid "%s: option '--%s' requires an argument\n"
+#: lib/getopt.c:360
+#, fuzzy, c-format
+msgid "%s: option '%s%s' requires an argument\n"
msgstr "%s: опција „%s“ захтева аргумент\n"
-#: lib/getopt.c:772 lib/getopt.c:775
-#, c-format
-msgid "%s: unrecognized option '--%s'\n"
-msgstr "%s: непозната опција „--%s“\n"
-
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr "%s: непозната опција „%c%s“\n"
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr "%s: неисправна опција — %c\n"
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr "%s: опција захтева аргумент — %c\n"
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr "%s: опција „-W %s“ је нејасна\n"
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr "%s: опција „-W %s“ не дозвољава аргумент\n"
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr "%s: опција „-W %s“ захтева аргумент\n"
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
msgid "memory exhausted"
msgstr "нема више меморије"
@@ -151,13 +126,13 @@ msgstr "нема више меморије"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr "„"
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr "“"
@@ -229,7 +204,7 @@ msgstr "Регуларан израз је превелик"
msgid "Unmatched ) or \\)"
msgstr "Није упарена ) или \\)"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Нема претходног регуларног израза"
@@ -256,9 +231,10 @@ msgid "(C)"
msgstr "©"
#: lib/version-etc.c:86
+#, fuzzy
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -403,12 +379,13 @@ msgid "%s home page: <%s>\n"
msgstr "Матична страница за „%s“: <%s>\n"
#: lib/version-etc.c:253
-#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+#, fuzzy, c-format
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
msgstr "Матична страница за „%s“: <http://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+#, fuzzy
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr "Општа помоћ за Гнуов софтвер: <http://www.gnu.org/gethelp/>\n"
#: sed/compile.c:146
@@ -534,73 +511,77 @@ msgstr "%s: датотека %s ред %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e израз #%lu, знак %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "не могу да нађем ознаку за скок на „%s“"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr "претварање величине знакова је резултирало неисправним знаком"
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: не могу да прочитам %s: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "не могу да уредим %s: то је терминал"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "не могу да уредим %s: није обична датотека"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: упозорење: нисам успео да подесим основни контекст стварања датотеке на "
"%s: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: упозорење: нисам успео да добавим безбедносни контекст за %s: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "не могу да отворим привремену датотеку %s: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "грешка у потпроцесу"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "опција „e“ није подржана"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "наредба „e“ није подржана"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "нема улазних датотека"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "без претходног регуларног израза"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "неисправна референца \\%d на десној страни наредбе „s“"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr "Џеј Фенласон"
@@ -618,10 +599,10 @@ msgid "Paolo Bonzini"
msgstr "Паоло Бонцини"
#: sed/sed.c:113
-#, c-format
+#, fuzzy, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
"Матична страница ГНУ-овог седа: <http://www.gnu.org/software/sed/>.\n"
"Општа помоћ за коришћење ГНУ-ових програма: <http://www.gnu.org/gethelp/>.\n"
@@ -748,10 +729,10 @@ msgstr ""
" непрекидан дуги ток.\n"
#: sed/sed.c:170
-#, c-format
+#, fuzzy, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
" --sandbox\n"
" ради у режиму заштићеног окружења.\n"
@@ -847,6 +828,21 @@ msgstr "не могу да добавим податке „%s“: %s"
msgid "cannot rename %s: %s"
msgstr "не могу да преименујем %s: %s"
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: опција „--%s“ не дозвољава аргумент\n"
+
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: непозната опција „--%s“\n"
+
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: опција „-W %s“ је нејасна\n"
+
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: опција „-W %s“ не дозвољава аргумент\n"
+
+#~ msgid "%s: option '-W %s' requires an argument\n"
+#~ msgstr "%s: опција „-W %s“ захтева аргумент\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr "не можете навести измењивач празном рег. изразу"
diff --git a/po/sv.gmo b/po/sv.gmo
index 4bb611c..36a1fbe 100644
--- a/po/sv.gmo
+++ b/po/sv.gmo
Binary files differ
diff --git a/po/sv.po b/po/sv.po
index 5b32545..598604b 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -1,15 +1,15 @@
# Swedish messages for sed.
-# Copyright © 1999, 2000, 2001, 2002, 2003, 2004, 2008, 2015, 2016 Free Software Foundation, Inc.
+# Copyright © 1999, 2000, 2001, 2002, 2003, 2004, 2008, 2015, 2016, 2017, 2018 Free Software Foundation, Inc.
# This file is distributed under the same license as the sed package.
# Christian Rose <menthos@menthos.com>, 1999, 2000, 2001, 2002, 2003, 2004, 2008.
-# Anders Jonsson <anders.jonsson@norsjovallen.se>, 2015, 2016.
+# Anders Jonsson <anders.jonsson@norsjovallen.se>, 2015, 2016, 2017, 2018.
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.2\n"
+"Project-Id-Version: sed 4.4.104\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
-"PO-Revision-Date: 2016-06-19 23:57+0200\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"PO-Revision-Date: 2018-03-25 22:10+0200\n"
"Last-Translator: Anders Jonsson <anders.jonsson@norsjovallen.se>\n"
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
"Language: sv\n"
@@ -18,124 +18,95 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Poedit 1.8.8\n"
+"X-Generator: Poedit 2.0.6\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
-msgstr ""
+msgstr "skrivfel"
#: lib/copy-acl.c:54
#, c-format
msgid "preserving permissions for %s"
-msgstr ""
+msgstr "bevarar rättigheter för %s"
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
-msgstr ""
+msgstr "obalanserad ["
-#: lib/dfa.c:1071
-#, fuzzy
+#: lib/dfa.c:1079
msgid "invalid character class"
-msgstr "Ogiltigt teckenklassnamn"
+msgstr "ogiltig teckenklass"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
-msgstr ""
+msgstr "syntax för teckenklass är [[:space:]], inte [:space:]"
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
-msgstr ""
+msgstr "oavslutad \\-sekvens"
-#: lib/dfa.c:1436
-#, fuzzy
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
-msgstr "Ogiltigt innehåll i \\{\\}"
+msgstr "ogiltigt innehåll i \\{\\}"
-#: lib/dfa.c:1439
-#, fuzzy
+#: lib/dfa.c:1436
msgid "regular expression too big"
-msgstr "Reguljärt uttryck för stort"
+msgstr "reguljärt uttryck för stort"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
-msgstr ""
+msgstr "obalanserad ("
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
-msgstr ""
+msgstr "ingen syntax angiven"
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
-msgstr ""
+msgstr "obalanserad )"
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
-msgstr ""
-
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
-
-#: lib/getopt.c:619
-#, c-format
-msgid "%s: option '%s' is ambiguous\n"
-msgstr ""
+msgstr "Okänt systemfel"
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr ""
+msgid "%s: option '%s%s' is ambiguous\n"
+msgstr "%s: flaggan ”%s%s” är tvetydig\n"
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
-msgstr ""
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
+msgstr "%s: flaggan ”%s%s” är tvetydig. Möjligheter:"
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
-msgstr ""
+msgid "%s: unrecognized option '%s%s'\n"
+msgstr "%s: okänd flagga ”%s%s”\n"
-#: lib/getopt.c:772 lib/getopt.c:775
+#: lib/getopt.c:345
#, c-format
-msgid "%s: unrecognized option '--%s'\n"
-msgstr ""
+msgid "%s: option '%s%s' doesn't allow an argument\n"
+msgstr "%s: flaggan ”%s%s” tar inget argument\n"
-#: lib/getopt.c:783 lib/getopt.c:786
+#: lib/getopt.c:360
#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
+msgid "%s: option '%s%s' requires an argument\n"
+msgstr "%s: flaggan ”%s%s” kräver ett argument\n"
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
-msgstr ""
+msgstr "%s: ogiltig flagga -- ”%c”\n"
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
-msgstr ""
-
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
+msgstr "%s: flaggan kräver ett argument -- ”%c”\n"
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
-#, fuzzy
msgid "memory exhausted"
-msgstr "Minnet slut"
+msgstr "minnet slut"
#. TRANSLATORS:
#. Get translations for open and closing quotation marks.
@@ -156,15 +127,15 @@ msgstr "Minnet slut"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
-msgstr ""
+msgstr "”"
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
-msgstr ""
+msgstr "”"
#: lib/regcomp.c:135
msgid "Success"
@@ -195,9 +166,8 @@ msgid "Invalid back reference"
msgstr "Ogiltig bakåtreferens"
#: lib/regcomp.c:156
-#, fuzzy
msgid "Unmatched [, [^, [:, [., or [="
-msgstr "Obalanserad [ eller [^"
+msgstr "Obalanserad [, [^, [:, [., eller [="
#: lib/regcomp.c:159
msgid "Unmatched ( or \\("
@@ -235,59 +205,65 @@ msgstr "Reguljärt uttryck för stort"
msgid "Unmatched ) or \\)"
msgstr "Obalanserad ) eller \\)"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Inget tidigare reguljärt uttryck"
#: lib/set-acl.c:46
#, c-format
msgid "setting permissions for %s"
-msgstr ""
+msgstr "sätter rättigheter för %s"
#: lib/version-etc.c:74
#, c-format
msgid "Packaged by %s (%s)\n"
-msgstr ""
+msgstr "Paketerad av %s (%s)\n"
#: lib/version-etc.c:77
#, c-format
msgid "Packaged by %s\n"
-msgstr ""
+msgstr "Paketerad av %s\n"
#. TRANSLATORS: Translate "(C)" to the copyright symbol
#. (C-in-a-circle), if this symbol is available in the user's
#. locale. Otherwise, do not translate "(C)"; leave it as-is.
#: lib/version-etc.c:84
msgid "(C)"
-msgstr ""
+msgstr "©"
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
"\n"
msgstr ""
+"\n"
+"Licens GPLv3+: GNU GPL version 3 eller senare <https://gnu.org/licenses/gpl."
+"html>\n"
+"Det här är fri programvara: du får ändra och distribuera den.\n"
+"Det finns INGEN GARANTI, så långt som tillåts enligt lag.\n"
+"\n"
#. TRANSLATORS: %s denotes an author name.
#: lib/version-etc.c:102
#, c-format
msgid "Written by %s.\n"
-msgstr ""
+msgstr "Skrivet av %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#: lib/version-etc.c:106
#, c-format
msgid "Written by %s and %s.\n"
-msgstr ""
+msgstr "Skrivet av %s och %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#: lib/version-etc.c:110
#, c-format
msgid "Written by %s, %s, and %s.\n"
-msgstr ""
+msgstr "Skrivet av %s, %s och %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -298,6 +274,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"and %s.\n"
msgstr ""
+"Skrivet av %s, %s, %s\n"
+"och %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -308,6 +286,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, and %s.\n"
msgstr ""
+"Skrivet av %s, %s, %s,\n"
+"%s och %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -318,6 +298,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, %s, and %s.\n"
msgstr ""
+"Skrivet av %s, %s, %s,\n"
+"%s, %s och %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -328,6 +310,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, %s, %s, and %s.\n"
msgstr ""
+"Skrivet av %s, %s, %s,\n"
+"%s, %s, %s och %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -339,6 +323,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"and %s.\n"
msgstr ""
+"Skrivet av %s, %s, %s,\n"
+"%s, %s, %s, %s\n"
+"och %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -350,6 +337,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"%s, and %s.\n"
msgstr ""
+"Skrivet av %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s och %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -361,6 +351,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"%s, %s, and others.\n"
msgstr ""
+"Skrivet av %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s och andra.\n"
#. TRANSLATORS: The placeholder indicates the bug-reporting address
#. for this package. Please add _another line_ saying
@@ -372,28 +365,28 @@ msgid ""
"\n"
"Report bugs to: %s\n"
msgstr ""
+"\n"
+"Rapportera fel till: %s\n"
+"Skicka synpunkter på översättningen till <tp-sv@listor.tp-sv.se>.\n"
#: lib/version-etc.c:247
#, c-format
msgid "Report %s bugs to: %s\n"
-msgstr ""
+msgstr "Rapportera fel i %s till: %s\n"
#: lib/version-etc.c:251
#, c-format
msgid "%s home page: <%s>\n"
-msgstr ""
+msgstr "Webbplats för %s: <%s>\n"
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
-msgstr ""
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+msgstr "Webbplats för %s: <https://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
-#, fuzzy
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
-msgstr ""
-"Webbsida för GNU sed: <http://www.gnu.org/software/sed/>.\n"
-"Allmän hjälp för GNU-programvara: <http://www.gnu.org/gethelp/>.\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
+msgstr "Allmän hjälp för GNU-programvara: <https://www.gnu.org/gethelp/>\n"
#: sed/compile.c:146
msgid "multiple `!'s"
@@ -502,11 +495,11 @@ msgstr "ofullständigt kommando"
#: sed/compile.c:188
msgid "\":\" lacks a label"
-msgstr ""
+msgstr "”:” saknar en etikett"
#: sed/compile.c:190
msgid "recursive escaping after \\c not allowed"
-msgstr ""
+msgstr "rekursiva kontrollsekvenser efter \\c tillåts inte"
#: sed/compile.c:213
#, c-format
@@ -518,65 +511,65 @@ msgstr "%s: fil %s rad %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e uttryck #%lu, tecken %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "kan inte hitta etiketten för hopp till ”%s”"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
-msgstr ""
+msgstr "skiftlägeskonvertering producerade ett ogiltigt tecken"
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: kan inte läsa %s: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "kunde inte redigera %s: är en terminal"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "kunde inte redigera %s: inte en vanlig fil"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: varning: misslyckades med att ställa in standardkontext för filskapande "
"till %s: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: varning: misslyckades med att erhålla säkerhetskontext för %s: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "kunde inte öppna temporära filen %s: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "fel i underprocess"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "flaggan ”e” stöds inte"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "kommandot ”e” stöds inte"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "inga indatafiler"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "inget tidigare reguljärt uttryck"
@@ -584,11 +577,15 @@ msgstr "inget tidigare reguljärt uttryck"
# Jag antar RHS står för "right hand side". Man kan då säga
# "... kommandots högersida"
#
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "ogiltig referens \\%d på ”s”-kommandots högersida"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr "indatabuffertlängd för reguljära uttryck större än INT_MAX"
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
@@ -608,16 +605,18 @@ msgstr "Paolo Bonzini"
#: sed/sed.c:113
#, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
-"Webbsida för GNU sed: <http://www.gnu.org/software/sed/>.\n"
-"Allmän hjälp för GNU-programvara: <http://www.gnu.org/gethelp/>.\n"
+"Webbsida för GNU sed: <https://www.gnu.org/software/sed/>.\n"
+"Allmän hjälp för GNU-programvara: <https://www.gnu.org/gethelp/>.\n"
#: sed/sed.c:120
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
+"Skicka felrapporter till: <%s>.\n"
+"Skicka synpunkter på översättningen till <tp-sv@listor.tp-sv.se>.\n"
#: sed/sed.c:129
msgid ""
@@ -713,17 +712,18 @@ msgstr ""
" inaktivera alla GNU-utökningar.\n"
#: sed/sed.c:161
-#, fuzzy, c-format
+#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
" use extended regular expressions in the script\n"
" (for portability use POSIX -E).\n"
msgstr ""
" -r, --regexp-extended\n"
-" använd utökade reguljära uttryck i skriptet.\n"
+" använd utökade reguljära uttryck i skriptet\n"
+" (för portabilitet använd POSIX -E).\n"
#: sed/sed.c:167
-#, fuzzy, c-format
+#, c-format
msgid ""
" -s, --separate\n"
" consider files as separate rather than as a single,\n"
@@ -734,13 +734,13 @@ msgstr ""
" kontinuerlig lång dataström.\n"
#: sed/sed.c:170
-#, fuzzy, c-format
+#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
-" -z, --null-data\n"
-" separera rader med nolltecken\n"
+" --sandbox\n"
+" arbeta i sandlådeläge (inaktivera kommandona e/r/w).\n"
#: sed/sed.c:172
#, c-format
@@ -806,11 +806,11 @@ msgid "couldn't attach to %s: %s"
msgstr "kunde inte fästa vid %s: %s"
#: sed/utils.c:192
-#, fuzzy, c-format
+#, c-format
msgid "couldn't write %llu item to %s: %s"
msgid_plural "couldn't write %llu items to %s: %s"
-msgstr[0] "kunde inte skriva %d objekt till %s: %s"
-msgstr[1] "kunde inte skriva %d objekt till %s: %s"
+msgstr[0] "kunde inte skriva %llu objekt till %s: %s"
+msgstr[1] "kunde inte skriva %llu objekt till %s: %s"
#: sed/utils.c:204 sed/utils.c:223
#, c-format
@@ -832,6 +832,21 @@ msgstr "kan inte ta status på %s: %s"
msgid "cannot rename %s: %s"
msgstr "kan inte byta namn på %s: %s"
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: flaggan ”--%s” tar inget argument\n"
+
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: okänd flagga ”--%s”\n"
+
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: flaggan ”-W %s” är tvetydig\n"
+
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: flaggan ”-W %s” tar inget argument\n"
+
+#~ msgid "%s: option '-W %s' requires an argument\n"
+#~ msgstr "%s: flaggan ”-W %s” kräver ett argument\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr "kan inte ange modifierare på tomt reguljärt uttryck"
diff --git a/po/tr.gmo b/po/tr.gmo
index ca37e8d..29391a9 100644
--- a/po/tr.gmo
+++ b/po/tr.gmo
Binary files differ
diff --git a/po/tr.po b/po/tr.po
index b41ef5f..bcf5d4c 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.2.1\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
"PO-Revision-Date: 2013-04-17 17:34+0200\n"
"Last-Translator: Volkan Gezer <vlkngzr@gmail.com>\n"
"Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n"
@@ -19,7 +19,7 @@ msgstr ""
"X-Generator: Lokalize 1.5\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr ""
@@ -28,110 +28,85 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
#, fuzzy
msgid "invalid character class"
msgstr "Hatalı karakter sınıf ismi"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "\\{\\} içeriği hatalı"
#
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
#, fuzzy
msgid "regular expression too big"
msgstr "Düzenli ifade fazla büyük"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr ""
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr ""
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
-
-#: lib/getopt.c:619
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
+msgid "%s: option '%s%s' is ambiguous\n"
msgstr ""
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
msgstr ""
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
+msgid "%s: unrecognized option '%s%s'\n"
msgstr ""
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:345
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
+msgid "%s: option '%s%s' doesn't allow an argument\n"
msgstr ""
-#: lib/getopt.c:772 lib/getopt.c:775
+#: lib/getopt.c:360
#, c-format
-msgid "%s: unrecognized option '--%s'\n"
+msgid "%s: option '%s%s' requires an argument\n"
msgstr ""
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr ""
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr ""
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
#, fuzzy
msgid "memory exhausted"
@@ -156,13 +131,13 @@ msgstr "Bellek tükendi"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr ""
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr ""
@@ -243,7 +218,7 @@ msgstr "Düzenli ifade fazla büyük"
msgid "Unmatched ) or \\)"
msgstr "Eşleşmeyen ) or \\)"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Daha önce düzenli ifade yok"
@@ -272,7 +247,7 @@ msgstr ""
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -393,12 +368,12 @@ msgstr ""
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
msgstr ""
#: lib/version-etc.c:256
#, fuzzy
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
"GNU sed ana sayfası: <http://www.gnu.org/software/sed/>.\n"
"GNU yazılımı kullanımı hakkında genel yardım: <http://www.gnu.org/gethelp/"
@@ -528,72 +503,76 @@ msgstr "%s: dosya %s satır %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e ifade #%lu, harf %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "`%s'e atlamak için etiket bulunamıyor"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %s okunamıyor: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "%s düzenlenemedi: bu bir terminal"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "%s düzenlenemedi: normal dosya değil"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: uyarı: %s için öntanımlı dosya oluşturma bağlamı ayarlama başarısız: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: uyarı: %s için güvenlik bağlamı alma başarısız: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "geçici dosya %s açılamadı: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "altsüreçte hata"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr " e' seçeneği desteklenmiyor"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "`e' komutu desteklenmiyor"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "girdi dosyası yok"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "daha önce bir düzenli ifade yok"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "`s' komutunun RHS'sinde geçersiz \\%d referansı"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
@@ -611,10 +590,10 @@ msgid "Paolo Bonzini"
msgstr ""
#: sed/sed.c:113
-#, c-format
+#, fuzzy, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
"GNU sed ana sayfası: <http://www.gnu.org/software/sed/>.\n"
"GNU yazılımı kullanımı hakkında genel yardım: <http://www.gnu.org/gethelp/"
@@ -742,7 +721,7 @@ msgstr ""
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
#: sed/sed.c:172
diff --git a/po/uk.gmo b/po/uk.gmo
index 41995f2..a19f129 100644
--- a/po/uk.gmo
+++ b/po/uk.gmo
Binary files differ
diff --git a/po/uk.po b/po/uk.po
index 8c4642d..8020933 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -4,13 +4,13 @@
#
# Volodymyr M. Lisivka <lvm@mystery.lviv.net>, 2003.
# Dmytro O. Redchuk <dor@kiev-online.net>, 2002.
-# Yuri Chornoivan <yurchor@ukr.net>, 2012, 2016.
+# Yuri Chornoivan <yurchor@ukr.net>, 2012, 2016, 2018.
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.2.177\n"
+"Project-Id-Version: sed 4.4.104\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
-"PO-Revision-Date: 2016-12-06 12:33+0200\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"PO-Revision-Date: 2018-03-24 13:46+0200\n"
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
"Language-Team: Ukrainian <translation-team-uk@lists.sourceforge.net>\n"
"Language: uk\n"
@@ -18,11 +18,11 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
-"X-Generator: Lokalize 1.5\n"
+"X-Generator: Lokalize 2.0\n"
"Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n"
"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr "помилка під час спроби запису"
@@ -31,106 +31,81 @@ msgstr "помилка під час спроби запису"
msgid "preserving permissions for %s"
msgstr "зберігаємо права доступу для %s"
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr "неурівноважена ["
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
msgid "invalid character class"
msgstr "некоректний клас символів"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "синтаксис класу символів передбачає [[:space:]], а не [:space:]"
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr "незавершене екранування \\"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
msgstr "некоректний вміст \\{\\}"
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
msgid "regular expression too big"
msgstr "занадто об'ємний формальний вираз"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr "неурівноважена ("
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr "не вказано синтаксису"
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr "неурівноважена )"
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr "Невідома помилка системи"
-#: lib/getopt.c:575 lib/getopt.c:604
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr "%s: параметр «%s» є неоднозначним; можливі варіанти:"
+msgid "%s: option '%s%s' is ambiguous\n"
+msgstr "%s: параметр «%s%s» є неоднозначним\n"
-#: lib/getopt.c:619
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
-msgstr "%s: параметр «%s» є неоднозначним\n"
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
+msgstr "%s: параметр «%s%s» є неоднозначним; можливі варіанти:"
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr "%s: додавання аргументів до параметра «--%s» не передбачено\n"
+msgid "%s: unrecognized option '%s%s'\n"
+msgstr "%s: невідомий параметр «%s%s»\n"
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:345
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
-msgstr "%s: додавання аргументів до параметра «%c%s» не передбачено\n"
+msgid "%s: option '%s%s' doesn't allow an argument\n"
+msgstr "%s: додавання аргументів до параметра «%s%s» не передбачено\n"
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:360
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
-msgstr "%s: до параметра «--%s» слід додати аргумент\n"
+msgid "%s: option '%s%s' requires an argument\n"
+msgstr "%s: до параметра «%s%s» слід додати аргумент\n"
-#: lib/getopt.c:772 lib/getopt.c:775
-#, c-format
-msgid "%s: unrecognized option '--%s'\n"
-msgstr "%s: невідомий параметр «--%s»\n"
-
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr "%s: невідомий параметр «%c%s»\n"
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr "%s: некоректний параметр — «%c»\n"
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr "%s: до параметра слід додати аргумент — «%c»\n"
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr "%s: параметр «-W %s» не є однозначним\n"
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr "%s: додавання аргументів до параметра «-W %s» не передбачено\n"
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr "%s: до параметра «-W %s» слід додати аргумент\n"
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
msgid "memory exhausted"
msgstr "пам’ять вичерпано"
@@ -154,13 +129,13 @@ msgstr "пам’ять вичерпано"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr "«"
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr "»"
@@ -232,7 +207,7 @@ msgstr "Надто великий регулярний вираз"
msgid "Unmatched ) or \\)"
msgstr "Не закрито ) чи \\)"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Немає попереднього регулярного виразу"
@@ -261,15 +236,15 @@ msgstr "©"
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
"\n"
msgstr ""
"\n"
-"Умови ліцензування викладено у GPLv3+: GNU GPL версії 3 або новішій, <http://"
-"gnu.org/licenses/gpl.html>\n"
+"Умови ліцензування викладено у GPLv3+: GNU GPL версії 3 або новішій, "
+"<https://gnu.org/licenses/gpl.html>\n"
"Це вільне програмне забезпечення: ви можете вільно змінювати і поширювати "
"його.\n"
"Вам не надається ЖОДНИХ ГАРАНТІЙ, окрім гарантій передбачених "
@@ -408,14 +383,14 @@ msgstr "Домашня сторінка %s: <%s>\n"
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
-msgstr "Домашня сторінка %s: <http://www.gnu.org/software/%s/>\n"
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+msgstr "Домашня сторінка %s: <https://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
"Загальна довідкова інформація щодо використання програмного забезпечення "
-"GNU: <http://www.gnu.org/gethelp/>\n"
+"GNU: <https://www.gnu.org/gethelp/>\n"
#: sed/compile.c:146
msgid "multiple `!'s"
@@ -540,73 +515,77 @@ msgstr "%s: файл %s, рядок %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e вираз #%lu, літера %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "не вдалося знайти мітку для переходу до «%s»"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr "перетворення регістрів літер призвело до появи некоректного символу"
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: неможливо прочитати %s: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "не вдалося змінити %s: цей об’єкт є терміналом"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "не вдалося змінити %s: не є звичайним файлом"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: попередження: не вдалося встановити типовий контекст створення файла у "
"%s: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: попередження: не вдалося отримати контекст захисту %s: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "не вдалося відкрити тимчасовий файл %s: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "помилка у підпроцесі"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "ключ \"e\" не підтримується"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "команда \"e\" не підтримується"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "немає вхідних даних"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "немає попереднього формального виразу"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "некоректне посилання \\%d праворуч від команди «s»"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr "довжина вхідного буфера формального виразу перевищує INT_MAX"
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
@@ -626,11 +605,11 @@ msgstr "Paolo Bonzini"
#: sed/sed.c:113
#, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
-"Домашня сторінка GNU sed: <http://www.gnu.org/software/sed/>.\n"
-"Загальні довідкові матеріали щодо користування програмами GNU: <http://www."
+"Домашня сторінка GNU sed: <https://www.gnu.org/software/sed/>.\n"
+"Загальні довідкові матеріали щодо користування програмами GNU: <https://www."
"gnu.org/gethelp/>.\n"
#: sed/sed.c:120
@@ -761,10 +740,10 @@ msgstr ""
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
" --sandbox\n"
-" працювати у режимі пісочниці.\n"
+" працювати у режимі пісочниці (вимкнути команди e/r/w).\n"
#: sed/sed.c:172
#, c-format
@@ -862,6 +841,21 @@ msgstr "не вдалося отримати статистичні дані щ
msgid "cannot rename %s: %s"
msgstr "не вдалося перейменувати %s: %s"
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: додавання аргументів до параметра «--%s» не передбачено\n"
+
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: невідомий параметр «--%s»\n"
+
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: параметр «-W %s» не є однозначним\n"
+
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: додавання аргументів до параметра «-W %s» не передбачено\n"
+
+#~ msgid "%s: option '-W %s' requires an argument\n"
+#~ msgstr "%s: до параметра «-W %s» слід додати аргумент\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr "не можна вказувати модифікатори щодо порожнього формального виразу"
diff --git a/po/vi.gmo b/po/vi.gmo
index 6a9e172..1d6122e 100644
--- a/po/vi.gmo
+++ b/po/vi.gmo
Binary files differ
diff --git a/po/vi.po b/po/vi.po
index 84072dd..c508722 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -3,14 +3,14 @@
# Copyright © 2016 Free Software Foundation, Inc.
# This file is distributed under the same license as the sed package.
# Clytie Siddall <clytie@riverland.net.au>, 2005-2010.
-# Trần Ngọc Quân <vnwildman@gmail.com>, 2012-2014, 2016.
+# Trần Ngọc Quân <vnwildman@gmail.com>, 2012-2014, 2016, 2018.
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.2.177\n"
+"Project-Id-Version: sed 4.4.104\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
-"PO-Revision-Date: 2016-12-09 13:31+0700\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"PO-Revision-Date: 2018-03-25 08:52+0700\n"
"Last-Translator: Trần Ngọc Quân <vnwildman@gmail.com>\n"
"Language-Team: Vietnamese <translation-team-vi@lists.sourceforge.net>\n"
"Language: vi\n"
@@ -21,7 +21,7 @@ msgstr ""
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Gtranslator 2.91.7\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr "lỗi ghi"
@@ -30,106 +30,81 @@ msgstr "lỗi ghi"
msgid "preserving permissions for %s"
msgstr "giữ nguyên quyền hạn cho %s"
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr "thiếu dấu ngoặc vuông mở ["
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
msgid "invalid character class"
msgstr "sai lớp ký tự"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "cú pháp lớp ký tự là [[:space:]], không phải [:space:]"
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr "chưa kết thúc thoát chuỗi \\"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
msgstr "nội dung của “\\{\\}” không hợp lệ"
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
msgid "regular expression too big"
msgstr "biểu thức chính quy quá lớn"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr "thiếu dấu ngoặc đơn mở ("
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr "chưa đưa ra cú pháp"
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr "thiếu dấu ngoặc đơn đóng )"
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr "Gặp lỗi hệ thống chưa biết"
-#: lib/getopt.c:575 lib/getopt.c:604
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr "%s: tùy chọn “%s” chưa rõ ràng; khả năng là:"
+msgid "%s: option '%s%s' is ambiguous\n"
+msgstr "%s: tùy chọn “%s%s” chưa rõ ràng\n"
-#: lib/getopt.c:619
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
-msgstr "%s: tùy chọn “%s” chưa rõ ràng\n"
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
+msgstr "%s: tùy chọn “%s%s” chưa rõ ràng; khả năng là:"
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr "%s: tùy chọn “--%s” không cho phép đối số\n"
+msgid "%s: unrecognized option '%s%s'\n"
+msgstr "%s: không nhận ra tùy chọn “%s%s”\n"
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:345
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
-msgstr "%s: tùy chọn \"%c%s\" không cho phép đối số\n"
+msgid "%s: option '%s%s' doesn't allow an argument\n"
+msgstr "%s: tùy chọn “%s%s” không không cho phép một đối số\n"
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:360
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
-msgstr "%s: tùy chọn “%s” yêu cầu một đối số\n"
+msgid "%s: option '%s%s' requires an argument\n"
+msgstr "%s: tùy chọn “%s%s” cần một đối số\n"
-#: lib/getopt.c:772 lib/getopt.c:775
-#, c-format
-msgid "%s: unrecognized option '--%s'\n"
-msgstr "%s: không nhận ra tùy chọn “--%s”\n"
-
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr "%s: không nhận ra tùy chọn “%c%s”\n"
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr "%s: tùy chọn không hợp lệ -- “%c”\n"
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr "%s: tùy chọn yêu cầu một đối số -- “%c”\n"
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr "%s: tùy chọn “-W %s” chưa rõ ràng\n"
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr "%s: tùy chọn “-W %s” không nhận một đối số\n"
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr "%s: tùy chọn “-W %s” yêu cầu một đối số\n"
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
msgid "memory exhausted"
msgstr "hết bộ nhớ"
@@ -153,13 +128,13 @@ msgstr "hết bộ nhớ"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr "“"
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr "”"
@@ -231,7 +206,7 @@ msgstr "Biểu thức chính quy quá lớn"
msgid "Unmatched ) or \\)"
msgstr "Có dấu ngoặc đơn đóng “)” hay “\\)” lẻ đôi"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "Không có biểu thức chính quy đi trước"
@@ -260,16 +235,16 @@ msgstr "©"
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
"\n"
msgstr ""
"\n"
-"GPLv3+: Giấy Phép Công Cộng GNU, phiên bản 3 hay mới hơn <http://gnu.org/"
-"licenses/gpl.html>\n"
-"Đây là phần mềm tự do: bạn có quyền thay đổi và phát hành lại nó.\n"
+"Giấy phép GPL pb3+: Giấy phép Công cộng GNU phiên bản 3 hay sau <https://gnu."
+"org/licenses/gpl.html>.\n"
+"Đây là phần mềm tự do: bạn có quyền sửa đổi và phát hành lại nó.\n"
"KHÔNG CÓ BẢO HÀNH GÌ CẢ, với điều kiện được pháp luật cho phép.\n"
"\n"
@@ -408,13 +383,13 @@ msgstr "Trang chủ %s: <%s>\n"
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
-msgstr "Trang chủ %s: <http://www.gnu.org/software/%s/>\n"
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+msgstr "Trang chủ %s: <https://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
-"Trợ giúp chung về cách sử dụng phần mềm GNU: <http://www.gnu.org/gethelp/>\n"
+"Trợ giúp chung về cách sử dụng phần mềm GNU: <https://www.gnu.org/gethelp/>\n"
#: sed/compile.c:146
msgid "multiple `!'s"
@@ -539,72 +514,76 @@ msgstr "%s: tập tin %s dòng %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e biểu thức #%lu, ký tự %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "không tìm thấy nhãn để nhảy tới “%s”"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr "chuyển đổi HOA/thường sinh ra một ký tự không hợp lệ"
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: không thể đọc %s: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "không thể chỉnh sửa %s: là thiết bị cuối"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "không thể chỉnh sửa %s: không phải là tập tin thường"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: cảnh báo: gặp lỗi khi đặt ngữ cảnh tạo tập tin mặc định thành %s: %s"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: cảnh báo: không lấy được ngữ cảnh bảo mật của %s: %s"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "không thể mở tập tin tạm thời %s: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "gặp lỗi trong tiến trình con"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "không hỗ trợ tùy chọn “e”"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "không hỗ trợ lệnh “e”"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "không có tập tin đầu vào"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "không có biểu thức chính quy nằm trước"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "tham chiếu không hợp lệ “\\%d” bên phải lệnh “s”"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr "chiều dài bộ đện đầu vào regex lớn hơn INT_MAX"
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
@@ -624,11 +603,11 @@ msgstr "Paolo Bonzini"
#: sed/sed.c:113
#, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
-"Trang chủ của sed GNU: <http://www.gnu.org/software/sed/>.\n"
-"Trợ giúp dùng chung cho các phần mềm tại GNU: <http://www.gnu.org/gethelp/"
+"Trang chủ của sed GNU: <https://www.gnu.org/software/sed/>.\n"
+"Trợ giúp dùng chung cho các phần mềm tại GNU: <https://www.gnu.org/gethelp/"
">.\n"
#: sed/sed.c:120
@@ -758,10 +737,10 @@ msgstr ""
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
" --sandbox\n"
-" thực hiện trong chế độ sandbox.\n"
+" thực hiện trong chế độ sandbox (tắt lệnh e/r/w).\n"
#: sed/sed.c:172
#, c-format
@@ -853,6 +832,21 @@ msgstr "không thể lấy thống kê %s: %s"
msgid "cannot rename %s: %s"
msgstr "không thể đổi tên %s: %s"
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: tùy chọn “--%s” không cho phép đối số\n"
+
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s: không nhận ra tùy chọn “--%s”\n"
+
+#~ msgid "%s: option '-W %s' is ambiguous\n"
+#~ msgstr "%s: tùy chọn “-W %s” chưa rõ ràng\n"
+
+#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
+#~ msgstr "%s: tùy chọn “-W %s” không nhận một đối số\n"
+
+#~ msgid "%s: option '-W %s' requires an argument\n"
+#~ msgstr "%s: tùy chọn “-W %s” yêu cầu một đối số\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr "không thể ghi rõ cờ sửa đổi với biểu thức chính quy trống"
diff --git a/po/zh_CN.gmo b/po/zh_CN.gmo
index 1688fcb..1692fb3 100644
--- a/po/zh_CN.gmo
+++ b/po/zh_CN.gmo
Binary files differ
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 854e5b5..ecc63bd 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -1,15 +1,17 @@
# Simplified Chinese(zh_CN) translation for sed
+# This file is distributed under the same license as the sed package.
#
# Copyright (C) 2002, 2007, 2008 Free Software Foundation, Inc.
-# LI Daobing <lidaobing@gmail.com>, 2007, 2008.
# Wang Li <charles@linux.net.cn>, 2002.
+# LI Daobing <lidaobing@gmail.com>, 2007, 2008.
+# Boyuan Yang <073plan@gmail.com>, 2017.
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.0\n"
+"Project-Id-Version: sed 4.2.2.177\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
-"PO-Revision-Date: 2008-01-28 23:17+0800\n"
-"Last-Translator: LI Daobing <lidaobing@gmail.com>\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"PO-Revision-Date: 2017-12-17 20:32+0800\n"
+"Last-Translator: Boyuan Yang <073plan@gmail.com>\n"
"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
@@ -17,121 +19,93 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Poedit 2.0.5\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
-msgstr ""
+msgstr "写入错误"
#: lib/copy-acl.c:54
#, c-format
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
-msgstr ""
+msgstr "不对称的 ["
-#: lib/dfa.c:1071
-#, fuzzy
+#: lib/dfa.c:1079
msgid "invalid character class"
-msgstr "非法的字符类型名"
+msgstr "非法的字符类型"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
-msgstr ""
+msgstr "未结束的 \\ 转义"
-#: lib/dfa.c:1436
-#, fuzzy
+#: lib/dfa.c:1433
msgid "invalid content of \\{\\}"
msgstr "“\\{\\}”中内容非法"
-#: lib/dfa.c:1439
-#, fuzzy
+#: lib/dfa.c:1436
msgid "regular expression too big"
msgstr "正则表达式过大"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
-msgstr ""
+msgstr "不对称的 ("
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
-msgstr ""
+msgstr "未指定语法"
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
-msgstr ""
+msgstr "不对称的 )"
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
-msgstr ""
+msgstr "未知的系统错误"
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
-
-#: lib/getopt.c:619
-#, c-format
-msgid "%s: option '%s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:654 lib/getopt.c:658
-#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr ""
+#: lib/getopt.c:278
+#, fuzzy, c-format
+msgid "%s: option '%s%s' is ambiguous\n"
+msgstr "%s:选项“%s”是不明确的\n"
-#: lib/getopt.c:667 lib/getopt.c:672
-#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
-msgstr ""
+#: lib/getopt.c:284
+#, fuzzy, c-format
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
+msgstr "%s:选项“%s”是不明确的;可能是:"
-#: lib/getopt.c:715 lib/getopt.c:734
-#, c-format
-msgid "%s: option '--%s' requires an argument\n"
-msgstr ""
+#: lib/getopt.c:319
+#, fuzzy, c-format
+msgid "%s: unrecognized option '%s%s'\n"
+msgstr "%s:无法识别的选项“%c%s”\n"
-#: lib/getopt.c:772 lib/getopt.c:775
-#, c-format
-msgid "%s: unrecognized option '--%s'\n"
-msgstr ""
+#: lib/getopt.c:345
+#, fuzzy, c-format
+msgid "%s: option '%s%s' doesn't allow an argument\n"
+msgstr "%s:选项“-W %s”需要一个参数\n"
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
+#: lib/getopt.c:360
+#, fuzzy, c-format
+msgid "%s: option '%s%s' requires an argument\n"
+msgstr "%s:选项“-W %s”需要一个参数\n"
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
-msgstr ""
+msgstr "%s:无效选项 -- “%c”\n"
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr ""
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
-#, fuzzy
msgid "memory exhausted"
msgstr "内存耗尽"
@@ -154,15 +128,15 @@ msgstr "内存耗尽"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
-msgstr ""
+msgstr "“"
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
-msgstr ""
+msgstr "”"
#: lib/regcomp.c:135
msgid "Success"
@@ -186,16 +160,15 @@ msgstr "非法的字符类型名"
#: lib/regcomp.c:150
msgid "Trailing backslash"
-msgstr "尾端的“\\”"
+msgstr "尾端的反斜杠"
#: lib/regcomp.c:153
msgid "Invalid back reference"
msgstr "非法回引用"
#: lib/regcomp.c:156
-#, fuzzy
msgid "Unmatched [, [^, [:, [., or [="
-msgstr "未匹配的“[”或者“[^”"
+msgstr "未匹配的“[”、“[^”、“[:”、“[.”或“[=”"
#: lib/regcomp.c:159
msgid "Unmatched ( or \\("
@@ -233,59 +206,66 @@ msgstr "正则表达式过大"
msgid "Unmatched ) or \\)"
msgstr "未匹配的“)”或者“\\)”"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "前面没有正则表达式"
#: lib/set-acl.c:46
#, c-format
msgid "setting permissions for %s"
-msgstr ""
+msgstr "设置 %s 的权限"
#: lib/version-etc.c:74
#, c-format
msgid "Packaged by %s (%s)\n"
-msgstr ""
+msgstr "由 %s (%s)打包\n"
#: lib/version-etc.c:77
#, c-format
msgid "Packaged by %s\n"
-msgstr ""
+msgstr "由 %s 打包\n"
#. TRANSLATORS: Translate "(C)" to the copyright symbol
#. (C-in-a-circle), if this symbol is available in the user's
#. locale. Otherwise, do not translate "(C)"; leave it as-is.
#: lib/version-etc.c:84
msgid "(C)"
-msgstr ""
+msgstr "(C)"
#: lib/version-etc.c:86
+#, fuzzy
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
"\n"
msgstr ""
+"\n"
+"许可证:GPLv3+:GNU 通用公共许可证第 3 版或更新版本<http://gnu.org/licenses/"
+"gpl.html>。\n"
+"本软件是自由软件:您可以自由修改和重新发布它。\n"
+"在法律范围内没有其他保证。\n"
+"\n"
#. TRANSLATORS: %s denotes an author name.
#: lib/version-etc.c:102
#, c-format
msgid "Written by %s.\n"
-msgstr ""
+msgstr "由 %s 编写。\n"
#. TRANSLATORS: Each %s denotes an author name.
#: lib/version-etc.c:106
#, c-format
msgid "Written by %s and %s.\n"
-msgstr ""
+msgstr "由 %s 和 %s 编写。\n"
#. TRANSLATORS: Each %s denotes an author name.
#: lib/version-etc.c:110
#, c-format
msgid "Written by %s, %s, and %s.\n"
-msgstr ""
+msgstr "由 %s、%s 和 %s 编写。\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -296,6 +276,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"and %s.\n"
msgstr ""
+"由 %s、%s、%s 和\n"
+"%s 编写。\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -306,6 +288,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, and %s.\n"
msgstr ""
+"由 %s、%s、%s、\n"
+"%s 和 %s 编写。\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -316,6 +300,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, %s, and %s.\n"
msgstr ""
+"由 %s、%s、%s、\n"
+"%s、%s 和 %s 编写。\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -326,6 +312,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, %s, %s, and %s.\n"
msgstr ""
+"由 %s、%s、%s、\n"
+"%s、%s、%s 和 %s 编写。\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -337,6 +325,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"and %s.\n"
msgstr ""
+"由 %s、%s、%s、\n"
+"%s、%s、%s、%s\n"
+"和 %s 编写。\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -348,6 +339,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"%s, and %s.\n"
msgstr ""
+"由 %s、%s、%s、\n"
+"%s、%s、%s、%s、\n"
+"%s、和 %s 编写。\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -359,6 +353,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"%s, %s, and others.\n"
msgstr ""
+"由 %s、%s、%s、\n"
+"%s、%s、%s、%s、\n"
+"%s、%s 和其他人编写。\n"
#. TRANSLATORS: The placeholder indicates the bug-reporting address
#. for this package. Please add _another line_ saying
@@ -370,25 +367,28 @@ msgid ""
"\n"
"Report bugs to: %s\n"
msgstr ""
+"\n"
+"请向<%s> 报告软件错误。请向 <i18n-zh@googlegroups.com> 报告翻译错误。\n"
#: lib/version-etc.c:247
#, c-format
msgid "Report %s bugs to: %s\n"
-msgstr ""
+msgstr "请将 %s 的错误报告至:%s\n"
#: lib/version-etc.c:251
#, c-format
msgid "%s home page: <%s>\n"
-msgstr ""
+msgstr "%s 的主页:<%s>\n"
#: lib/version-etc.c:253
-#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
-msgstr ""
+#, fuzzy, c-format
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+msgstr "%s 项目主页:<http://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
-msgstr ""
+#, fuzzy
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
+msgstr "GNU 软件一般性帮助:<http://www.gnu.org/gethelp/>\n"
#: sed/compile.c:146
msgid "multiple `!'s"
@@ -492,9 +492,8 @@ msgid "unknown command: `%c'"
msgstr "未知的命令:“%c”"
#: sed/compile.c:186
-#, fuzzy
msgid "incomplete command"
-msgstr "遗漏命令"
+msgstr "不完整的命令"
#: sed/compile.c:188
msgid "\":\" lacks a label"
@@ -502,7 +501,7 @@ msgstr ""
#: sed/compile.c:190
msgid "recursive escaping after \\c not allowed"
-msgstr ""
+msgstr "不允许 \\c 后的递归转义"
#: sed/compile.c:213
#, c-format
@@ -514,98 +513,104 @@ msgstr "%s:文件 %s 行号:%lu:%s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s:-e 表达式 #%lu,字符 %lu:%s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "无法为目的为“%s”的跳转找到标签"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s:无法读取 %s:%s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "无法编辑文件 %s: 这是一个终端"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "无法编辑文件 %s: 不是一个普通文件"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "无法打开临时文件 %s: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "子进程出错"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "不支持选项“e”"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "不支持命令“e”"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "没有输入文件"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "前面没有正则表达式"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "“s”命令的RHS非法引用\\%d"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
-msgstr ""
+msgstr "Jay Fenlason"
#: sed/sed.c:36
msgid "Tom Lord"
-msgstr ""
+msgstr "Tom Lord"
#: sed/sed.c:37
msgid "Ken Pizzini"
-msgstr ""
+msgstr "Ken Pizzini"
#: sed/sed.c:38
msgid "Paolo Bonzini"
-msgstr ""
+msgstr "Paolo Bonzini"
#: sed/sed.c:113
-#, c-format
+#, fuzzy, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
+"GNU sed 主页:<http://www.gnu.org/software/sed/>。\n"
+"使用 GNU 软件的一般性帮助:<http://www.gnu.org/gethelp/>。\n"
#: sed/sed.c:120
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
-msgstr ""
+msgstr "请将错误报告发送至:<%s>。\n"
#: sed/sed.c:129
msgid ""
@@ -719,11 +724,13 @@ msgstr ""
" 将输入文件视为各个独立的文件而不是一个长的连续输入\n"
#: sed/sed.c:170
-#, c-format
+#, fuzzy, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
+" --sandbox\n"
+" 在沙盒模式中进行操作。\n"
#: sed/sed.c:172
#, c-format
@@ -742,6 +749,8 @@ msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
+" -z, --null-data\n"
+" 使用 NUL 字符分隔各行\n"
#: sed/sed.c:177
#, c-format
@@ -809,6 +818,9 @@ msgstr "无法获取 %s 的状态: %s"
msgid "cannot rename %s: %s"
msgstr "无法重命名 %s:%s"
+#~ msgid "%s: unrecognized option '--%s'\n"
+#~ msgstr "%s:无法识别的选项“--%s”\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr "无法对空正则表达式指定修饰符"
diff --git a/po/zh_TW.gmo b/po/zh_TW.gmo
index c59140f..38217a6 100644
--- a/po/zh_TW.gmo
+++ b/po/zh_TW.gmo
Binary files differ
diff --git a/po/zh_TW.po b/po/zh_TW.po
index a3e0e0b..0cd5c5c 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.2.1\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2017-02-03 17:17-0800\n"
+"POT-Creation-Date: 2018-03-31 18:40-0700\n"
"PO-Revision-Date: 2013-02-12 23:37+0800\n"
"Last-Translator: Wei-Lun Chao <bluebat@member.fsf.org>\n"
"Language-Team: Chinese (traditional) <zh-l10n@linux.org.tw>\n"
@@ -19,7 +19,7 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-#: lib/closeout.c:112
+#: lib/closeout.c:122
msgid "write error"
msgstr ""
@@ -28,109 +28,84 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:949
+#: lib/dfa.c:958
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1071
+#: lib/dfa.c:1079
#, fuzzy
msgid "invalid character class"
msgstr "不正確的字元等級名稱"
-#: lib/dfa.c:1207
+#: lib/dfa.c:1205
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1275
+#: lib/dfa.c:1272
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1436
+#: lib/dfa.c:1433
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "不正確的「\\{\\}」內容"
-#: lib/dfa.c:1439
+#: lib/dfa.c:1436
#, fuzzy
msgid "regular expression too big"
msgstr "正規表示式太大"
-#: lib/dfa.c:1853
+#: lib/dfa.c:1850
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1971
+#: lib/dfa.c:1968
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1979
+#: lib/dfa.c:1976
msgid "unbalanced )"
msgstr ""
-#: lib/error.c:191
+#: lib/error.c:195
msgid "Unknown system error"
msgstr ""
-#: lib/getopt.c:575 lib/getopt.c:604
-#, c-format
-msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr ""
-
-#: lib/getopt.c:619
+#: lib/getopt.c:278
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
+msgid "%s: option '%s%s' is ambiguous\n"
msgstr ""
-#: lib/getopt.c:654 lib/getopt.c:658
+#: lib/getopt.c:284
#, c-format
-msgid "%s: option '--%s' doesn't allow an argument\n"
+msgid "%s: option '%s%s' is ambiguous; possibilities:"
msgstr ""
-#: lib/getopt.c:667 lib/getopt.c:672
+#: lib/getopt.c:319
#, c-format
-msgid "%s: option '%c%s' doesn't allow an argument\n"
+msgid "%s: unrecognized option '%s%s'\n"
msgstr ""
-#: lib/getopt.c:715 lib/getopt.c:734
+#: lib/getopt.c:345
#, c-format
-msgid "%s: option '--%s' requires an argument\n"
+msgid "%s: option '%s%s' doesn't allow an argument\n"
msgstr ""
-#: lib/getopt.c:772 lib/getopt.c:775
+#: lib/getopt.c:360
#, c-format
-msgid "%s: unrecognized option '--%s'\n"
+msgid "%s: option '%s%s' requires an argument\n"
msgstr ""
-#: lib/getopt.c:783 lib/getopt.c:786
-#, c-format
-msgid "%s: unrecognized option '%c%s'\n"
-msgstr ""
-
-#: lib/getopt.c:835 lib/getopt.c:838
+#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr ""
-#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136
+#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr ""
-#: lib/getopt.c:964 lib/getopt.c:980
-#, c-format
-msgid "%s: option '-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:1004 lib/getopt.c:1022
-#, c-format
-msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:1043 lib/getopt.c:1061
-#, c-format
-msgid "%s: option '-W %s' requires an argument\n"
-msgstr ""
-
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
#, fuzzy
msgid "memory exhausted"
@@ -155,13 +130,13 @@ msgstr "記憶體耗盡"
#. for your locale.
#.
#. If you don't know what to put here, please see
-#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
#. and use glyphs suitable for your language.
-#: lib/quotearg.c:354
+#: lib/quotearg.c:362
msgid "`"
msgstr ""
-#: lib/quotearg.c:355
+#: lib/quotearg.c:363
msgid "'"
msgstr ""
@@ -234,7 +209,7 @@ msgstr "正規表示式太大"
msgid "Unmatched ) or \\)"
msgstr "未匹配的「)」或「\\」"
-#: lib/regcomp.c:687
+#: lib/regcomp.c:689
msgid "No previous regular expression"
msgstr "沒有先前的正規表示式"
@@ -263,7 +238,7 @@ msgstr ""
#: lib/version-etc.c:86
msgid ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
"html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
@@ -384,12 +359,12 @@ msgstr ""
#: lib/version-etc.c:253
#, c-format
-msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
msgstr ""
#: lib/version-etc.c:256
#, fuzzy
-msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
"GNU sed 首頁:<http://www.gnu.org/software/sed/>。\n"
"使用 GNU 軟體的一般說明:<http://www.gnu.org/gethelp/>。\n"
@@ -518,71 +493,75 @@ msgstr "%s: 檔案 %s 列號: %lu: %s\n"
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e 表示式 #%lu,字元 %lu: %s\n"
-#: sed/compile.c:1639
+#: sed/compile.c:1644
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "無法為目的是「%s」的跳移找到標籤"
-#: sed/execute.c:264 sed/execute.c:281
+#: sed/execute.c:254 sed/execute.c:271
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:575
+#: sed/execute.c:565
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: 無法讀取 %s: %s\n"
-#: sed/execute.c:600
+#: sed/execute.c:590
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "無法編輯 %s: 是一個終端機"
-#: sed/execute.c:605
+#: sed/execute.c:595
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "無法編輯 %s: 不是一個正常檔案"
-#: sed/execute.c:616
+#: sed/execute.c:606
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr "%s:警告:無法設定 %s:%s 的預設檔案建立語境"
-#: sed/execute.c:624
+#: sed/execute.c:614
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s:警告:無法提取 %s:%s 的安全語境"
-#: sed/execute.c:643 sed/utils.c:178
+#: sed/execute.c:633 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "無法打開暫存檔案 %s: %s"
-#: sed/execute.c:1158 sed/execute.c:1368
+#: sed/execute.c:1148 sed/execute.c:1358
msgid "error in subprocess"
msgstr "錯誤發生於副行程中"
-#: sed/execute.c:1160
+#: sed/execute.c:1150
msgid "option `e' not supported"
msgstr "不支援選項「e」"
-#: sed/execute.c:1349
+#: sed/execute.c:1339
msgid "`e' command not supported"
msgstr "不支援命令「e」"
-#: sed/execute.c:1675
+#: sed/execute.c:1665
msgid "no input files"
msgstr "沒有輸入檔案"
-#: sed/regexp.c:38
+#: sed/regexp.c:39
msgid "no previous regular expression"
msgstr "不存在之前的正規表示式"
-#: sed/regexp.c:138
+#: sed/regexp.c:141
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "「s」命令的 RHS 上不正確的參考值 \\%d"
+#: sed/regexp.c:259
+msgid "regex input buffer length larger than INT_MAX"
+msgstr ""
+
#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
@@ -600,10 +579,10 @@ msgid "Paolo Bonzini"
msgstr ""
#: sed/sed.c:113
-#, c-format
+#, fuzzy, c-format
msgid ""
-"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
-"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
"GNU sed 首頁:<http://www.gnu.org/software/sed/>。\n"
"使用 GNU 軟體的一般說明:<http://www.gnu.org/gethelp/>。\n"
@@ -728,7 +707,7 @@ msgstr ""
#, c-format
msgid ""
" --sandbox\n"
-" operate in sandbox mode.\n"
+" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
#: sed/sed.c:172
diff --git a/sed/compile.c b/sed/compile.c
index e4fbb44..25baf5e 100644
--- a/sed/compile.c
+++ b/sed/compile.c
@@ -1,5 +1,5 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 1989-2017 Free Software Foundation, Inc.
+ Copyright (C) 1989-2018 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
@@ -274,6 +274,21 @@ in_nonblank(void)
return ch;
}
+/* Consume script input until a valid end of command marker is found:
+ comment, closing brace, newline, semicolon or EOF.
+ If any other character is found, die with 'extra characters after command'
+ error.
+*/
+static void
+read_end_of_cmd (void)
+{
+ const int ch = in_nonblank();
+ if (ch == CLOSE_BRACE || ch == '#')
+ savchar(ch);
+ else if (ch != EOF && ch != '\n' && ch != ';')
+ bad_prog(_(EXCESS_JUNK));
+}
+
/* Read an integer value from the program. */
static countT
in_integer (int ch)
@@ -643,7 +658,7 @@ mark_subst_opts (struct subst *cmd)
case CLOSE_BRACE:
case '#':
savchar(ch);
- /* Fall Through */
+ FALLTHROUGH;
case EOF:
case '\n':
case ';':
@@ -652,7 +667,7 @@ mark_subst_opts (struct subst *cmd)
case '\r':
if (inchar() == '\n')
return flags;
- /* FALLTHROUGH */
+ FALLTHROUGH;
default:
bad_prog(_(UNKNOWN_S_OPT));
@@ -1053,7 +1068,7 @@ compile_program(struct vector *vector)
case 'e': case 'F': case 'v': case 'z': case 'L':
case 'Q': case 'T': case 'R': case 'W':
bad_command(ch);
- /* FALLTHROUGH */
+ FALLTHROUGH;
case 'a': case 'i': case 'l':
case '=': case 'r':
@@ -1103,11 +1118,8 @@ compile_program(struct vector *vector)
bad_prog(_(EXCESS_CLOSE_BRACE));
if (cur_cmd->a1)
bad_prog(_(NO_CLOSE_BRACE_ADDR));
- ch = in_nonblank();
- if (ch == CLOSE_BRACE || ch == '#')
- savchar(ch);
- else if (ch != EOF && ch != '\n' && ch != ';')
- bad_prog(_(EXCESS_JUNK));
+
+ read_end_of_cmd ();
vector->v[blocks->v_index].x.jump_index = vector->v_length;
blocks = release_label(blocks); /* done with this entry */
@@ -1169,7 +1181,7 @@ compile_program(struct vector *vector)
case 'q':
if (cur_cmd->a2)
bad_prog(_(ONE_ADDR));
- /* Fall through */
+ FALLTHROUGH;
case 'L':
case 'l':
@@ -1177,16 +1189,14 @@ compile_program(struct vector *vector)
if (ISDIGIT(ch) && posixicity != POSIXLY_BASIC)
{
cur_cmd->x.int_arg = in_integer(ch);
- ch = in_nonblank();
}
else
- cur_cmd->x.int_arg = -1;
-
- if (ch == CLOSE_BRACE || ch == '#')
- savchar(ch);
- else if (ch != EOF && ch != '\n' && ch != ';')
- bad_prog(_(EXCESS_JUNK));
+ {
+ cur_cmd->x.int_arg = -1;
+ savchar (ch);
+ }
+ read_end_of_cmd ();
break;
case '=':
@@ -1203,11 +1213,7 @@ compile_program(struct vector *vector)
case 'P':
case 'z':
case 'x':
- ch = in_nonblank();
- if (ch == CLOSE_BRACE || ch == '#')
- savchar(ch);
- else if (ch != EOF && ch != '\n' && ch != ';')
- bad_prog(_(EXCESS_JUNK));
+ read_end_of_cmd ();
break;
case 'r':
@@ -1348,8 +1354,7 @@ compile_program(struct vector *vector)
cur_cmd->x.translate = translate;
}
- if ((ch = in_nonblank()) != EOF && ch != '\n' && ch != ';')
- bad_prog(_(EXCESS_JUNK));
+ read_end_of_cmd ();
free_buffer(b);
free_buffer(b2);
@@ -1476,7 +1481,7 @@ convert:
p = convert_number(&ch, p, bufend, base);
/* for an ampersand in a replacement, pass the \ up one level */
- if (buftype == TEXT_REPLACEMENT && ch == '&')
+ if (buftype == TEXT_REPLACEMENT && (ch == '&' || ch == '\\'))
*q++ = '\\';
*q++ = ch;
continue;
diff --git a/sed/execute.c b/sed/execute.c
index 2302a1e..2804c5e 100644
--- a/sed/execute.c
+++ b/sed/execute.c
@@ -1,5 +1,5 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 1989-2017 Free Software Foundation, Inc.
+ Copyright (C) 1989-2018 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,16 +37,6 @@
#include "acl.h"
#include "ignore-value.h"
-#ifdef __GNUC__
-# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__-0 >= 7)
- /* silence warning about unused parameter even for "gcc -W -Wunused" */
-# define UNUSED __attribute__((unused))
-# endif
-#endif
-#ifndef UNUSED
-# define UNUSED
-#endif
-
/* The number of extra bytes that must be allocated/usable, beyond
the declared "end" of each line buffer that may be passed to
match_regex. This is imposed by its use of dfaexec. */
@@ -386,7 +376,7 @@ line_exchange (struct line *a, struct line *b, int state)
/* dummy function to simplify read_pattern_space() */
static bool
-read_always_fail(struct input *input UNUSED)
+read_always_fail(struct input *input _GL_UNUSED)
{
return false;
}
@@ -607,7 +597,7 @@ open_next_file(const char *name, struct input *input)
if (is_selinux_enabled () > 0)
{
security_context_t con;
- if (getfilecon (input->in_file_name, &con) != -1)
+ if (lgetfilecon (input->in_file_name, &con) != -1)
{
/* Save and restore the old context for the sake of w and W
commands. */
@@ -1324,7 +1314,7 @@ execute_program(struct vector *vec, struct input *input)
&output_file);
/* POSIX.2 is silent about c starting a new cycle,
but it seems to be expected (and make sense). */
- /* Fall Through */
+ FALLTHROUGH;
case 'd':
return -1;
@@ -1480,7 +1470,7 @@ execute_program(struct vector *vec, struct input *input)
output_line(line.active, line.length, line.chomped,
&output_file);
dump_append_queue();
- /* FALLTHROUGH */
+ FALLTHROUGH;
case 'Q':
return cur_cmd->x.int_arg == -1 ? 0 : cur_cmd->x.int_arg;
diff --git a/sed/local.mk b/sed/local.mk
index d410d26..19d136e 100644
--- a/sed/local.mk
+++ b/sed/local.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -11,7 +11,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
bin_PROGRAMS += sed/sed
diff --git a/sed/mbcs.c b/sed/mbcs.c
index 26c6b54..f8e64df 100644
--- a/sed/mbcs.c
+++ b/sed/mbcs.c
@@ -1,5 +1,5 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 2003-2017 Free Software Foundation, Inc.
+ Copyright (C) 2003-2018 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/sed/regexp.c b/sed/regexp.c
index 049d9b9..f7c2851 100644
--- a/sed/regexp.c
+++ b/sed/regexp.c
@@ -1,5 +1,5 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 1999-2017 Free Software Foundation, Inc.
+ Copyright (C) 1999-2018 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,6 +18,7 @@
#include "sed.h"
#include <ctype.h>
+#include <limits.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
@@ -88,7 +89,9 @@ compile_regex_1 (struct regex *new_regex, int needed_sub)
syntax |= RE_UNMATCHED_RIGHT_PAREN_ORD;
break;
case POSIXLY_BASIC:
- syntax |= RE_UNMATCHED_RIGHT_PAREN_ORD | RE_LIMITED_OPS | RE_NO_GNU_OPS;
+ syntax |= RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS;
+ if (!(extended_regexp_flags & REG_EXTENDED))
+ syntax |= RE_LIMITED_OPS;
break;
}
@@ -251,6 +254,10 @@ match_regex(struct regex *regex, char *buf, size_t buflen,
else
regex_last = regex;
+ /* gnulib's re_search uses signed-int as length */
+ if (buflen >= INT_MAX)
+ panic (_("regex input buffer length larger than INT_MAX"));
+
#ifdef REG_PERL
regmatch[0].rm_so = (int)buf_start_offset;
regmatch[0].rm_eo = (int)buflen;
diff --git a/sed/sed.c b/sed/sed.c
index 15faff0..65bcab5 100644
--- a/sed/sed.c
+++ b/sed/sed.c
@@ -1,5 +1,5 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 1989-2017 Free Software Foundation, Inc.
+ Copyright (C) 1989-2018 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
@@ -110,8 +110,8 @@ contact(int errmsg)
{
FILE *out = errmsg ? stderr : stdout;
#ifndef REG_PERL
- fprintf(out, _("GNU sed home page: <http://www.gnu.org/software/sed/>.\n\
-General help using GNU software: <http://www.gnu.org/gethelp/>.\n"));
+ fprintf(out, _("GNU sed home page: <https://www.gnu.org/software/sed/>.\n\
+General help using GNU software: <https://www.gnu.org/gethelp/>.\n"));
#endif
/* Only print the bug report address for `sed --help', otherwise we'll
@@ -168,7 +168,7 @@ Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n\
consider files as separate rather than as a single,\n\
continuous long stream.\n"));
fprintf(out, _(" --sandbox\n\
- operate in sandbox mode.\n"));
+ operate in sandbox mode (disable e/r/w commands).\n"));
fprintf(out, _(" -u, --unbuffered\n\
load minimal amounts of data from the input files and flush\n\
the output buffers more often\n"));
diff --git a/sed/sed.h b/sed/sed.h
index 7510b0a..290f0ce 100644
--- a/sed/sed.h
+++ b/sed/sed.h
@@ -1,5 +1,5 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 1989-2017 Free Software Foundation, Inc.
+ Copyright (C) 1989-2018 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
@@ -278,3 +278,11 @@ extern void cancel_cleanup (void);
#else
# define IF_LINT(Code) /* empty */
#endif
+
+#ifndef FALLTHROUGH
+# if __GNUC__ < 7
+# define FALLTHROUGH ((void) 0)
+# else
+# define FALLTHROUGH __attribute__ ((__fallthrough__))
+# endif
+#endif
diff --git a/sed/utils.c b/sed/utils.c
index 25c4b6f..e9835d1 100644
--- a/sed/utils.c
+++ b/sed/utils.c
@@ -1,5 +1,5 @@
/* Functions from hack's utils library.
- Copyright (C) 1989-2017 Free Software Foundation, Inc.
+ Copyright (C) 1989-2018 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/sed/utils.h b/sed/utils.h
index fecf7c7..e3727de 100644
--- a/sed/utils.h
+++ b/sed/utils.h
@@ -1,5 +1,5 @@
/* Functions from hack's utils library.
- Copyright (C) 1989-2017 Free Software Foundation, Inc.
+ Copyright (C) 1989-2018 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/testsuite/0range.good b/testsuite/0range.good
deleted file mode 100644
index 7cfab5b..0000000
--- a/testsuite/0range.good
+++ /dev/null
@@ -1 +0,0 @@
-yes
diff --git a/testsuite/0range.inp b/testsuite/0range.inp
deleted file mode 100644
index c09c47b..0000000
--- a/testsuite/0range.inp
+++ /dev/null
@@ -1,6 +0,0 @@
-1
-2
-3
-4
-aaa
-yes
diff --git a/testsuite/0range.sed b/testsuite/0range.sed
deleted file mode 100644
index 33aa8b8..0000000
--- a/testsuite/0range.sed
+++ /dev/null
@@ -1 +0,0 @@
-0,/aaa/d
diff --git a/testsuite/8bit.sed b/testsuite/8bit.sed
deleted file mode 100644
index 37c0624..0000000
--- a/testsuite/8bit.sed
+++ /dev/null
@@ -1,21 +0,0 @@
-# The first poem from the Man'yoshu. I like Hitomaro's poems better
-# but I couldn't find a copy of any of them in Japanese. This version
-# of this poem is from $BNc2r8E8l<-E5(B($BBh;0HG(B)$B;0>JF2(B.
-#
-# Speaking of Hitomaro, here is the english translation of one of my
-# favorites. I just know that everyone reading these test cases wants
-# to see this.
-#
-# In the autumn mountains
-# The yellow leaves are so thick.
-# Alas, how shall I seek my love
-# Who has wandered away?
-#
-# I see the messenger come
-# As the yellow leaves are falling.
-# Oh, well I remember
-# How on such a day we used to meet--
-# My lover and I!
-# -- Kakinomoto Hitomaro
-#
-s///
diff --git a/testsuite/8bit.sh b/testsuite/8bit.sh
new file mode 100755
index 0000000..81d449a
--- /dev/null
+++ b/testsuite/8bit.sh
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+# Adapted from sed's old "8bit" test
+
+# Copyright (C) 2017-2018 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 <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+# Original comment from '8bit.sed':
+
+# The first poem from the Man'yoshu. I like Hitomaro's poems better
+# but I couldn't find a copy of any of them in Japanese. This version
+# of this poem is from $BNc2r8E8l<-E5(B($BBh;0HG(B)$B;0>JF2(B.
+#
+# Speaking of Hitomaro, here is the english translation of one of my
+# favorites. I just know that everyone reading these test cases wants
+# to see this.
+#
+# In the autumn mountains
+# The yellow leaves are so thick.
+# Alas, how shall I seek my love
+# Who has wandered away?
+#
+# I see the messenger come
+# As the yellow leaves are falling.
+# Oh, well I remember
+# How on such a day we used to meet--
+# My lover and I!
+# -- Kakinomoto Hitomaro
+
+# The program is:
+# s///
+printf "s/\302\347\317\302/\306\374\313\334/\n" > 8bit-prog.sed \
+ || framework_failure_
+
+
+sed -f 8bit-prog.sed < "$abs_top_srcdir/testsuite/8bit.inp" > out || fail=1
+remove_cr_inplace out
+compare "$abs_top_srcdir/testsuite/8bit.good" out || fail=1
+
+
+Exit $fail
diff --git a/testsuite/8to7.good b/testsuite/8to7.good
deleted file mode 100644
index 4485882..0000000
--- a/testsuite/8to7.good
+++ /dev/null
@@ -1,14 +0,0 @@
-\344\306\244\342\244\350 \244\337\344\306\273\375\244\301$
-\267\241\266\372\244\342\244\350 \244\337\267\241\266\372\273\375\244\
-\301$
-\244\263\244\316\265\326\244\313 \272\332\305\246\244\336\244\271\273\
-\371$
-\262\310\264\326\244\253\244\312 \271\360\244\351\244\265\244\315$
-\244\275\244\351\244\337\244\304 \302\347\317\302\244\316\271\361\244\
-\317$
-\244\252\244\267\244\343\244\312\244\331\244\306 \244\357\244\354\244\
-\263\244\275\265\357\244\354$
-\244\267\244\255\244\312\244\331\244\306 \244\357\244\354\244\263\244\
-\275 \272\302\244\273$
-\244\357\244\313\244\263\244\275\244\317 \271\360\244\351\244\341$
-\262\310\244\362\244\342\314\276\244\362\244\342$
diff --git a/testsuite/8to7.inp b/testsuite/8to7.inp
deleted file mode 100644
index 8c9c4bb..0000000
--- a/testsuite/8to7.inp
+++ /dev/null
@@ -1,9 +0,0 @@
-Ƥ ƻ
- ߷
-ε֤ Ŧޤ
-ȴ֤ 餵
-ߤ ¤ι
-ʤ٤ 줳
-ʤ٤ 줳 ¤
-Ȥ̾
diff --git a/testsuite/8to7.sed b/testsuite/8to7.sed
deleted file mode 100644
index f9d3f50..0000000
--- a/testsuite/8to7.sed
+++ /dev/null
@@ -1 +0,0 @@
-l;d
diff --git a/testsuite/8to7.sh b/testsuite/8to7.sh
new file mode 100755
index 0000000..f4fbfd3
--- /dev/null
+++ b/testsuite/8to7.sh
@@ -0,0 +1,74 @@
+#!/bin/sh
+
+# Runner for old '8to7' test
+
+# Copyright (C) 2017-2018 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 <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+# Generate the input file, containing non-ascii 8-bit octets.
+# printf with octal escape sequences is the most portable way
+# to produce these.
+{
+ printf '\344\306\244\342\244\350 \244\337\344\306\273\375\244\301\n' ;
+ printf '\267\241\266\372\244\342\244\350 ' ;
+ printf '\244\337\267\241\266\372\273\375\244\301\n' ;
+ printf '\244\263\244\316\265\326\244\313 ' ;
+ printf '\272\332\305\246\244\336\244\271\273\371\n' ;
+ printf '\262\310\264\326\244\253\244\312 \271\360\244\351\244\265\244\315\n' ;
+ printf '\244\275\244\351\244\337\244\304 ';
+ printf '\302\347\317\302\244\316\271\361\244\317\n' ;
+ printf '\244\252\244\267\244\343\244\312\244\331\244\306 ' ;
+ printf '\244\357\244\354\244\263\244\275\265\357\244\354\n' ;
+ printf '\244\267\244\255\244\312\244\331\244\306 ' ;
+ printf '\244\357\244\354\244\263\244\275 ' ;
+ printf '\272\302\244\273\n';
+ printf '\244\357\244\313\244\263\244\275\244\317 ' ;
+ printf '\271\360\244\351\244\341\n' ;
+ printf '\262\310\244\362\244\342\314\276\244\362\244\342\n';
+} > 8to7-inp || framework_failure_
+
+
+# The expected output.
+# NOTE:
+# shell-escaping is OFF with here-doc preceded by a backslash
+# i.e. the first 4 octets in the output will be the characters
+# '\', '3', '4', '4'.
+cat <<\EOF > 8to7-exp || framework_failure_
+\344\306\244\342\244\350 \244\337\344\306\273\375\244\301$
+\267\241\266\372\244\342\244\350 \244\337\267\241\266\372\273\375\244\
+\301$
+\244\263\244\316\265\326\244\313 \272\332\305\246\244\336\244\271\273\
+\371$
+\262\310\264\326\244\253\244\312 \271\360\244\351\244\265\244\315$
+\244\275\244\351\244\337\244\304 \302\347\317\302\244\316\271\361\244\
+\317$
+\244\252\244\267\244\343\244\312\244\331\244\306 \244\357\244\354\244\
+\263\244\275\265\357\244\354$
+\244\267\244\255\244\312\244\331\244\306 \244\357\244\354\244\263\244\
+\275 \272\302\244\273$
+\244\357\244\313\244\263\244\275\244\317 \271\360\244\351\244\341$
+\262\310\244\362\244\342\314\276\244\362\244\342$
+EOF
+
+sed -e 'l;d' 8to7-inp > 8to7-out || fail=1
+remove_cr_inplace 8to7-out
+compare 8to7-exp 8to7-out || fail=1
+
+
+Exit $fail
diff --git a/testsuite/BOOST.tests b/testsuite/BOOST.tests
index 3ec355c..20846d1 100644
--- a/testsuite/BOOST.tests
+++ b/testsuite/BOOST.tests
@@ -93,7 +93,7 @@ aa\) !
. \0 0 1
;
-; now move on to the repetion ops,
+; now move on to the repetition ops,
; starting with operator *
- match_default normal REG_EXTENDED
a* b 0 0
diff --git a/testsuite/Coreutils.pm b/testsuite/Coreutils.pm
new file mode 100644
index 0000000..4e7a00a
--- /dev/null
+++ b/testsuite/Coreutils.pm
@@ -0,0 +1,620 @@
+package Coreutils;
+# This is a testing framework.
+
+# Copyright (C) 1998-2018 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 <https://www.gnu.org/licenses/>.
+
+use strict;
+use vars qw($VERSION @ISA @EXPORT);
+
+use FileHandle;
+use File::Compare qw(compare);
+
+@ISA = qw(Exporter);
+($VERSION = '$Revision: 1.5 $ ') =~ tr/[0-9].//cd;
+@EXPORT = qw (run_tests triple_test getlimits);
+
+my $debug = $ENV{DEBUG};
+
+my @Types = qw (IN IN_PIPE OUT ERR AUX CMP EXIT PRE POST OUT_SUBST
+ ERR_SUBST ENV ENV_DEL);
+my %Types = map {$_ => 1} @Types;
+my %Zero_one_type = map {$_ => 1}
+ qw (OUT ERR EXIT PRE POST OUT_SUBST ERR_SUBST ENV);
+my $srcdir = "$ENV{srcdir}";
+my $Global_count = 1;
+
+# When running in a DJGPP environment, make $ENV{SHELL} point to bash.
+# Otherwise, a bad shell might be used (e.g. command.com) and many
+# tests would fail.
+defined $ENV{DJDIR}
+ and $ENV{SHELL} = "$ENV{DJDIR}/bin/bash.exe";
+
+# A file spec: a scalar or a reference to a single-keyed hash
+# ================
+# 'contents' contents only (file name is derived from test name)
+# {filename => 'contents'} filename and contents
+# {filename => undef} filename only -- $(srcdir)/tests/filename must exist
+#
+# FIXME: If there is more than one input file, then you can't specify 'REDIR'.
+# PIPE is still ok.
+#
+# I/O spec: a hash ref with the following properties
+# ================
+# - one key/value pair
+# - the key must be one of these strings: IN, OUT, ERR, AUX, CMP, EXIT
+# - the value must be a file spec
+# {OUT => 'data'} put data in a temp file and compare it to stdout from cmd
+# {OUT => {'filename'=>undef}} compare contents of existing filename to
+# stdout from cmd
+# {OUT => {'filename'=>[$CTOR, $DTOR]}} $CTOR and $DTOR are references to
+# functions, each which is passed the single argument 'filename'.
+# $CTOR must create 'filename'.
+# DTOR may be omitted in which case 'sub{unlink @_[0]}' is used.
+# FIXME: implement this
+# {ERR => ...}
+# Same as for OUT, but compare with stderr, not stdout.
+# {OUT_SUBST => 's/variable_output/expected_output/'}
+# Transform actual standard output before comparing it against expected.
+# This is useful e.g. for programs like du that produce output that
+# varies a lot from system. E.g., an empty file may consume zero file
+# blocks, or more, depending on the OS and on the file system type.
+# {ERR_SUBST => 's/variable_output/expected_output/'}
+# Transform actual stderr output before comparing it against expected.
+# This is useful when verifying that we get a meaningful diagnostic.
+# For example, in rm/fail-2eperm, we have to account for three different
+# diagnostics: Operation not permitted, Not owner, and Permission denied.
+# {EXIT => N} expect exit status of cmd to be N
+# {ENV => 'VAR=val ...'}
+# Prepend 'VAR=val ...' to the command that we execute via 'system'.
+# {ENV_DEL => 'VAR'}
+# Remove VAR from the environment just before running the corresponding
+# command, and restore any value just afterwards.
+#
+# There may be many input file specs. File names from the input specs
+# are concatenated in order on the command line.
+# There may be at most one of the OUT-, ERR-, and EXIT-keyed specs.
+# If the OUT-(or ERR)-keyed hash ref is omitted, then expect no output
+# on stdout (or stderr).
+# If the EXIT-keyed one is omitted, then expect the exit status to be zero.
+
+# FIXME: Make sure that no junkfile is also listed as a
+# non-junkfile (i.e., with undef for contents)
+
+sub _shell_quote ($)
+{
+ my ($string) = @_;
+ $string =~ s/\'/\'\\\'\'/g;
+ return "'$string'";
+}
+
+sub _create_file ($$$$)
+{
+ my ($program_name, $test_name, $file_name, $data) = @_;
+ my $file;
+ if (defined $file_name)
+ {
+ $file = $file_name;
+ }
+ else
+ {
+ $file = "$test_name.$Global_count";
+ ++$Global_count;
+ }
+
+ warn "creating file '$file' with contents '$data'\n" if $debug;
+
+ # The test spec gave a string.
+ # Write it to a temp file and return tempfile name.
+ my $fh = new FileHandle "> $file";
+ die "$program_name: $file: $!\n" if ! $fh;
+ print $fh $data;
+ $fh->close || die "$program_name: $file: $!\n";
+
+ return $file;
+}
+
+sub _compare_files ($$$$$)
+{
+ my ($program_name, $test_name, $in_or_out, $actual, $expected) = @_;
+
+ my $differ = compare ($actual, $expected);
+ if ($differ)
+ {
+ my $info = (defined $in_or_out ? "std$in_or_out " : '');
+ warn "$program_name: test $test_name: ${info}mismatch, comparing "
+ . "$expected (expected) and $actual (actual)\n";
+ # Ignore any failure, discard stderr.
+ system "diff -c $expected $actual 2>/dev/null";
+ }
+
+ return $differ;
+}
+
+sub _process_file_spec ($$$$$)
+{
+ my ($program_name, $test_name, $file_spec, $type, $junk_files) = @_;
+
+ my ($file_name, $contents);
+ if (!ref $file_spec)
+ {
+ ($file_name, $contents) = (undef, $file_spec);
+ }
+ elsif (ref $file_spec eq 'HASH')
+ {
+ my $n = keys %$file_spec;
+ die "$program_name: $test_name: $type spec has $n elements --"
+ . " expected 1\n"
+ if $n != 1;
+ ($file_name, $contents) = each %$file_spec;
+
+ # This happens for the AUX hash in an io_spec like this:
+ # {CMP=> ['zy123utsrqponmlkji', {'@AUX@'=> undef}]},
+ defined $contents
+ or return $file_name;
+ }
+ else
+ {
+ die "$program_name: $test_name: invalid RHS in $type-spec\n"
+ }
+
+ my $is_junk_file = (! defined $file_name
+ || (($type eq 'IN' || $type eq 'AUX' || $type eq 'CMP')
+ && defined $contents));
+ my $file = _create_file ($program_name, $test_name,
+ $file_name, $contents);
+
+ if ($is_junk_file)
+ {
+ push @$junk_files, $file
+ }
+ else
+ {
+ # FIXME: put $srcdir in here somewhere
+ warn "$program_name: $test_name: specified file '$file' does"
+ . " not exist\n"
+ if ! -f "$srcdir/tests/$file";
+ }
+
+ return $file;
+}
+
+sub _at_replace ($$)
+{
+ my ($map, $s) = @_;
+ foreach my $eo (qw (AUX OUT ERR))
+ {
+ my $f = $map->{$eo};
+ $f
+ and $s =~ /\@$eo\@/
+ and $s =~ s/\@$eo\@/$f/g;
+ }
+ return $s;
+}
+
+sub getlimits()
+{
+ my $NV;
+ open $NV, "getlimits |" or die "Error running getlimits\n";
+ my %limits = map {split /=|\n/} <$NV>;
+ return \%limits;
+}
+
+# FIXME: cleanup on interrupt
+# FIXME: extract 'do_1_test' function
+
+# FIXME: having to include $program_name here is an expedient kludge.
+# Library code doesn't 'die'.
+sub run_tests ($$$$$)
+{
+ my ($program_name, $prog, $t_spec, $save_temps, $verbose) = @_;
+
+ # To indicate that $prog is a shell built-in, you'd make it a string 'ref'.
+ # E.g., call run_tests ($prog, \$prog, \@Tests, $save_temps, $verbose);
+ # If it's a ref, invoke it via "env":
+ my @prog = ref $prog ? (qw(env --), $$prog) : $prog;
+
+ # Warn about empty t_spec.
+ # FIXME
+
+ # Remove all temp files upon interrupt.
+ # FIXME
+
+ # Verify that test names are distinct.
+ my $bad_test_name = 0;
+ my %seen;
+ my %seen_8dot3;
+ my $t;
+ foreach $t (@$t_spec)
+ {
+ my $test_name = $t->[0];
+ if ($seen{$test_name})
+ {
+ warn "$program_name: $test_name: duplicate test name\n";
+ $bad_test_name = 1;
+ }
+ $seen{$test_name} = 1;
+
+ if (0)
+ {
+ my $t8 = lc substr $test_name, 0, 8;
+ if ($seen_8dot3{$t8})
+ {
+ warn "$program_name: 8.3 test name conflict: "
+ . "$test_name, $seen_8dot3{$t8}\n";
+ $bad_test_name = 1;
+ }
+ $seen_8dot3{$t8} = $test_name;
+ }
+
+ # The test name may be no longer than 30 bytes.
+ # Yes, this is an arbitrary limit. If it causes trouble,
+ # consider removing it.
+ my $max = 30;
+ if ($max < length $test_name)
+ {
+ warn "$program_name: $test_name: test name is too long (> $max)\n";
+ $bad_test_name = 1;
+ }
+ }
+ return 1 if $bad_test_name;
+
+ # FIXME check exit status
+ system (@prog, '--version') if $verbose;
+
+ my @junk_files;
+ my $fail = 0;
+ foreach my $tt (@$t_spec)
+ {
+ my @post_compare;
+ my @dummy = @$tt;
+ my $t = \@dummy;
+ my $test_name = shift @$t;
+ my $expect = {};
+ my ($pre, $post);
+
+ # FIXME: maybe don't reset this.
+ $Global_count = 1;
+ my @args;
+ my $io_spec;
+ my %seen_type;
+ my @env_delete;
+ my $env_prefix = '';
+ my $input_pipe_cmd;
+ foreach $io_spec (@$t)
+ {
+ if (!ref $io_spec)
+ {
+ push @args, $io_spec;
+ next;
+ }
+
+ if (ref $io_spec ne 'HASH')
+ {
+ eval 'use Data::Dumper';
+ die "$program_name: $test_name: invalid entry in test spec; "
+ . "expected HASH-ref,\nbut got this:\n"
+ . Data::Dumper->Dump ([\$io_spec], ['$io_spec']) . "\n";
+ }
+
+ my $n = keys %$io_spec;
+ die "$program_name: $test_name: spec has $n elements --"
+ . " expected 1\n"
+ if $n != 1;
+ my ($type, $val) = each %$io_spec;
+ die "$program_name: $test_name: invalid key '$type' in test spec\n"
+ if ! $Types{$type};
+
+ # Make sure there's no more than one of OUT, ERR, EXIT, etc.
+ die "$program_name: $test_name: more than one $type spec\n"
+ if $Zero_one_type{$type} and $seen_type{$type}++;
+
+ if ($type eq 'PRE' or $type eq 'POST')
+ {
+ $expect->{$type} = $val;
+ next;
+ }
+
+ if ($type eq 'CMP')
+ {
+ my $t = ref $val;
+ $t && $t eq 'ARRAY'
+ or die "$program_name: $test_name: invalid CMP spec\n";
+ @$val == 2
+ or die "$program_name: $test_name: invalid CMP list; must have"
+ . " exactly 2 elements\n";
+ my @cmp_files;
+ foreach my $e (@$val)
+ {
+ my $r = ref $e;
+ $r && $r ne 'HASH'
+ and die "$program_name: $test_name: invalid element ($r)"
+ . " in CMP list; only scalars and hash references "
+ . "are allowed\n";
+ if ($r && $r eq 'HASH')
+ {
+ my $n = keys %$e;
+ $n == 1
+ or die "$program_name: $test_name: CMP spec has $n "
+ . "elements -- expected 1\n";
+
+ # Replace any '@AUX@' in the key of %$e.
+ my ($ff, $val) = each %$e;
+ my $new_ff = _at_replace $expect, $ff;
+ if ($new_ff ne $ff)
+ {
+ $e->{$new_ff} = $val;
+ delete $e->{$ff};
+ }
+ }
+ my $cmp_file = _process_file_spec ($program_name, $test_name,
+ $e, $type, \@junk_files);
+ push @cmp_files, $cmp_file;
+ }
+ push @post_compare, [@cmp_files];
+
+ $expect->{$type} = $val;
+ next;
+ }
+
+ if ($type eq 'EXIT')
+ {
+ die "$program_name: $test_name: invalid EXIT code\n"
+ if $val !~ /^\d+$/;
+ # FIXME: make sure $data is numeric
+ $expect->{EXIT} = $val;
+ next;
+ }
+
+ if ($type =~ /^(OUT|ERR)_SUBST$/)
+ {
+ $expect->{RESULT_SUBST} ||= {};
+ $expect->{RESULT_SUBST}->{$1} = $val;
+ next;
+ }
+
+ if ($type eq 'ENV')
+ {
+ $env_prefix = "$val ";
+ next;
+ }
+
+ if ($type eq 'ENV_DEL')
+ {
+ push @env_delete, $val;
+ next;
+ }
+
+ my $file = _process_file_spec ($program_name, $test_name, $val,
+ $type, \@junk_files);
+
+ if ($type eq 'IN' || $type eq 'IN_PIPE')
+ {
+ my $quoted_file = _shell_quote $file;
+ if ($type eq 'IN_PIPE')
+ {
+ defined $input_pipe_cmd
+ and die "$program_name: $test_name: only one input"
+ . " may be specified with IN_PIPE\n";
+ $input_pipe_cmd = "cat $quoted_file |";
+ }
+ else
+ {
+ push @args, $quoted_file;
+ }
+ }
+ elsif ($type eq 'AUX' || $type eq 'OUT' || $type eq 'ERR')
+ {
+ $expect->{$type} = $file;
+ }
+ else
+ {
+ die "$program_name: $test_name: invalid type: $type\n"
+ }
+ }
+
+ # Expect an exit status of zero if it's not specified.
+ $expect->{EXIT} ||= 0;
+
+ # Allow ERR to be omitted -- in that case, expect no error output.
+ foreach my $eo (qw (OUT ERR))
+ {
+ if (!exists $expect->{$eo})
+ {
+ $expect->{$eo} = _create_file ($program_name, $test_name,
+ undef, '');
+ push @junk_files, $expect->{$eo};
+ }
+ }
+
+ # FIXME: Does it ever make sense to specify a filename *and* contents
+ # in OUT or ERR spec?
+
+ # FIXME: this is really suboptimal...
+ my @new_args;
+ foreach my $a (@args)
+ {
+ $a = _at_replace $expect, $a;
+ push @new_args, $a;
+ }
+ @args = @new_args;
+
+ warn "$test_name...\n" if $verbose;
+ &{$expect->{PRE}} if $expect->{PRE};
+ my %actual;
+ $actual{OUT} = "$test_name.O";
+ $actual{ERR} = "$test_name.E";
+ push @junk_files, $actual{OUT}, $actual{ERR};
+ my @cmd = (@prog, @args, "> $actual{OUT}", "2> $actual{ERR}");
+ $env_prefix
+ and unshift @cmd, $env_prefix;
+ defined $input_pipe_cmd
+ and unshift @cmd, $input_pipe_cmd;
+ my $cmd_str = join (' ', @cmd);
+
+ # Delete from the environment any symbols specified by syntax
+ # like this: {ENV_DEL => 'TZ'}.
+ my %pushed_env;
+ foreach my $env_sym (@env_delete)
+ {
+ my $val = delete $ENV{$env_sym};
+ defined $val
+ and $pushed_env{$env_sym} = $val;
+ }
+
+ warn "Running command: '$cmd_str'\n" if $debug;
+ my $rc = 0xffff & system $cmd_str;
+
+ # Restore any environment setting we changed via a deletion.
+ foreach my $env_sym (keys %pushed_env)
+ {
+ $ENV{$env_sym} = $pushed_env{$env_sym};
+ }
+
+ if ($rc == 0xff00)
+ {
+ warn "$program_name: test $test_name failed: command failed:\n"
+ . " '$cmd_str': $!\n";
+ $fail = 1;
+ goto cleanup;
+ }
+ $rc >>= 8 if $rc > 0x80;
+ if ($expect->{EXIT} != $rc)
+ {
+ warn "$program_name: test $test_name failed: exit status mismatch:"
+ . " expected $expect->{EXIT}, got $rc\n";
+ $fail = 1;
+ goto cleanup;
+ }
+
+ my %actual_data;
+ # Record actual stdout and stderr contents, if POST may need them.
+ if ($expect->{POST})
+ {
+ foreach my $eo (qw (OUT ERR))
+ {
+ my $out_file = $actual{$eo};
+ open IN, $out_file
+ or (warn
+ "$program_name: cannot open $out_file for reading: $!\n"),
+ $fail = 1, next;
+ $actual_data{$eo} = <IN>;
+ close IN
+ or (warn "$program_name: failed to read $out_file: $!\n"),
+ $fail = 1;
+ }
+ }
+
+ foreach my $eo (qw (OUT ERR))
+ {
+ my $subst_expr = $expect->{RESULT_SUBST}->{$eo};
+ if (defined $subst_expr)
+ {
+ my $out = $actual{$eo};
+ my $orig = "$out.orig";
+
+ # Move $out aside (to $orig), then recreate $out
+ # by transforming each line of $orig via $subst_expr.
+ rename $out, $orig
+ or (warn "$program_name: cannot rename $out to $orig: $!\n"),
+ $fail = 1, next;
+ open IN, $orig
+ or (warn "$program_name: cannot open $orig for reading: $!\n"),
+ $fail = 1, (unlink $orig), next;
+ unlink $orig
+ or (warn "$program_name: cannot unlink $orig: $!\n"),
+ $fail = 1;
+ open OUT, ">$out"
+ or (warn "$program_name: cannot open $out for writing: $!\n"),
+ $fail = 1, next;
+ while (defined (my $line = <IN>))
+ {
+ eval "\$_ = \$line; $subst_expr; \$line = \$_";
+ print OUT $line;
+ }
+ close IN;
+ close OUT
+ or (warn "$program_name: failed to write $out: $!\n"),
+ $fail = 1, next;
+ }
+
+ my $eo_lower = lc $eo;
+ _compare_files ($program_name, $test_name, $eo_lower,
+ $actual{$eo}, $expect->{$eo})
+ and $fail = 1;
+ }
+
+ foreach my $pair (@post_compare)
+ {
+ my ($expected, $actual) = @$pair;
+ _compare_files $program_name, $test_name, undef, $actual, $expected
+ and $fail = 1;
+ }
+
+ cleanup:
+ $expect->{POST}
+ and &{$expect->{POST}} ($actual_data{OUT}, $actual_data{ERR});
+
+ }
+
+ # FIXME: maybe unlink files inside the big foreach loop?
+ unlink @junk_files if ! $save_temps;
+
+ return $fail;
+}
+
+# For each test in @$TESTS, generate two additional tests,
+# one using stdin, the other using a pipe. I.e., given this one
+# ['idem-0', {IN=>''}, {OUT=>''}],
+# generate these:
+# ['idem-0.r', '<', {IN=>''}, {OUT=>''}],
+# ['idem-0.p', {IN_PIPE=>''}, {OUT=>''}],
+# Generate new tests only if there is exactly one input spec.
+# The returned list of tests contains each input test, followed
+# by zero or two derived tests.
+sub triple_test($)
+{
+ my ($tests) = @_;
+ my @new;
+ foreach my $t (@$tests)
+ {
+ push @new, $t;
+
+ my @in;
+ my @args;
+ my @list_of_hash;
+ foreach my $e (@$t)
+ {
+ !ref $e
+ and push (@args, $e), next;
+
+ ref $e && ref $e eq 'HASH'
+ or (warn "$0: $t->[0]: unexpected entry type\n"), next;
+ defined $e->{IN}
+ and (push @in, $e->{IN}), next;
+ push @list_of_hash, $e;
+ }
+ # Add variants IFF there is exactly one input file.
+ @in == 1
+ or next;
+ shift @args; # discard test name
+ push @new, ["$t->[0].r", @args, '<', {IN => $in[0]}, @list_of_hash];
+ push @new, ["$t->[0].p", @args, {IN_PIPE => $in[0]}, @list_of_hash];
+ }
+ return @new;
+}
+
+## package return
+1;
diff --git a/testsuite/CuSkip.pm b/testsuite/CuSkip.pm
new file mode 100644
index 0000000..a2aad28
--- /dev/null
+++ b/testsuite/CuSkip.pm
@@ -0,0 +1,39 @@
+package CuSkip;
+# Skip a test: emit diag to log and to stderr, and exit 77
+
+# Copyright (C) 2011-2018 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 <https://www.gnu.org/licenses/>.
+
+use strict;
+use warnings;
+
+our $ME = $0 || "<???>";
+
+# Emit a diagnostic both to stderr and to $stderr_fileno_.
+# FIXME: don't hard-code that value (9), since it's already defined in init.cfg.
+sub skip ($)
+{
+ my ($msg) = @_;
+ my $stderr_fileno_ = 9;
+ warn $msg;
+ open FH, ">&$stderr_fileno_"
+ or warn "$ME: failed to dup stderr\n";
+ print FH $msg;
+ close FH
+ or warn "$ME: failed to close FD $stderr_fileno_\n";
+ exit 77;
+}
+
+1;
diff --git a/testsuite/CuTmpdir.pm b/testsuite/CuTmpdir.pm
new file mode 100644
index 0000000..eee8a8d
--- /dev/null
+++ b/testsuite/CuTmpdir.pm
@@ -0,0 +1,114 @@
+package CuTmpdir;
+# create, then chdir into a temporary sub-directory
+
+# Copyright (C) 2007-2018 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 <https://www.gnu.org/licenses/>.
+
+use strict;
+use warnings;
+
+use File::Temp;
+use File::Find;
+
+our $ME = $0 || "<???>";
+
+my $dir;
+
+sub skip_test($)
+{
+ warn "$ME: skipping test: unsafe working directory name: '$_[0]'\n";
+ exit 77;
+}
+
+sub chmod_1
+{
+ my $name = $_;
+
+ # Skip symlinks and non-directories.
+ -l $name || !-d _
+ and return;
+
+ chmod 0700, $name;
+}
+
+sub chmod_tree
+{
+ # When tempdir fails, it croaks, which leaves $dir undefined.
+ defined $dir
+ or return;
+
+ # Perform the equivalent of find "$dir" -type d -print0|xargs -0 chmod -R 700.
+ my $options = {untaint => 1, wanted => \&chmod_1};
+ find ($options, $dir);
+}
+
+sub import {
+ my $prefix = $_[1];
+
+ $ME eq '-' && defined $prefix
+ and $ME = $prefix;
+
+ if ($prefix !~ /^\//)
+ {
+ eval 'use Cwd';
+ my $cwd = $@ ? '.' : Cwd::getcwd();
+ $prefix = "$cwd/$prefix";
+ }
+
+ # Untaint for the upcoming mkdir.
+ $prefix =~ m!^([-+\@\w./]+)$!
+ or skip_test $prefix;
+ $prefix = $1;
+
+ my $original_pid = $$;
+
+ my $on_sig_remove_tmpdir = sub {
+ my ($sig) = @_;
+ if ($$ == $original_pid and defined $dir)
+ {
+ chmod_tree;
+ # Older versions of File::Temp lack this method.
+ exists &File::Temp::cleanup
+ and &File::Temp::cleanup;
+ }
+ $SIG{$sig} = 'DEFAULT';
+ kill $sig, $$;
+ };
+
+ foreach my $sig (qw (INT TERM HUP))
+ {
+ $SIG{$sig} = $on_sig_remove_tmpdir;
+ }
+
+ my $cleanup = $ENV{SAVE_TEMPS} ? 0 : 1;
+ $dir = File::Temp::tempdir("$prefix.tmp-XXXX", CLEANUP => $cleanup );
+ chdir $dir
+ or warn "$ME: failed to chdir to $dir: $!\n";
+
+ warn "Temp directory: $dir\n" unless $cleanup;
+}
+
+END {
+ # Move cwd out of the directory we're about to remove.
+ # This is required on some systems, and by some versions of File::Temp.
+ chdir '..'
+ or warn "$ME: failed to chdir to .. from $dir: $!\n";
+
+ my $saved_errno = $?;
+ chmod_tree;
+ $? = $saved_errno;
+}
+
+1;
diff --git a/testsuite/Makefile.tests b/testsuite/Makefile.tests
deleted file mode 100644
index 00a4ec8..0000000
--- a/testsuite/Makefile.tests
+++ /dev/null
@@ -1,228 +0,0 @@
-# Testsuite makefile for GNU sed
-
-SHELL = /bin/sh
-
-# These are only fallback values. They are usually overridden by runtest.
-srcdir = .
-SED = ./sed/sed
-
-TIME=
-#TIME=time
-
-SEDENV_2 = LC_ALL=C
-SEDENV = $(SEDENV_2) $(TIME)
-TR = $(SEDENV_2) tr
-
-CMP=cmp
-RM=rm -f
-elide_cr = $(SEDENV_2) $(SED) 's/\r//g'
-
-SKIP = :>$@.skip; exit 77
-
-enable sep inclib 8bit 8to7 newjis xabcx dollar noeol bkslashes \
-numsub head madding mac-mf empty xbxcx xbxcx3 recall recall2 xemacs \
-appquit fasts uniq manis linecnt khadafy allsub flipcase space modulo \
-y-bracket y-newline y-zero insert brackets amp-escape newline-anchor::
- $(SEDENV) $(SED) -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(elide_cr) > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
- @$(RM) $@.out
-
-0range::
- $(SEDENV) $(SED) -s -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(elide_cr) > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
- @$(RM) $@.out
-
-zero-anchor::
- $(SEDENV) $(SED) -z -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(elide_cr) > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
- @$(RM) $@.out
-
-badenc::
- LC_ALL=ru_RU.UTF-8 $(TIME) $(SED) -nf $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(elide_cr) > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
- LC_ALL=it_IT.UTF-8 $(TIME) $(SED) -nf $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(elide_cr) > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
- LC_ALL=en_US.UTF-8 $(TIME) $(SED) -nf $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(elide_cr) > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
- LC_ALL=en_GB.UTF-8 $(TIME) $(SED) -nf $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(elide_cr) > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
- @$(RM) $@.out
-
-# Try with ru_RU.UTF-8. If it is presumably not installed, see if the current
-# locale is UTF-8 and run it in the current locale.
-utf8-1 utf8-2 utf8-3 utf8-4::
- echo "LC_ALL=ru_RU.UTF-8" \
- "$(TIME) $(SED) -f $(srcdir)/$@.sed" \
- "< $(srcdir)/$@.inp | $(elide_cr) > $@.out"; \
- LC_ALL=ru_RU.UTF-8 \
- $(TIME) $(SED) -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(elide_cr) > $@.out; \
- $(CMP) $(srcdir)/$@.good $@.out && exit 0; \
- $(CMP) $(srcdir)/$@.inp $@.out || exit 1; \
- locale > $@.info 2>/dev/null || { rm $@.info; $(SKIP); }; \
- . $@.info; rm $@.info; \
- case "$$LC_CTYPE" in \
- *UTF-8 | *UTF8 | *utf8 | *utf-8) \
- echo "$(TIME) $(SED) -f $(srcdir)/$@.sed" \
- " < $(srcdir)/$@.inp | $(elide_cr) > $@.out"; \
- $(TIME) $(SED) -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(elide_cr) > $@.out; \
- $(CMP) $(srcdir)/$@.good $@.out && exit 0; \
- $(CMP) $(srcdir)/$@.inp $@.out || exit 1 ;; \
- *) ;; \
- esac; \
- $(SKIP)
-
-# This checks for a bug in 3.02 and 3.02.80
-stdin::
- ($(SEDENV) $(SED) d; $(SEDENV) $(SED) G) < $(srcdir)/numsub.inp \
- | $(elide_cr) > $@.1out
- $(SEDENV) cat $(srcdir)/numsub.inp \
- | ($(SEDENV) $(SED) d; $(SEDENV) $(SED) G) | $(elide_cr) > $@.2out
- $(CMP) $@.1out $@.2out
- @$(RM) $@.1out $@.2out
-
-inplace-hold::
- echo x > $@.1out
- echo y > $@.2out
- echo > $@.out
- $(SEDENV) $(SED) -i x $@.1out $@.2out
- $(CMP) $@.1out $@.out
- $(CMP) $@.2out $@.out
- @$(RM) $@.1out $@.2out $@.out
-
-cv-vars classes middle dc distrib factor numsub2 numsub3 numsub4 numsub5 \
-insens::
- $(SEDENV) $(SED) -n -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(elide_cr) > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
- @$(RM) $@.out
-
-noeolw::
- $(SEDENV) $(SED) -n -f $(srcdir)/$@.sed \
- $(srcdir)/noeol.inp $(srcdir)/noeol.inp | $(elide_cr) > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
- $(elide_cr) < $@.1out | $(CMP) $(srcdir)/$@.1good -
- $(elide_cr) < $@.2out | $(CMP) $(srcdir)/$@.2good -
- @$(RM) $@.1out $@.2out $@.out
-
-subwrite::
- $(SEDENV) $(SED) -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(elide_cr) > $@.1out
- $(CMP) $(srcdir)/subwrt1.good $@.1out
- $(elide_cr) < $@.wout | $(CMP) $(srcdir)/subwrt2.good -
- @$(RM) $@.1out $@.wout
-
-bsd::
- $(SEDENV_2) sh $(srcdir)/$@.sh '$(TIME) $(SED)' $@.out
- $(elide_cr) < $@.out | $(CMP) $(srcdir)/$@.good -
- @$(RM) $@.out
-
-writeout::
- $(SEDENV) $(SED) -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(elide_cr) > $@.1out
- $(CMP) $(srcdir)/wrtout1.good $@.1out
- $(elide_cr) < $@.wout | $(CMP) $(srcdir)/wrtout2.good -
- @$(RM) $@.1out $@.wout
-
-readin::
- echo MOO | $(SEDENV) $(SED) b > $@.in2
- $(SEDENV) $(SED) -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(elide_cr) > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
- @$(RM) $@.out $@.in2
-
-eval.in2: $(srcdir)/eval.inp
- cat $(srcdir)/eval.inp > $@
-
-eval:: eval.in2
- $(SEDENV) $(SED) -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(elide_cr) > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
- @$(RM) $@.out
-
-binary binary2 binary3::
- $(SEDENV) $(SED) -n -f $(srcdir)/$@.sed \
- < $(srcdir)/binary.inp | $(elide_cr) > $@.out
- $(CMP) $(srcdir)/binary.good $@.out
- @$(RM) $@.out
-
-#
-# cmdlines targets
-#
-
-help::
- $(SEDENV) $(SED) --help | grep E-mail > /dev/null 2>&1
- $(SEDENV) $(SED) --help | $(SEDENV) $(SED) '1s/ [^ ]* / sed /; /^E-mail/,$$d' > $@.1out
- $(SEDENV) $(SED) 2>&1 | $(SEDENV) $(SED) '1s/ [^ ]* / sed /' > $@.2out || :
- $(CMP) $@.1out $@.2out
- @$(RM) $@.1out $@.2out
-
-version::
- $(SEDENV) $(SED) --version 2>&1 | $(elide_cr) > $@.out
- $(CMP) $@.good $@.out
- @$(RM) $@.out
-
-file::
- $(SEDENV) $(SED) --file=$(srcdir)/newjis.sed \
- < $(srcdir)/newjis.inp | $(elide_cr) > $@.out
- $(CMP) $(srcdir)/newjis.good $@.out
- @$(RM) $@.out
-
-quiet::
- $(SEDENV) $(SED) --quiet -f $(srcdir)/cv-vars.sed \
- < $(srcdir)/cv-vars.inp | $(elide_cr) > $@.out
- $(CMP) $(srcdir)/cv-vars.good $@.out
- @$(RM) $@.out
-
-# The following target is not used in super sed builds (only GNU sed)
-
-bug-regex7$(EXEEXT) bug-regex8$(EXEEXT) bug-regex9$(EXEEXT) \
-bug-regex10$(EXEEXT) bug-regex11$(EXEEXT) bug-regex12$(EXEEXT) \
-bug-regex13$(EXEEXT) bug-regex14$(EXEEXT) bug-regex15$(EXEEXT) bug-regex16$(EXEEXT) \
-bug-regex21$(EXEEXT) runtests$(EXEEXT) runptests$(EXEEXT)::
- echo "$(SEDENV) ./$@ > `echo $@ | $(SED) s/$(EXEEXT)$$/.log/`"
- @$(SEDENV) ./$@ > `echo $@ | $(SED) s/$(EXEEXT)$$/.log/`
-
-tst-pcre$(EXEEXT)::
- $(SEDENV) ./tst-pcre $(srcdir)/PCRE.tests > tst-pcre.log
-
-tst-boost$(EXEEXT)::
- $(SEDENV) ./tst-boost $(srcdir)/BOOST.tests > tst-boost.log
-
-tst-rxspencer$(EXEEXT)::
- $(SEDENV) ./tst-rxspencer $(srcdir)/SPENCER.tests > tst-spencer.log
-
-tst-regex2$(EXEEXT)::
- $(SEDENV) ./tst-regex2 $(srcdir)/tst-regex2.c > tst-regex2.log
-
-# The following target is not used in GNU sed builds (only super-sed)
-
-pcretest$(EXEEXT)::
- $(SEDENV) ./pcretest $(srcdir)/pcre1.inp pcre1.out
- $(CMP) $(srcdir)/pcre1.good pcre1.out
- #$(SEDENV) ./pcretest -p $(srcdir)/pcre1.inp pcre1p.out
- #$(CMP) $(srcdir)/pcre1p.good pcre1p.out
- $(SEDENV) ./pcretest -P $(srcdir)/pcre2.inp pcre2.out
- $(CMP) $(srcdir)/pcre2.good pcre2.out
- $(SEDENV) ./pcretest -P -p $(srcdir)/pcre2.inp pcre2p.out
- $(CMP) $(srcdir)/pcre2p.good pcre2p.out
- $(SEDENV) ./pcretest $(srcdir)/pcre3.inp pcre3.out
- $(CMP) $(srcdir)/pcre3.good pcre3.out
- $(SEDENV) ./pcretest -p $(srcdir)/pcre3.inp pcre3p.out
- $(CMP) $(srcdir)/pcre3p.good pcre3p.out
- @$(RM) pcre*.out
-
-.PHONY: \
-bug-regex7$(EXEEXT) bug-regex8$(EXEEXT) bug-regex9$(EXEEXT) \
-bug-regex10$(EXEEXT) bug-regex11$(EXEEXT) bug-regex12$(EXEEXT) \
-bug-regex13$(EXEEXT) bug-regex14$(EXEEXT) bug-regex15$(EXEEXT) bug-regex16$(EXEEXT) \
-bug-regex21$(EXEEXT) runtests$(EXEEXT) runptests$(EXEEXT) tst-regex2$(EXEEXT) \
-tst-pcre$(EXEEXT) tst-boost$(EXEEXT) tst-rxspencer$(EXEEXT) pcretest$(EXEEXT)
diff --git a/testsuite/allsub.good b/testsuite/allsub.good
deleted file mode 100644
index 234e159..0000000
--- a/testsuite/allsub.good
+++ /dev/null
@@ -1 +0,0 @@
-bar bar fo oo f oo bar bar bar bar bar bar bar bar bar bar bar bar bar
diff --git a/testsuite/allsub.inp b/testsuite/allsub.inp
deleted file mode 100644
index f75655f..0000000
--- a/testsuite/allsub.inp
+++ /dev/null
@@ -1 +0,0 @@
-foo foo fo oo f oo foo foo foo foo foo foo foo foo foo foo foo foo foo
diff --git a/testsuite/allsub.sed b/testsuite/allsub.sed
deleted file mode 100644
index 8aa29c1..0000000
--- a/testsuite/allsub.sed
+++ /dev/null
@@ -1 +0,0 @@
-s/foo/bar/g
diff --git a/testsuite/amp-escape.good b/testsuite/amp-escape.good
deleted file mode 100644
index e3a7f7d..0000000
--- a/testsuite/amp-escape.good
+++ /dev/null
@@ -1 +0,0 @@
-yes&
diff --git a/testsuite/amp-escape.inp b/testsuite/amp-escape.inp
deleted file mode 100644
index 7cfab5b..0000000
--- a/testsuite/amp-escape.inp
+++ /dev/null
@@ -1 +0,0 @@
-yes
diff --git a/testsuite/amp-escape.sed b/testsuite/amp-escape.sed
deleted file mode 100644
index 38db527..0000000
--- a/testsuite/amp-escape.sed
+++ /dev/null
@@ -1 +0,0 @@
-s/yes/yes\x26/
diff --git a/testsuite/appquit.good b/testsuite/appquit.good
deleted file mode 100644
index 0742c8e..0000000
--- a/testsuite/appquit.good
+++ /dev/null
@@ -1,2 +0,0 @@
-doh
-ok
diff --git a/testsuite/appquit.inp b/testsuite/appquit.inp
deleted file mode 100644
index a2300c9..0000000
--- a/testsuite/appquit.inp
+++ /dev/null
@@ -1 +0,0 @@
-doh
diff --git a/testsuite/appquit.sed b/testsuite/appquit.sed
deleted file mode 100644
index fc11774..0000000
--- a/testsuite/appquit.sed
+++ /dev/null
@@ -1,4 +0,0 @@
-# Test appending quit
-a\
-ok
-q
diff --git a/testsuite/badenc.good b/testsuite/badenc.good
deleted file mode 100644
index bf6b206..0000000
--- a/testsuite/badenc.good
+++ /dev/null
@@ -1,9 +0,0 @@
-abc
-def
-ghi
-jkl
-mno
-pqr
-stu
-vwx
-yz
diff --git a/testsuite/badenc.inp b/testsuite/badenc.inp
deleted file mode 100644
index bf6b206..0000000
--- a/testsuite/badenc.inp
+++ /dev/null
@@ -1,9 +0,0 @@
-abc
-def
-ghi
-jkl
-mno
-pqr
-stu
-vwx
-yz
diff --git a/testsuite/badenc.sed b/testsuite/badenc.sed
deleted file mode 100644
index c46bb69..0000000
--- a/testsuite/badenc.sed
+++ /dev/null
@@ -1 +0,0 @@
-/.*/ { H ; g ; s/\n// ; p ; z ; x }
diff --git a/testsuite/badenc.sh b/testsuite/badenc.sh
new file mode 100755
index 0000000..c96f4de
--- /dev/null
+++ b/testsuite/badenc.sh
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+# Test runner for old 'badenc' test
+
+# Copyright (C) 2017-2018 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 <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+require_en_utf8_locale_
+
+fail=0
+
+
+# The input (and also the expected output)
+# containing an invalid multibyte sequences in utf-8 (octet \320 = 0xD0).
+printf "abc\nde\320f\nghi\njkl\nmno\npqr\nstu\nvwx\nyz\n" > badenc-inp \
+ || framework_failure_
+
+
+# The progarm: using 'z' to clear the pattern-space even
+# if it contains invalid multibyte sequences.
+# Using 's/.*//' would not be able to clear the pattern-space.
+cat << \EOF > badenc.sed || framework_failure_
+/.*/ { H ; g ; s/\n// ; p ; z ; x }
+EOF
+
+
+env LC_ALL=en_US.UTF-8 sed -nf badenc.sed badenc-inp > badenc-out || fail=1
+remove_cr_inplace badenc-out
+compare badenc-inp badenc-out || fail=1
+
+
+Exit $fail
diff --git a/testsuite/binary.good b/testsuite/binary.good
deleted file mode 100644
index 788024d..0000000
--- a/testsuite/binary.good
+++ /dev/null
@@ -1,8 +0,0 @@
-192
-168
-1
-0
-192
-168
-1
-255
diff --git a/testsuite/binary.inp b/testsuite/binary.inp
deleted file mode 100644
index 06bf77c..0000000
--- a/testsuite/binary.inp
+++ /dev/null
@@ -1,4 +0,0 @@
-192.168.1.2 br b8<r b16<r b24< R|R|R| D
-255.255.255.0 br b8<r b16<r b24< R|R|R| D~r
-& DDD 24>dpP 16>11111111& dpP 8>11111111& dpP 11111111& dpP
-| DDD 24>dpP 16>11111111& dpP 8>11111111& dpP 11111111& dpP
diff --git a/testsuite/binary.sh b/testsuite/binary.sh
new file mode 100755
index 0000000..1833cfc
--- /dev/null
+++ b/testsuite/binary.sh
@@ -0,0 +1,63 @@
+#!/bin/sh
+
+# Test runner for the binary-operation version of dc.sed.
+# Adapted from old-style 'binary.sed' test.
+
+# Copyright (C) 2017-2018 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 <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+cat << \EOF > inp || framework_failure_
+192.168.1.2 br b8<r b16<r b24< R|R|R| D
+255.255.255.0 br b8<r b16<r b24< R|R|R| D~r
+& DDD 24>dpP 16>11111111& dpP 8>11111111& dpP 11111111& dpP
+| DDD 24>dpP 16>11111111& dpP 8>11111111& dpP 11111111& dpP
+EOF
+
+
+cat << \EOF > exp || framework_failure_
+192
+168
+1
+0
+192
+168
+1
+255
+EOF
+
+
+# location of the external SED scripts
+dir="$abs_top_srcdir/testsuite"
+
+
+# Run the three variations of the sed script
+sed -n -f "$dir/binary.sed" < inp > out1 || fail=1
+remove_cr_inplace out1
+compare exp out1 || fail=1
+
+sed -n -f "$dir/binary2.sed" < inp > out2 || fail=1
+remove_cr_inplace out2
+compare exp out2 || fail=1
+
+sed -n -f "$dir/binary3.sed" < inp > out3 || fail=1
+remove_cr_inplace out3
+compare exp out3 || fail=1
+
+
+Exit $fail
diff --git a/testsuite/bkslashes.good b/testsuite/bkslashes.good
deleted file mode 100644
index 770d1e6..0000000
--- a/testsuite/bkslashes.good
+++ /dev/null
@@ -1,2 +0,0 @@
-a\
-
diff --git a/testsuite/bkslashes.inp b/testsuite/bkslashes.inp
deleted file mode 100644
index 7898192..0000000
--- a/testsuite/bkslashes.inp
+++ /dev/null
@@ -1 +0,0 @@
-a
diff --git a/testsuite/bkslashes.sed b/testsuite/bkslashes.sed
deleted file mode 100644
index aa8c66c..0000000
--- a/testsuite/bkslashes.sed
+++ /dev/null
@@ -1,3 +0,0 @@
-# bug in sed 4.0b
-s/$/\\\
-/
diff --git a/testsuite/brackets.good b/testsuite/brackets.good
deleted file mode 100644
index 73f87e7..0000000
--- a/testsuite/brackets.good
+++ /dev/null
@@ -1 +0,0 @@
-abcdefgh[
diff --git a/testsuite/brackets.inp b/testsuite/brackets.inp
deleted file mode 100644
index 3cc5802..0000000
--- a/testsuite/brackets.inp
+++ /dev/null
@@ -1 +0,0 @@
-[[[[[[[[[
diff --git a/testsuite/brackets.sed b/testsuite/brackets.sed
deleted file mode 100644
index 3c70da8..0000000
--- a/testsuite/brackets.sed
+++ /dev/null
@@ -1,8 +0,0 @@
-s/[[]/a/
-s/[[[]/b/
-s/[[[[]/c/
-s/[[[[[]/d/
-s/[[[[[[]/e/
-s/[[[[[[[]/f/
-s/[[[[[[[[]/g/
-s/[[[[[[[[[]/h/
diff --git a/testsuite/bsd-wrapper.sh b/testsuite/bsd-wrapper.sh
new file mode 100644
index 0000000..64e807f
--- /dev/null
+++ b/testsuite/bsd-wrapper.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Test runner for the old bsd tests
+
+# Copyright (C) 2017-2018 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 <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+# location of the external SED scripts
+dir="$abs_top_srcdir/testsuite"
+
+# The 'bsd.sh' script runs multiple tests and generates sed.out file.
+sh "$dir/bsd.sh" || fail=1
+remove_cr_inplace sed.out
+compare "$dir/bsd.good" sed.out || fail=1
+
+
+Exit $fail
diff --git a/testsuite/bug-regex10.c b/testsuite/bug-regex10.c
deleted file mode 100644
index d7b765a..0000000
--- a/testsuite/bug-regex10.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Test for re_match with non-zero start.
- Copyright (C) 2002-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>, 2002.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA. */
-
-#include <config.h>
-
-#include <locale.h>
-#include <stdio.h>
-#include <string.h>
-#include <regex.h>
-
-int
-main (void)
-{
- struct re_pattern_buffer regex;
- struct re_registers regs;
- const char *s;
- int match;
- int result = 0;
-
- regs.num_regs = 1;
- memset (&regex, '\0', sizeof (regex));
- s = re_compile_pattern ("[abc]*d", 7, &regex);
- if (s != NULL)
- {
- puts ("re_compile_pattern return non-NULL value");
- result = 1;
- }
- else
- {
- match = re_match (&regex, "foacabdxy", 9, 2, &regs);
- if (match != 5)
- {
- printf ("re_match returned %d, expected 5\n", match);
- result = 1;
- }
- else if (regs.start[0] != 2 || regs.end[0] != 7)
- {
- printf ("re_match returned %d..%d, expected 2..7\n",
- regs.start[0], regs.end[0]);
- result = 1;
- }
- puts (" -> OK");
- }
-
- return result;
-}
diff --git a/testsuite/bug-regex11.c b/testsuite/bug-regex11.c
deleted file mode 100644
index e02c982..0000000
--- a/testsuite/bug-regex11.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/* Regular expression tests.
- Copyright (C) 2002-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>, 2002.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA. */
-
-#include <config.h>
-
-#include <sys/types.h>
-#ifdef HAVE_MCHECK_H
-#include <mcheck.h>
-#endif
-#include <regex.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-/* Tests supposed to match. */
-struct
-{
- const char *pattern;
- const char *string;
- int flags, nmatch;
- regmatch_t rm[5];
-} tests[] = {
- /* Test for newline handling in regex. */
- { "[^~]*~", "\nx~y", 0, 2, { { 0, 3 }, { -1, -1 } } },
- /* Other tests. */
- { "a(.*)b", "a b", REG_EXTENDED, 2, { { 0, 3 }, { 1, 2 } } },
- { ".*|\\([KIO]\\)\\([^|]*\\).*|?[KIO]", "10~.~|P|K0|I10|O16|?KSb", 0, 3,
- { { 0, 21 }, { 15, 16 }, { 16, 18 } } },
- { ".*|\\([KIO]\\)\\([^|]*\\).*|?\\1", "10~.~|P|K0|I10|O16|?KSb", 0, 3,
- { { 0, 21 }, { 8, 9 }, { 9, 10 } } },
- { "^\\(a*\\)\\1\\{9\\}\\(a\\{0,9\\}\\)\\([0-9]*;.*[^a]\\2\\([0-9]\\)\\)",
- "a1;;0a1aa2aaa3aaaa4aaaaa5aaaaaa6aaaaaaa7aaaaaaaa8aaaaaaaaa9aa2aa1a0", 0,
- 5, { { 0, 67 }, { 0, 0 }, { 0, 1 }, { 1, 67 }, { 66, 67 } } },
- /* Test for BRE expression anchoring. POSIX says just that this may match;
- in glibc regex it always matched, so avoid changing it. */
- { "\\(^\\|foo\\)bar", "bar", 0, 2, { { 0, 3 }, { -1, -1 } } },
- { "\\(foo\\|^\\)bar", "bar", 0, 2, { { 0, 3 }, { -1, -1 } } },
- /* In ERE this must be treated as an anchor. */
- { "(^|foo)bar", "bar", REG_EXTENDED, 2, { { 0, 3 }, { -1, -1 } } },
- { "(foo|^)bar", "bar", REG_EXTENDED, 2, { { 0, 3 }, { -1, -1 } } },
- /* Here ^ cannot be treated as an anchor according to POSIX. */
- { "(^|foo)bar", "(^|foo)bar", 0, 2, { { 0, 10 }, { -1, -1 } } },
- { "(foo|^)bar", "(foo|^)bar", 0, 2, { { 0, 10 }, { -1, -1 } } },
- /* More tests on backreferences. */
- { "()\\1", "x", REG_EXTENDED, 2, { { 0, 0 }, { 0, 0 } } },
- { "()x\\1", "x", REG_EXTENDED, 2, { { 0, 1 }, { 0, 0 } } },
- { "()\\1*\\1*", "", REG_EXTENDED, 2, { { 0, 0 }, { 0, 0 } } },
- { "([0-9]).*\\1(a*)", "7;7a6", REG_EXTENDED, 3, { { 0, 4 }, { 0, 1 }, { 3, 4 } } },
- { "([0-9]).*\\1(a*)", "7;7a", REG_EXTENDED, 3, { { 0, 4 }, { 0, 1 }, { 3, 4 } } },
- { "(b)()c\\1", "bcb", REG_EXTENDED, 3, { { 0, 3 }, { 0, 1 }, { 1, 1 } } },
- { "()(b)c\\2", "bcb", REG_EXTENDED, 3, { { 0, 3 }, { 0, 0 }, { 0, 1 } } },
- { "a(b)()c\\1", "abcb", REG_EXTENDED, 3, { { 0, 4 }, { 1, 2 }, { 2, 2 } } },
- { "a()(b)c\\2", "abcb", REG_EXTENDED, 3, { { 0, 4 }, { 1, 1 }, { 1, 2 } } },
- { "()(b)\\1c\\2", "bcb", REG_EXTENDED, 3, { { 0, 3 }, { 0, 0 }, { 0, 1 } } },
- { "(b())\\2\\1", "bbbb", REG_EXTENDED, 3, { { 0, 2 }, { 0, 1 }, { 1, 1 } } },
- { "a()(b)\\1c\\2", "abcb", REG_EXTENDED, 3, { { 0, 4 }, { 1, 1 }, { 1, 2 } } },
- { "a()d(b)\\1c\\2", "adbcb", REG_EXTENDED, 3, { { 0, 5 }, { 1, 1 }, { 2, 3 } } },
- { "a(b())\\2\\1", "abbbb", REG_EXTENDED, 3, { { 0, 3 }, { 1, 2 }, { 2, 2 } } },
- { "(bb())\\2\\1", "bbbb", REG_EXTENDED, 3, { { 0, 4 }, { 0, 2 }, { 2, 2 } } },
- { "^(.?)(.?)(.?)(.?)(.?).?\\5\\4\\3\\2\\1$",
- "level", REG_NOSUB | REG_EXTENDED, 0, { { -1, -1 } } },
- { "^(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.).?\\9\\8\\7\\6\\5\\4\\3\\2\\1$|^.?$",
- "level", REG_NOSUB | REG_EXTENDED, 0, { { -1, -1 } } },
- { "^(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.).?\\9\\8\\7\\6\\5\\4\\3\\2\\1$|^.?$",
- "abcdedcba", REG_EXTENDED, 1, { { 0, 9 } } },
-#if 0
- /* XXX Not used since they fail so far. */
- { "^(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.).?\\9\\8\\7\\6\\5\\4\\3\\2\\1$|^.?$",
- "ababababa", REG_EXTENDED, 1, { { 0, 9 } } },
- { "^(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?).?\\9\\8\\7\\6\\5\\4\\3\\2\\1$",
- "level", REG_NOSUB | REG_EXTENDED, 0, { { -1, -1 } } },
- { "^(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?).?\\9\\8\\7\\6\\5\\4\\3\\2\\1$",
- "ababababa", REG_EXTENDED, 1, { { 0, 9 } } },
-#endif
-};
-
-int
-main (void)
-{
- regex_t re;
- regmatch_t rm[5];
- size_t i;
- int n, ret = 0;
-
-#ifdef HAVE_MCHECK_H
- mtrace ();
-#endif
-
- for (i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i)
- {
- n = regcomp (&re, tests[i].pattern, tests[i].flags);
- if (n != 0)
- {
- char buf[500];
- regerror (n, &re, buf, sizeof (buf));
- printf ("%s: regcomp %lu failed: %s\n", tests[i].pattern, i, buf);
- ret = 1;
- continue;
- }
-
- if (regexec (&re, tests[i].string, tests[i].nmatch, rm, 0))
- {
- printf ("%s: regexec %lu failed\n", tests[i].pattern, i);
- ret = 1;
- regfree (&re);
- continue;
- }
-
- for (n = 0; n < tests[i].nmatch; ++n)
- if (rm[n].rm_so != tests[i].rm[n].rm_so
- || rm[n].rm_eo != tests[i].rm[n].rm_eo)
- {
- if (tests[i].rm[n].rm_so == -1 && tests[i].rm[n].rm_eo == -1)
- break;
- printf ("%s: regexec %lu match failure rm[%d] %d..%d\n",
- tests[i].pattern, i, n, rm[n].rm_so, rm[n].rm_eo);
- ret = 1;
- break;
- }
-
- regfree (&re);
- }
-
- return ret;
-}
diff --git a/testsuite/bug-regex12.c b/testsuite/bug-regex12.c
deleted file mode 100644
index 72e302c..0000000
--- a/testsuite/bug-regex12.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/* Regular expression tests.
- Copyright (C) 2002-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>, 2002.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA. */
-
-#include <config.h>
-
-#include <sys/types.h>
-#ifdef HAVE_MCHECK_H
-#include <mcheck.h>
-#endif
-#include <regex.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-/* Tests supposed to not match. */
-struct
-{
- const char *pattern;
- const char *string;
- int flags, nmatch;
-} tests[] = {
- { "^<\\([^~]*\\)\\([^~]\\)[^~]*~\\1\\(.\\).*|=.*\\3.*\\2",
- "<,.8~2,~so-|=-~.0,123456789<><", REG_NOSUB, 0 },
- /* In ERE, all carets must be treated as anchors. */
- { "a^b", "a^b", REG_EXTENDED, 0 }
-};
-
-int
-main (void)
-{
- regex_t re;
- regmatch_t rm[4];
- size_t i;
- int n, ret = 0;
-
-#ifdef HAVE_MCHECK_H
- mtrace ();
-#endif
-
- for (i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i)
- {
- n = regcomp (&re, tests[i].pattern, tests[i].flags);
- if (n != 0)
- {
- char buf[500];
- regerror (n, &re, buf, sizeof (buf));
- printf ("regcomp %lu failed: %s\n", i, buf);
- ret = 1;
- continue;
- }
-
- if (! regexec (&re, tests[i].string, tests[i].nmatch,
- tests[i].nmatch ? rm : NULL, 0))
- {
- printf ("regexec %lu incorrectly matched\n", i);
- ret = 1;
- }
-
- regfree (&re);
- }
-
- return ret;
-}
diff --git a/testsuite/bug-regex13.c b/testsuite/bug-regex13.c
deleted file mode 100644
index 9a14b66..0000000
--- a/testsuite/bug-regex13.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/* Regular expression tests.
- Copyright (C) 2002-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>, 2002.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA. */
-
-#include <config.h>
-
-#include <sys/types.h>
-#ifdef HAVE_MCHECK_H
-#include <mcheck.h>
-#endif
-#include <regex.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-static struct
-{
- int syntax;
- const char *pattern;
- const char *string;
- int start;
-} tests[] = {
- {RE_BACKSLASH_ESCAPE_IN_LISTS, "[0\\-9]", "1", -1}, /* It should not match. */
- {RE_BACKSLASH_ESCAPE_IN_LISTS, "[0\\-9]", "-", 0}, /* It should match. */
- {RE_SYNTAX_POSIX_BASIC, "s1\n.*\ns3", "s1\ns2\ns3", 0},
- {RE_SYNTAX_POSIX_EXTENDED, "ab{0}c", "ac", 0},
- {RE_SYNTAX_POSIX_EXTENDED, "ab{0}c", "abc", -1},
- {RE_SYNTAX_POSIX_EXTENDED, "ab{0}c", "abbc", -1},
- /* Nested duplication. */
- {RE_SYNTAX_POSIX_EXTENDED, "ab{1}{1}c", "ac", -1},
- {RE_SYNTAX_POSIX_EXTENDED, "ab{1}{1}c", "abc", 0},
- {RE_SYNTAX_POSIX_EXTENDED, "ab{1}{1}c", "abbc", -1},
- {RE_SYNTAX_POSIX_EXTENDED, "ab{2}{2}c", "ac", -1},
- {RE_SYNTAX_POSIX_EXTENDED, "ab{2}{2}c", "abbc", -1},
- {RE_SYNTAX_POSIX_EXTENDED, "ab{2}{2}c", "abbbbc", 0},
- {RE_SYNTAX_POSIX_EXTENDED, "ab{2}{2}c", "abbbbbc", -1},
- {RE_SYNTAX_POSIX_EXTENDED, "ab{0}{1}c", "ac", 0},
- {RE_SYNTAX_POSIX_EXTENDED, "ab{0}{1}c", "abc", -1},
- {RE_SYNTAX_POSIX_EXTENDED, "ab{0}{1}c", "abbc", -1},
- {RE_SYNTAX_POSIX_EXTENDED, "ab{1}{0}c", "ac", 0},
- {RE_SYNTAX_POSIX_EXTENDED, "ab{1}{0}c", "abc", -1},
- {RE_SYNTAX_POSIX_EXTENDED, "ab{1}{0}c", "abbc", -1},
- {RE_SYNTAX_POSIX_EXTENDED, "ab{0}*c", "ac", 0},
- {RE_SYNTAX_POSIX_EXTENDED, "ab{0}*c", "abc", -1},
- {RE_SYNTAX_POSIX_EXTENDED, "ab{0}*c", "abbc", -1},
- {RE_SYNTAX_POSIX_EXTENDED, "ab{0}?c", "ac", 0},
- {RE_SYNTAX_POSIX_EXTENDED, "ab{0}?c", "abc", -1},
- {RE_SYNTAX_POSIX_EXTENDED, "ab{0}?c", "abbc", -1},
- {RE_SYNTAX_POSIX_EXTENDED, "ab{0}+c", "ac", 0},
- {RE_SYNTAX_POSIX_EXTENDED, "ab{0}+c", "abc", -1},
- {RE_SYNTAX_POSIX_EXTENDED, "ab{0}+c", "abbc", -1},
-};
-
-int
-main (void)
-{
- struct re_pattern_buffer regbuf;
- const char *err;
- size_t i;
- int ret = 0;
-
-#ifdef HAVE_MCHECK_H
- mtrace ();
-#endif
-
- for (i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i)
- {
- int start;
- re_set_syntax (tests[i].syntax);
- memset (&regbuf, '\0', sizeof (regbuf));
- err = re_compile_pattern (tests[i].pattern, strlen (tests[i].pattern),
- &regbuf);
- if (err != NULL)
- {
- printf ("re_compile_pattern failed: %s\n", err);
- ret = 1;
- continue;
- }
-
- start = re_search (&regbuf, tests[i].string, strlen (tests[i].string),
- 0, strlen (tests[i].string), NULL);
- if (start != tests[i].start)
- {
- printf ("re_search failed %d\n", start);
- ret = 1;
- regfree (&regbuf);
- continue;
- }
- regfree (&regbuf);
- }
-
- return ret;
-}
diff --git a/testsuite/bug-regex14.c b/testsuite/bug-regex14.c
deleted file mode 100644
index e304fbc..0000000
--- a/testsuite/bug-regex14.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Tests re_comp and re_exec.
- Copyright (C) 2002-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>, 2002.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA. */
-
-#include <config.h>
-
-#define _REGEX_RE_COMP
-#include <sys/types.h>
-#ifdef HAVE_MCHECK_H
-#include <mcheck.h>
-#endif
-#include <regex.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int
-main (void)
-{
- const char *err;
- size_t i;
- int ret = 0;
-
-#ifdef HAVE_MCHECK_H
- mtrace ();
-#endif
-
- for (i = 0; i < 100; ++i)
- {
- err = re_comp ("a t.st");
- if (err)
- {
- printf ("re_comp failed: %s\n", err);
- ret = 1;
- }
-
- if (! re_exec ("This is a test."))
- {
- printf ("re_exec failed\n");
- ret = 1;
- }
- }
-
- return ret;
-}
diff --git a/testsuite/bug-regex15.c b/testsuite/bug-regex15.c
deleted file mode 100644
index 4d348a4..0000000
--- a/testsuite/bug-regex15.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Test for memory/CPU leak in regcomp. */
-
-#include <config.h>
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <regex.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#define TEST_DATA_LIMIT (32 << 20)
-
-int
-main ()
-{
-#ifdef RLIMIT_DATA
- regex_t re;
- int reerr;
-
- /* Try to avoid eating all memory if a test leaks. */
- struct rlimit data_limit;
- if (getrlimit (RLIMIT_DATA, &data_limit) == 0)
- {
- if ((rlim_t) TEST_DATA_LIMIT > data_limit.rlim_max)
- data_limit.rlim_cur = data_limit.rlim_max;
- else if (data_limit.rlim_cur > (rlim_t) TEST_DATA_LIMIT)
- data_limit.rlim_cur = (rlim_t) TEST_DATA_LIMIT;
- if (setrlimit (RLIMIT_DATA, &data_limit) < 0)
- perror ("setrlimit: RLIMIT_DATA");
- }
- else
- perror ("getrlimit: RLIMIT_DATA");
-
- reerr = regcomp (&re, "^6?3?[25]?5?[14]*[25]*[69]*+[58]*87?4?$",
- REG_EXTENDED | REG_NOSUB);
- if (reerr != 0)
- {
- char buf[100];
- regerror (reerr, &re, buf, sizeof buf);
- printf ("regerror %s\n", buf);
- return 1;
- }
-
- return 0;
-#else
- return 77;
-#endif
-}
diff --git a/testsuite/bug-regex16.c b/testsuite/bug-regex16.c
deleted file mode 100644
index c767f42..0000000
--- a/testsuite/bug-regex16.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Test re_compile_pattern error messages. */
-
-#include <config.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <regex.h>
-
-int
-main (void)
-{
- struct re_pattern_buffer re;
- const char *s;
- int ret = 0;
-
- re_set_syntax (RE_SYNTAX_POSIX_EGREP);
- memset (&re, 0, sizeof (re));
- s = re_compile_pattern ("[[.invalid_collating_symbol.]]", 30, &re);
- if (s == NULL || strcmp (s, "Invalid collation character"))
- {
- printf ("re_compile_pattern returned %s\n", s);
- ret = 1;
- }
- s = re_compile_pattern ("[[=invalid_equivalence_class=]]", 31, &re);
- if (s == NULL || strcmp (s, "Invalid collation character"))
- {
- printf ("re_compile_pattern returned %s\n", s);
- ret = 1;
- }
- s = re_compile_pattern ("[[:invalid_character_class:]]", 29, &re);
- if (s == NULL || strcmp (s, "Invalid character class name"))
- {
- printf ("re_compile_pattern returned %s\n", s);
- ret = 1;
- }
- return ret;
-}
diff --git a/testsuite/bug-regex21.c b/testsuite/bug-regex21.c
deleted file mode 100644
index eaff92b..0000000
--- a/testsuite/bug-regex21.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Test for memory leaks in regcomp.
- Copyright (C) 2003-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA. */
-
-#include <config.h>
-
-#ifdef HAVE_MCHECK_H
-#include <mcheck.h>
-#endif
-#include <regex.h>
-#include <stdio.h>
-
-int main (void)
-{
- regex_t re;
- int i;
- int ret = 0;
-
-#ifdef HAVE_MCHECK_H
- mtrace ();
-#endif
-
- for (i = 0; i < 32; ++i)
- {
- if (regcomp (&re, "X-.+:.+Y=\".*\\.(A|B|C|D|E|F|G|H|I",
- REG_EXTENDED | REG_ICASE) == 0)
- {
- puts ("regcomp unexpectedly succeeded");
- ret = 1;
- }
- else
- regfree (&re);
- }
- return ret;
-}
diff --git a/testsuite/bug-regex27.c b/testsuite/bug-regex27.c
deleted file mode 100644
index d6f6059..0000000
--- a/testsuite/bug-regex27.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Test REG_NEWLINE.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>, 2007.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <config.h>
-#include <regex.h>
-#include <stdio.h>
-#include <string.h>
-
-struct tests
-{
- const char *regex;
- const char *string;
- int cflags;
- int retval;
-} tests[] = {
- { "a.b", "a\nb", REG_EXTENDED | REG_NEWLINE, REG_NOMATCH },
- { "a.b", "a\nb", REG_EXTENDED, 0 },
- { "a[^x]b", "a\nb", REG_EXTENDED | REG_NEWLINE, REG_NOMATCH },
- { "a[^x]b", "a\nb", REG_EXTENDED, 0 }
-};
-
-int
-main (void)
-{
- regex_t r;
- size_t i;
- int ret = 0;
-
- for (i = 0; i < sizeof (tests) / sizeof (tests[i]); ++i)
- {
- memset (&r, 0, sizeof (r));
- if (regcomp (&r, tests[i].regex, tests[i].cflags))
- {
- printf ("regcomp %lu failed\n", i);
- ret = 1;
- continue;
- }
- int rv = regexec (&r, tests[i].string, 0, NULL, 0);
- if (rv != tests[i].retval)
- {
- printf ("regexec %lu unexpected value %d != %d\n",
- i, rv, tests[i].retval);
- ret = 1;
- }
- regfree (&r);
- }
- return ret;
-}
diff --git a/testsuite/bug-regex28.c b/testsuite/bug-regex28.c
deleted file mode 100644
index 3a4dbec..0000000
--- a/testsuite/bug-regex28.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Test RE_HAT_LISTS_NOT_NEWLINE and RE_DOT_NEWLINE.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>, 2007.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <config.h>
-#include <regex.h>
-#include <stdio.h>
-#include <string.h>
-
-struct tests
-{
- const char *regex;
- const char *string;
- reg_syntax_t syntax;
- int retval;
-} tests[] = {
-#define EGREP RE_SYNTAX_EGREP
-#define EGREP_NL (RE_SYNTAX_EGREP | RE_DOT_NEWLINE) & ~RE_HAT_LISTS_NOT_NEWLINE
- { "a.b", "a\nb", EGREP, -1 },
- { "a.b", "a\nb", EGREP_NL, 0 },
- { "a[^x]b", "a\nb", EGREP, -1 },
- { "a[^x]b", "a\nb", EGREP_NL, 0 },
- /* While \S and \W are internally handled as [^[:space:]] and [^[:alnum:]_],
- RE_HAT_LISTS_NOT_NEWLINE did not make any difference, so ensure
- it doesn't change. */
- { "a\\Sb", "a\nb", EGREP, -1 },
- { "a\\Sb", "a\nb", EGREP_NL, -1 },
- { "a\\Wb", "a\nb", EGREP, 0 },
- { "a\\Wb", "a\nb", EGREP_NL, 0 }
-};
-
-int
-main (void)
-{
- struct re_pattern_buffer r;
- size_t i;
- int ret = 0;
-
- for (i = 0; i < sizeof (tests) / sizeof (tests[i]); ++i)
- {
- re_set_syntax (tests[i].syntax);
- memset (&r, 0, sizeof (r));
- if (re_compile_pattern (tests[i].regex, strlen (tests[i].regex), &r))
- {
- printf ("re_compile_pattern %lu failed\n", i);
- ret = 1;
- continue;
- }
- size_t len = strlen (tests[i].string);
- int rv = re_search (&r, tests[i].string, len, 0, len, NULL);
- if (rv != tests[i].retval)
- {
- printf ("re_search %lu unexpected value %d != %d\n",
- i, rv, tests[i].retval);
- ret = 1;
- }
- regfree (&r);
- }
- return ret;
-}
diff --git a/testsuite/bug-regex7.c b/testsuite/bug-regex7.c
deleted file mode 100644
index 7a99dfc..0000000
--- a/testsuite/bug-regex7.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/* Test for regs allocation in re_search and re_match.
- Copyright (C) 2002-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Stepan Kasal <kasal@math.cas.cz>, 2002.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA. */
-
-#include <config.h>
-
-#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <regex.h>
-
-
-int
-main (void)
-{
- struct re_pattern_buffer regex;
- struct re_registers regs;
- const char *s;
- int match, n;
- int result = 0;
-
- memset (&regex, '\0', sizeof (regex));
- regs.start = regs.end = NULL;
- regs.num_regs = 0;
- s = re_compile_pattern ("a", 1, &regex);
- if (s != NULL)
- {
- puts ("failed to compile pattern \"a\"");
- result = 1;
- }
- else
- {
- match = re_search (&regex, "baobab", 6, 0, 6, &regs);
- n = 1;
- if (match != 1)
- {
- printf ("re_search returned %d, expected 1\n", match);
- result = 1;
- }
- else if (regs.num_regs <= n || regs.start[n] != -1 || regs.end[n] != -1)
- {
- puts ("re_search failed to fill the -1 sentinel");
- result = 1;
- }
- }
-
- free (regex.buffer);
- memset (&regex, '\0', sizeof (regex));
-
- s = re_compile_pattern ("\\(\\(\\(a\\)\\)\\)", 13, &regex);
- if (s != NULL)
- {
- puts ("failed to compile pattern /\\(\\(\\(a\\)\\)\\)/");
- result = 1;
- }
- else
- {
- match = re_match (&regex, "apl", 3, 0, &regs);
- n = 4;
- if (match != 1)
- {
- printf ("re_match returned %d, expected 1\n", match);
- result = 1;
- }
- else if (regs.num_regs <= n || regs.start[n] != -1 || regs.end[n] != -1)
- {
- puts ("re_match failed to fill the -1 sentinel");
- result = 1;
- }
- }
-
- if (result == 0)
- puts (" -> OK");
-
- return result;
-}
diff --git a/testsuite/bug-regex8.c b/testsuite/bug-regex8.c
deleted file mode 100644
index f30341d..0000000
--- a/testsuite/bug-regex8.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Test for the STOP parameter of re_match_2 and re_search_2.
- Copyright (C) 2002-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Stepan Kasal <kasal@math.cas.cz>, 2002.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA. */
-
-#include <config.h>
-
-#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <regex.h>
-
-
-int
-main (void)
-{
- struct re_pattern_buffer regex;
- const char *s;
- int match[4];
-
- memset (&regex, '\0', sizeof (regex));
-
- s = re_compile_pattern ("xy$", 3, &regex);
- if (s != NULL)
- {
- puts ("failed to compile pattern \"xy$\"");
- return 1;
- }
- else
- match[0] = re_match_2(&regex,"xyz",3,NULL,0,0,NULL,2);
-
- free (regex.buffer);
- memset (&regex, '\0', sizeof (regex));
-
- s = re_compile_pattern ("xy\\>", 4, &regex);
- if (s != NULL)
- {
- puts ("failed to compile pattern \"xy\\>\"");
- return 1;
- }
- else
- match[1] = re_search_2(&regex,"xyz",3,NULL,0,0,2,NULL,2);
-
- free (regex.buffer);
- memset (&regex, '\0', sizeof (regex));
-
- s = re_compile_pattern ("xy \\<", 5, &regex);
- if (s != NULL)
- {
- puts ("failed to compile pattern \"xy \\<\"");
- return 1;
- }
- else
- {
- match[2] = re_match_2(&regex,"xy ",4,NULL,0,0,NULL,3);
- match[3] = re_match_2(&regex,"xy z",4,NULL,0,0,NULL,3);
- }
-
- if (match[0] != -1 || match[1] != -1 || match[2] != -1 || match[3] != 3)
- {
- printf ("re_{match,search}_2 returned %d,%d,%d,%d, expected -1,-1,-1,3\n",
- match[0], match[1], match[2], match[3]);
- return 1;
- }
-
- puts (" -> OK");
-
- return 0;
-}
diff --git a/testsuite/bug-regex9.c b/testsuite/bug-regex9.c
deleted file mode 100644
index 7895215..0000000
--- a/testsuite/bug-regex9.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Test for memory handling in regex.
- Copyright (C) 2002-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA. */
-
-#include <config.h>
-
-#include <sys/types.h>
-#ifdef HAVE_MCHECK_H
-#include <mcheck.h>
-#endif
-#include <regex.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-
-static const char text[] = "#! /bin/sh";
-
-int
-main (void)
-{
- regex_t re;
- regmatch_t rm[2];
- int n;
-
-#ifdef HAVE_MCHECK_H
- mtrace ();
-#endif
-
- n = regcomp (&re, "^#! */.*/(k|ba||pdk|z)sh", REG_EXTENDED);
- if (n != 0)
- {
- char buf[500];
- regerror (n, &re, buf, sizeof (buf));
- printf ("regcomp failed: %s\n", buf);
- exit (1);
- }
-
- for (n = 0; n < 20; ++n)
- {
- if (regexec (&re, text, 2, rm, 0))
- {
- puts ("regexec failed");
- exit (2);
- }
- if (rm[0].rm_so != 0 || rm[0].rm_eo != 10
- || rm[1].rm_so != 8 || rm[1].rm_eo != 8)
- {
- printf ("regexec match failure: %d %d %d %d\n",
- rm[0].rm_so, rm[0].rm_eo, rm[1].rm_so, rm[1].rm_eo);
- exit (3);
- }
- }
-
- regfree (&re);
-
- return 0;
-}
diff --git a/testsuite/classes.good b/testsuite/classes.good
deleted file mode 100644
index 58f96f4..0000000
--- a/testsuite/classes.good
+++ /dev/null
@@ -1,4 +0,0 @@
-: ${_cv_='emptyvar'}
-: ${ac_cv_prog/RANLIB='/usr/bin/ranlib'}
-: ${ac_cv_prog/CC='/usr/unsupported/\ \ /lib/_cv_/cc'}
-: ${a/c_cv_prog/CPP='/usr/bin/cpp'}
diff --git a/testsuite/classes.inp b/testsuite/classes.inp
deleted file mode 100644
index f1314b6..0000000
--- a/testsuite/classes.inp
+++ /dev/null
@@ -1,6 +0,0 @@
-_cv_=emptyvar
-ac_cv_prog/RANLIB=/usr/bin/ranlib
-ac_cv_prog/CC=/usr/unsupported/\ \ /lib/_cv_/cc
-a/c_cv_prog/CPP=/usr/bin/cpp
-SHELL=bash
-GNU=GNU!UNIX
diff --git a/testsuite/classes.sed b/testsuite/classes.sed
deleted file mode 100644
index 897651f..0000000
--- a/testsuite/classes.sed
+++ /dev/null
@@ -1,2 +0,0 @@
-# inspired by an autoconf generated configure script.
-s/^\([/[:lower:]A-Z0-9]*_cv_[[:lower:][:upper:]/[:digit:]]*\)=\(.*\)/: \${\1='\2'}/p
diff --git a/testsuite/cmd-R.sh b/testsuite/cmd-R.sh
index 3f6da01..1e34a08 100644
--- a/testsuite/cmd-R.sh
+++ b/testsuite/cmd-R.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test 'R' command
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/cmd-l.sh b/testsuite/cmd-l.sh
index 395b134..fcf3c6c 100755
--- a/testsuite/cmd-l.sh
+++ b/testsuite/cmd-l.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test 'l' command with different widths
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/colon-with-no-label.sh b/testsuite/colon-with-no-label.sh
index 6b1c4ed..426bb4c 100755
--- a/testsuite/colon-with-no-label.sh
+++ b/testsuite/colon-with-no-label.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Verify that a ":" command with no label is now rejected.
-# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+# Copyright (C) 2015-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/command-endings.sh b/testsuite/command-endings.sh
new file mode 100644
index 0000000..1c257e9
--- /dev/null
+++ b/testsuite/command-endings.sh
@@ -0,0 +1,137 @@
+#!/bin/sh
+# Test command separators and endings
+
+# Copyright (C) 2017-2018 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 <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+# Allowed endings/separators after most commands:
+# newline, comment, closing brace, semicolon, EOF
+# they are also allowed after opening and closing braces themselves.
+#
+# Not tested here:
+# r/R/w/R/e and s///[we] which use read_filename() and do not
+# accept comments or semicolons.
+
+
+
+# Test commands and braces followed by:
+# closing braces, comment, semicolons, EOF (newlines are tested later).
+#
+# sed-4.3 wrongly rejected y/// followed by '}' or '#' (bug#22460).
+#
+# Implementation notes (see compile.c):
+# Simple commands, '}', and 'y///' commands use read_end_of_cmd().
+#
+# q/Q/l/L have additional check for optional integer,
+# then call read_end_of_cmd().
+#
+# labels use 'read_label()'.
+#
+# 's///' has special handling, depending on additional flags
+# (with 's///[we]' commands and semicolons are not allowed).
+# Implemented in mark_subst_opts().
+#
+for p in \
+ 'h' \
+ 'h;' \
+ 'h ;' \
+ 'h# foo' \
+ 'h # foo' \
+ '{h}' \
+ '{h } ' \
+ '{ h } ' \
+ \
+ '{h}# foo' \
+ '{h} # foo' \
+ '{h};' \
+ '{h} ;' \
+ '{;h;} ' \
+ '{{h}}' \
+ '{;{h};}' \
+ \
+ 'y/1/a/' \
+ 'y/1/a/;d' \
+ 'y/1/a/ ;d' \
+ '{y/1/a/}' \
+ 'y/1/a/#foo'\
+ 'y/1/a/ #fo'\
+ \
+ 's/1/a/' \
+ 's/1/a/;d' \
+ 's/1/a/ ;d' \
+ '{s/1/a/}' \
+ 's/1/a/#foo'\
+ 's/1/a/ #fo'\
+ \
+ 's/1/a/i ;' \
+ 's/1/a/i #foo' \
+ '{ s/1/a/i }' \
+ \
+ 'bx; :x' \
+ 'bx; :x;' \
+ 'bx; :x ;' \
+ 'bx; :x#foo' \
+ 'bx; :x #foo' \
+ '{ bx; :x }' \
+ \
+ 'l' \
+ 'l;' \
+ 'l ;' \
+ 'l#foo' \
+ 'l #foo' \
+ '{l}' \
+ '{l }' \
+ 'l1' \
+ 'l1;' \
+ 'l1 ;' \
+ 'l1#foo' \
+ 'l1 #foo' \
+ '{l1}' \
+ '{l1 }' \
+ ;
+do
+ sed -n "$p" < /dev/null >out 2>err || fail=1
+ compare /dev/null err || fail=1
+ compare /dev/null out || fail=1
+done
+
+
+# Create files to test newlines after commands
+# (instead of having to embed newlines in shell variables in a portable way)
+printf 'd\n' > nl1 || framework_failure_
+printf '{\nd}' > nl2 || framework_failure_
+printf '{d\n}' > nl3 || framework_failure_
+printf '{d}\n' > nl4 || framework_failure_
+printf 'y/1/a/\n' > nl5 || framework_failure_
+printf 's/1/a/\n' > nl6 || framework_failure_
+printf 'bx\n:x\n' > nl7 || framework_failure_
+printf 'l\n' > nl8 || framework_failure_
+printf 'l1\n' > nl9 || framework_failure_
+# s/// has special allowance for \r in mark_subst_opts(),
+# even if not on windows.
+# TODO: should other commands allow it ?
+printf 's/1/a/\r\n' > nl10 || framework_failure_
+
+for i in 1 2 3 4 5 6 7 8 9 10 ;
+do
+ sed -n -f "nl$i" </dev/null >out 2>err || fail=1
+ compare /dev/null err || fail=1
+ compare /dev/null out || fail=1
+done
+
+
+Exit $fail
diff --git a/testsuite/comment-n.sh b/testsuite/comment-n.sh
index 5496115..03e7b95 100644
--- a/testsuite/comment-n.sh
+++ b/testsuite/comment-n.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test the '#n' silent mode (activated by first line comment)
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/compile-errors.sh b/testsuite/compile-errors.sh
index d8e2f88..d3c5bf9 100644
--- a/testsuite/compile-errors.sh
+++ b/testsuite/compile-errors.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test compilation errors
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/compile-tests.sh b/testsuite/compile-tests.sh
index b4d4256..e86a27c 100644
--- a/testsuite/compile-tests.sh
+++ b/testsuite/compile-tests.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test compilation less-common cases
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/convert-number.sh b/testsuite/convert-number.sh
index b9ceccb..b2297e4 100755
--- a/testsuite/convert-number.sh
+++ b/testsuite/convert-number.sh
@@ -2,7 +2,7 @@
# Test number conversion from escape sequences \xNN \oNNN \dNNN
# (compile.c:convert_number())
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -15,7 +15,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/cv-vars.good b/testsuite/cv-vars.good
deleted file mode 100644
index 14707bf..0000000
--- a/testsuite/cv-vars.good
+++ /dev/null
@@ -1,4 +0,0 @@
-: ${_cv_='emptyvar'}
-: ${ac_cv_prog_RANLIB='/usr/bin/ranlib'}
-: ${ac_cv_prog_CC='/usr/unsupported/\ \ /lib/_cv_/cc'}
-: ${ac_cv_prog_CPP='/usr/bin/cpp'}
diff --git a/testsuite/cv-vars.inp b/testsuite/cv-vars.inp
deleted file mode 100644
index 5e92b1c..0000000
--- a/testsuite/cv-vars.inp
+++ /dev/null
@@ -1,6 +0,0 @@
-_cv_=emptyvar
-ac_cv_prog_RANLIB=/usr/bin/ranlib
-ac_cv_prog_CC=/usr/unsupported/\ \ /lib/_cv_/cc
-ac_cv_prog_CPP=/usr/bin/cpp
-SHELL=bash
-GNU=GNU!UNIX
diff --git a/testsuite/cv-vars.sed b/testsuite/cv-vars.sed
deleted file mode 100644
index e49c73e..0000000
--- a/testsuite/cv-vars.sed
+++ /dev/null
@@ -1,2 +0,0 @@
-# inspired by an autoconf generated configure script.
-s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p
diff --git a/testsuite/dc.good b/testsuite/dc.good
deleted file mode 100644
index 7604d56..0000000
--- a/testsuite/dc.good
+++ /dev/null
@@ -1,3 +0,0 @@
-31
-March 2002
-1.6A09E667A
diff --git a/testsuite/dc.inp b/testsuite/dc.inp
deleted file mode 100644
index 95e17a4..0000000
--- a/testsuite/dc.inp
+++ /dev/null
@@ -1,14 +0,0 @@
-# Compute Easter of 2002...
-# usage: (echo YEAR; cat easter.dc) | dc
-
-2002
-
-[ddsf[lfp[too early
-]Pq]s@1583>@
-ddd19%1+sg100/1+d3*4/12-sx8*5+25/5-sz5*4/lx-10-sdlg11*20+lz+lx-30%
-d[30+]s@0>@d[[1+]s@lg11<@]s@25=@d[1+]s@24=@se44le-d[30+]s@21>@dld+7%-7+
-[March ]smd[31-[April ]sm]s@31<@psnlmPpsn1z>p]splpx
-
-# Compute square root of 2
-
-16oAk2vpq
diff --git a/testsuite/dc.sh b/testsuite/dc.sh
new file mode 100755
index 0000000..421896b
--- /dev/null
+++ b/testsuite/dc.sh
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+# Test runner for dc.sed
+
+# Copyright (C) 2017-2018 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 <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+
+# Compute Easter of 2002...
+# usage: (echo YEAR; cat easter.dc) | dc.sed
+cat << \EOF > easter.dc || framework_failure_
+[ddsf[lfp[too early
+]Pq]s@1583>@
+ddd19%1+sg100/1+d3*4/12-sx8*5+25/5-sz5*4/lx-10-sdlg11*20+lz+lx-30%
+d[30+]s@0>@d[[1+]s@lg11<@]s@25=@d[1+]s@24=@se44le-d[30+]s@21>@dld+7%-7+
+[March ]smd[31-[April ]sm]s@31<@psnlmPpsn1z>p]splpx
+EOF
+
+cat <<\EOF > easter-exp || framework_failure_
+31
+March 2002
+EOF
+
+
+# Compute square root of 2
+cat << \EOF > sqrt2-inp || framework_failure_
+16oAk2vpq
+EOF
+
+
+cat << \EOF > sqrt2-exp || framework_failure_
+1.6A09E667A
+EOF
+
+
+# location of external test files
+dir="$abs_top_srcdir/testsuite"
+
+# Easter 2002
+( echo 2002 ; cat easter.dc ) | sed -n -f "$dir/dc.sed" > easter-out|| fail=1
+compare easter-exp easter-out || fail=1
+
+# Square root of 2
+sed -n -f "$dir/dc.sed" sqrt2-inp > sqrt2-out || fail=1
+compare sqrt2-exp sqrt2-out || fail=1
+
+
+
+Exit $fail
diff --git a/testsuite/distrib.good b/testsuite/distrib.good
deleted file mode 100644
index a6a8426..0000000
--- a/testsuite/distrib.good
+++ /dev/null
@@ -1,29 +0,0 @@
-Path: mailnewsgateway
-From crash@cygnus.com Wed Mar 8 18: 02:42 1995
-From: crash@cygnus.com (Jason Molenda)
-Message-ID: <9503090202.AA06931.alt.buddha.fat.short.guy@phydeaux.cygnus.com>
-Subject: Note for sed testsuite
-Original-To: molenda@msi.umn.edu
-Date: Wed, 8 Mar 1995 18:02:24 -0800 (PST)
-X-Mailer: ELM [version 2.4 PL23]
-Newsgroups: alt.buddha.short.fat.guy
-Distribution: world
-Sender: news@cygnus.com
-Approved: alt.buddha.short.fat.guy@cygnus.com
-
- _Summum Bonum_
-
- All the breath and the bloom of the
- year in the bag of one bee:
- All the wonder and wealth of the mine in
- the heart of one gem:
- In the core of one pearl all the shade and the
- shine of the sea:
- Breath and bloom, shade and shine, -- wonder,
- wealth, and -- how far above them --
- Truth, thats brighter than gem,
- Trust, that's purer than pearl, --
- Brightest truth, purest trust in the universe --
- all were for me
- In the kiss of one girl.
- -- Robert Browning
diff --git a/testsuite/distrib.sed b/testsuite/distrib.sed
deleted file mode 100644
index 918b30f..0000000
--- a/testsuite/distrib.sed
+++ /dev/null
@@ -1,56 +0,0 @@
-# This is straight out of C News
-#
-#
-# All this does is massage the headers so they look like what news
-# software expects. To:, Cc: and Resent-*: headers are masked.
-# Reply-To: is turned into references, which is questionable (could
-# just as well be dropped.
-#
-# The From: line is rewritten to use the "address (comments)" form
-# instead of "phrase <route>" form our mailer uses. Also, addresses
-# with no "@domainname" are assumed to originate locally, and so are
-# given a domain.
-#
-# The Sender: field below reflects the address of the person who
-# maintains our mailing lists. The Approved: field is in a special
-# form, so that we can do bidirectional gatewaying. Any message
-# in a newsgroup that bears this stamp will not be fed into the
-# matching mailing list.
-
-1i\
-Path: mailnewsgateway
- :a
- /^[Rr]eceived:/b r
- /^[Nn]ewsgroups:/b r
- /^[Pp]ath:/b r
- /^[Tt][Oo]:/s/^/Original-/
- /^[Cc][Cc]:/s/^/Original-/
- /^[Rr][Ee][Ss][Ee][Nn][Tt]-.*/s/^/Original-/
- /^[Mm][Ee][Ss][Ss][Aa][Gg][Ee]-[Ii][Dd]:/s/@/.alt.buddha.fat.short.guy@/
- s/^[Ii]n-[Rr]eply-[Tt]o:/References:/
- /^From:/{
- s/<\([^@]*\)>$/<\1@$thissite>/
- s/^From:[ ][ ]*\(.*\) *<\(.*\)>$/From: \2 (\1)/
- }
- s/-[Ii]d:/-ID:/
- s/^[Ss][Uu][Bb][Jj][Ee][Cc][Tt]:[ ]*$/Subject: (none)/
- s/^\([^:]*:\)[ ]*/\1 /
- /^$/{i\
-Newsgroups: alt.buddha.short.fat.guy\
-Distribution: world\
-Sender: news@cygnus.com\
-Approved: alt.buddha.short.fat.guy@cygnus.com
- b e
- }
- p
- n
- b a
- :r
- s/.*//g
- n
- /^[ ]/b r
- b a
- :e
- p
- n
- b e
diff --git a/testsuite/distrib.sh b/testsuite/distrib.sh
index 21e4c08..f02d431 100644
--- a/testsuite/distrib.sh
+++ b/testsuite/distrib.sh
@@ -1,9 +1,29 @@
-#! /bin/sh
-#
-# This is stolen from C News
-#
+#!/bin/sh
+
+# Test runner for the old 'distrib' test
+
+# Copyright (C) 2017-2018 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 <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+fail=0
+
+
+# This is straight out of C News
+#
#
# All this does is massage the headers so they look like what news
# software expects. To:, Cc: and Resent-*: headers are masked.
@@ -20,13 +40,10 @@
# form, so that we can do bidirectional gatewaying. Any message
# in a newsgroup that bears this stamp will not be fed into the
# matching mailing list.
-
-sed=${1-sed}
-
-$sed -n -e "1{i\\
+cat << \EOF > distrib.sed || framework_failure_
+1i\
Path: mailnewsgateway
- }" \
- -e ":a
+ :a
/^[Rr]eceived:/b r
/^[Nn]ewsgroups:/b r
/^[Pp]ath:/b r
@@ -36,16 +53,16 @@ Path: mailnewsgateway
/^[Mm][Ee][Ss][Ss][Aa][Gg][Ee]-[Ii][Dd]:/s/@/.alt.buddha.fat.short.guy@/
s/^[Ii]n-[Rr]eply-[Tt]o:/References:/
/^From:/{
- s/<\([^@]*\)>\$/<\1@$thissite>/
- s/^From:[ ][ ]*\(.*\) *<\(.*\)>\$/From: \2 (\1)/
+ s/<\([^@]*\)>$/<\1@$thissite>/
+ s/^From:[ ][ ]*\(.*\) *<\(.*\)>$/From: \2 (\1)/
}
s/-[Ii]d:/-ID:/
s/^[Ss][Uu][Bb][Jj][Ee][Cc][Tt]:[ ]*$/Subject: (none)/
s/^\([^:]*:\)[ ]*/\1 /
- /^\$/{i\\
-Newsgroups: alt.buddha.short.fat.guy\\
-Distribution: world\\
-Sender: news@cygnus.com\\
+ /^$/{i\
+Newsgroups: alt.buddha.short.fat.guy\
+Distribution: world\
+Sender: news@cygnus.com\
Approved: alt.buddha.short.fat.guy@cygnus.com
b e
}
@@ -60,4 +77,53 @@ Approved: alt.buddha.short.fat.guy@cygnus.com
:e
p
n
- b e"
+ b e
+EOF
+
+
+# The expected output
+cat << \EOF > distrib-exp || framework_failure_
+Path: mailnewsgateway
+From crash@cygnus.com Wed Mar 8 18: 02:42 1995
+From: crash@cygnus.com (Jason Molenda)
+Message-ID: <9503090202.AA06931.alt.buddha.fat.short.guy@phydeaux.cygnus.com>
+Subject: Note for sed testsuite
+Original-To: molenda@msi.umn.edu
+Date: Wed, 8 Mar 1995 18:02:24 -0800 (PST)
+X-Mailer: ELM [version 2.4 PL23]
+Newsgroups: alt.buddha.short.fat.guy
+Distribution: world
+Sender: news@cygnus.com
+Approved: alt.buddha.short.fat.guy@cygnus.com
+
+ _Summum Bonum_
+
+ All the breath and the bloom of the
+ year in the bag of one bee:
+ All the wonder and wealth of the mine in
+ the heart of one gem:
+ In the core of one pearl all the shade and the
+ shine of the sea:
+ Breath and bloom, shade and shine, -- wonder,
+ wealth, and -- how far above them --
+ Truth, thats brighter than gem,
+ Trust, that's purer than pearl, --
+ Brightest truth, purest trust in the universe --
+ all were for me
+ In the kiss of one girl.
+ -- Robert Browning
+EOF
+
+# NOTE:
+# The input has lines wider than 80 characters, and is kept as a separate file.
+
+# location of external test files
+dir="$abs_top_srcdir/testsuite"
+
+
+sed -n -f distrib.sed < "$dir/distrib.inp" > distrib-out || fail=1
+remove_cr_inplace distrib-out
+compare distrib-exp distrib-out || fail=1
+
+
+Exit $fail
diff --git a/testsuite/dollar.good b/testsuite/dollar.good
deleted file mode 100644
index 23e072a..0000000
--- a/testsuite/dollar.good
+++ /dev/null
@@ -1,4 +0,0 @@
-I can't quite remember where I heard it,
-but I can't seem to get out of my head
-the phrase
-space the final frontier
diff --git a/testsuite/dollar.inp b/testsuite/dollar.inp
deleted file mode 100644
index 9267e98..0000000
--- a/testsuite/dollar.inp
+++ /dev/null
@@ -1,4 +0,0 @@
-I can't quite remember where I heard it,
-but I can't seem to get out of my head
-the phrase
-the final frontier
diff --git a/testsuite/dollar.sed b/testsuite/dollar.sed
deleted file mode 100644
index 5fbb35c..0000000
--- a/testsuite/dollar.sed
+++ /dev/null
@@ -1 +0,0 @@
-$s/^/space /
diff --git a/testsuite/empty.good b/testsuite/empty.good
deleted file mode 100644
index 07e1a15..0000000
--- a/testsuite/empty.good
+++ /dev/null
@@ -1,2 +0,0 @@
-x
-
diff --git a/testsuite/empty.inp b/testsuite/empty.inp
deleted file mode 100644
index 07e1a15..0000000
--- a/testsuite/empty.inp
+++ /dev/null
@@ -1,2 +0,0 @@
-x
-
diff --git a/testsuite/empty.sed b/testsuite/empty.sed
deleted file mode 100644
index b35aed6..0000000
--- a/testsuite/empty.sed
+++ /dev/null
@@ -1 +0,0 @@
-s/^ *//
diff --git a/testsuite/enable.good b/testsuite/enable.good
deleted file mode 100644
index c6588ba..0000000
--- a/testsuite/enable.good
+++ /dev/null
@@ -1,3 +0,0 @@
-targets
-x11-testing
-wollybears-in-minnesota
diff --git a/testsuite/enable.inp b/testsuite/enable.inp
deleted file mode 100644
index 4509a8d..0000000
--- a/testsuite/enable.inp
+++ /dev/null
@@ -1,3 +0,0 @@
---enable-targets=sparc-sun-sunos4.1.3,srec
---enable-x11-testing=on
---enable-wollybears-in-minnesota=yes-id-like-that
diff --git a/testsuite/enable.sed b/testsuite/enable.sed
deleted file mode 100644
index 0d2a208..0000000
--- a/testsuite/enable.sed
+++ /dev/null
@@ -1,2 +0,0 @@
-# inspired by an autoconf generated configure script.
-s/-*enable-//;s/=.*//
diff --git a/testsuite/envvar-check b/testsuite/envvar-check
index 4843d64..708013e 100644
--- a/testsuite/envvar-check
+++ b/testsuite/envvar-check
@@ -1,7 +1,7 @@
# -*- sh -*-
# Check environment variables for sane values while testing.
-# Copyright (C) 2000-2017 Free Software Foundation, Inc.
+# Copyright (C) 2000-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
as_unset=unset
diff --git a/testsuite/eval.good b/testsuite/eval.good
deleted file mode 100644
index 4d2a8ff..0000000
--- a/testsuite/eval.good
+++ /dev/null
@@ -1,40 +0,0 @@
-abcd
----
-abcd
----
-abcd
----
-17380: 2 2 5 11 79
-cpu
----
-17380: 2 2 5 11 79
-cpu
----
-17380: 2 2 5 11 79
-cpu
----
- abcd
----
- abcd
----
- abcd
----
-17380: 2 2 5 11 79
- cpu
----
-17380: 2 2 5 11 79
- cpu
----
-17380: 2 2 5 11 79
- cpu
----
-Doing some more tests -----------------------
-17380: 2 2 5 11 79
----
-./sed/sed 1q eval.in2
----
-17380: 2 2 5 11 79
----
-./sed/sed 1q eval.in2
----
-./sed/sed 1q eval.in2
diff --git a/testsuite/eval.inp b/testsuite/eval.inp
deleted file mode 100644
index 6c3df08..0000000
--- a/testsuite/eval.inp
+++ /dev/null
@@ -1,5 +0,0 @@
-17380: 2 2 5 11 79
-abcd
-cpu
- abcd
- cpu
diff --git a/testsuite/eval.sed b/testsuite/eval.sed
deleted file mode 100644
index 1223419..0000000
--- a/testsuite/eval.sed
+++ /dev/null
@@ -1,46 +0,0 @@
-1d
-
- #Try eval command
- /cpu/!b2
- e./sed/sed 1q eval.in2
-
-:2
-p
-i---
-h
-
- #Try eval option
- s,.* *cpu *,./sed/sed 1q eval.in2; echo "&",e
-
-:3
-p
-g
-i---
-
- h
- #Try eval option with print
- s,.* *cpu.*,./sed/sed 1q eval.in2,ep
- g
-
-
-:4
-p
-i---
-
-$!d
-
-#Do some more tests
-s/.*/Doing some more tests -----------------------/p
-s,.*,./sed/sed 1q eval.in2,ep
-i---
-s,.*,./sed/sed 1q eval.in2,pe
-i---
-s,.*,./sed/sed 1q eval.in2,
-h
-e
-p
-g
-i---
-s/^/echo /ep
-i---
-s/^fubar$/echo wozthis/e
diff --git a/testsuite/eval.sh b/testsuite/eval.sh
new file mode 100755
index 0000000..215620c
--- /dev/null
+++ b/testsuite/eval.sh
@@ -0,0 +1,144 @@
+#!/bin/sh
+
+# Test runner for old 'eval' test
+
+# Copyright (C) 2017-2018 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 <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+
+cat << \EOF > eval-in || framework_failure_
+17380: 2 2 5 11 79
+abcd
+cpu
+ abcd
+ cpu
+EOF
+
+# create a copy of the input file.
+# Keep the name 'eval.in2' - it is used in the 'eval' commands in the
+# sed program below.
+cp eval-in eval.in2 || framework_failure_
+
+
+# The sed program - containing multiple 'e' (eval) commands.
+# NOTE: the program executes 'sed' using 'e' commands - and
+# assumes GNU sed is in the $PATH (which is the case here).
+cat << \EOF > eval.sed || framework_failure_
+1d
+
+ #Try eval command
+ /cpu/!b2
+ esed 1q eval.in2
+
+:2
+p
+i---
+h
+
+ #Try eval option
+ s,.* *cpu *,sed 1q eval.in2; echo "&",e
+
+:3
+p
+g
+i---
+
+ h
+ #Try eval option with print
+ s,.* *cpu.*,sed 1q eval.in2,ep
+ g
+
+
+:4
+p
+i---
+
+$!d
+
+#Do some more tests
+s/.*/Doing some more tests -----------------------/p
+s,.*,sed 1q eval.in2,ep
+i---
+s,.*,sed 1q eval.in2,pe
+i---
+s,.*,sed 1q eval.in2,
+h
+e
+p
+g
+i---
+s/^/echo /ep
+i---
+s/^fubar$/echo wozthis/e
+EOF
+
+
+# The expected output file
+cat << \EOF > eval-exp || framework_failure_
+abcd
+---
+abcd
+---
+abcd
+---
+17380: 2 2 5 11 79
+cpu
+---
+17380: 2 2 5 11 79
+cpu
+---
+17380: 2 2 5 11 79
+cpu
+---
+ abcd
+---
+ abcd
+---
+ abcd
+---
+17380: 2 2 5 11 79
+ cpu
+---
+17380: 2 2 5 11 79
+ cpu
+---
+17380: 2 2 5 11 79
+ cpu
+---
+Doing some more tests -----------------------
+17380: 2 2 5 11 79
+---
+sed 1q eval.in2
+---
+17380: 2 2 5 11 79
+---
+sed 1q eval.in2
+---
+sed 1q eval.in2
+EOF
+
+
+
+
+sed -f eval.sed eval-in > eval-out || fail=1
+remove_cr_inplace eval-out
+compare eval-exp eval-out || fail=1
+
+
+Exit $fail
diff --git a/testsuite/execute-tests.sh b/testsuite/execute-tests.sh
index d5f7032..539cecd 100644
--- a/testsuite/execute-tests.sh
+++ b/testsuite/execute-tests.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test execution less-common cases
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/factor.good b/testsuite/factor.good
deleted file mode 100644
index c703182..0000000
--- a/testsuite/factor.good
+++ /dev/null
@@ -1,15 +0,0 @@
-2
-3
-2
-2
-5
-2
-2
-2
-11
-2
-2
-2
-2
-13
-11
diff --git a/testsuite/factor.inp b/testsuite/factor.inp
deleted file mode 100644
index 1c2e796..0000000
--- a/testsuite/factor.inp
+++ /dev/null
@@ -1,8 +0,0 @@
-2
-3
-4
-5
-8
-11
-16
-143
diff --git a/testsuite/factor.sed b/testsuite/factor.sed
deleted file mode 100644
index 4416e35..0000000
--- a/testsuite/factor.sed
+++ /dev/null
@@ -1,76 +0,0 @@
-#! /bin/sed -nf
-
-s/.*/&;9aaaaaaaaa8aaaaaaaa7aaaaaaa6aaaaaa5aaaaa4aaaa3aaa2aa1a0/
-:encode
-s/\(a*\)\([0-9]\)\([0-9]*;.*\2\(a*\)\)/\1\1\1\1\1\1\1\1\1\1\4\3/
-tencode
-s/;.*//
-
-# Compute a few common factors for speed. Clear the subst flag
-t7a
-
-# These are placed here to make the flow harder to understand :-)
-:2
-a\
-2
-b2a
-:3
-a\
-3
-b3a
-:5
-a\
-5
-b5a
-:7
-a\
-7
-
-:7a
-s/^\(aa*\)\1\{6\}$/\1/
-t7
-:5a
-s/^\(aa*\)\1\{4\}$/\1/
-t5
-:3a
-s/^\(aa*\)\1\1$/\1/
-t3
-:2a
-s/^\(aa*\)\1$/\1/
-t2
-
-/^a$/b
-
-# The quotient of dividing by 11 is a limit to the remaining prime factors
-s/^\(aa*\)\1\{10\}/\1=&/
-
-# Pattern space looks like CANDIDATE\nNUMBER. When a candidate is valid,
-# the number is divided and the candidate is tried again
-:factor
-/^\(a\{7,\}\)=\1\1*$/! {
- # Decrement CANDIDATE, and search again if it is still >1
- s/^a//
- /^aa/b factor
-
- # Print the last remaining factor: since it is stored in the NUMBER
- # rather than in the CANDIDATE, swap 'em: now NUMBER=1
- s/\(.*\)=\(.*\)/\2=\1/
-}
-
-# We have a prime factor in CANDIDATE! Print it
-h
-s/=.*/;;0a1aa2aaa3aaaa4aaaaa5aaaaaa6aaaaaaa7aaaaaaaa8aaaaaaaaa9/
-
-:decode
-s/^\(a*\)\1\{9\}\(a\{0,9\}\)\([0-9]*;.*[^a]\2\([0-9]\)\)/\1\4\3/
-/^a/tdecode
-s/;.*//p
-
-g
-:divide
-s/^\(a*\)\(=b*\)\1/\1\2b/
-tdivide
-y/b/a/
-
-# If NUMBER = 1, we don't have any more factors
-/aa$/bfactor
diff --git a/testsuite/fasts.good b/testsuite/fasts.good
deleted file mode 100644
index d1c7e4a..0000000
--- a/testsuite/fasts.good
+++ /dev/null
@@ -1,14 +0,0 @@
-aaaaaabbbbbbaaaaaaa
-bbbbbb
-aaaaaabbbbbbaaaaaaa
-aaaaaabbbbbbaaaaaaa
-aaaaaaabbbbbbaaaaaaa
-aaaaaabbbbbbaaaaaaa
-aaaaaaabbbbbbaaaaaa
-bbbbbbbbbbbbbbbbbbb
-
-bbbbbbbbbbbbbbbbbbb
-bbbbbbbbbbbbbbbbbbb
-bbbbbbbbbbbbbbbbbbb
-bbbbbbbbbbbbbbbbbbb
-bbbbbbbbbbbbbbbbbbbb
diff --git a/testsuite/fasts.inp b/testsuite/fasts.inp
deleted file mode 100644
index 361e17b..0000000
--- a/testsuite/fasts.inp
+++ /dev/null
@@ -1 +0,0 @@
-aaaaaaabbbbbbaaaaaaa
diff --git a/testsuite/fasts.sed b/testsuite/fasts.sed
deleted file mode 100644
index fb5161b..0000000
--- a/testsuite/fasts.sed
+++ /dev/null
@@ -1,43 +0,0 @@
-# test `fast' substitutions
-
-h
-s/a//
-p
-g
-s/a//g
-p
-g
-s/^a//p
-g
-s/^a//g
-p
-g
-s/not present//g
-p
-g
-s/^[a-z]//g
-p
-g
-s/a$//
-p
-g
-
-y/a/b/
-h
-s/b//
-p
-g
-s/b//g
-p
-g
-s/^b//p
-g
-s/^b//g
-p
-g
-s/^[a-z]//g
-p
-g
-s/b$//
-p
-g
diff --git a/testsuite/flipcase.good b/testsuite/flipcase.good
deleted file mode 100644
index 9fcffa2..0000000
--- a/testsuite/flipcase.good
+++ /dev/null
@@ -1,25 +0,0 @@
-09 - 02 - 2002 00.00 Tg La7 La7 -
-09 - 02 - 2002 00.00 Brand New Tmc 2 -
-09 - 02 - 2002 00.10 Tg1 Notte Rai Uno -
-09 - 02 - 2002 00.15 Tg Parlamento Rai Due -
-09 - 02 - 2002 00.15 Kung Fu - La Leggenda Continua La7 -
-09 - 02 - 2002 00.20 Berserk - La Confessione Di Gatz Italia 1 Cartoon
-09 - 02 - 2002 00.20 Tg3 - Tg3 Meteo Rai Tre -
-09 - 02 - 2002 00.25 Meteo 2 Rai Due -
-09 - 02 - 2002 00.30 Appuntamento Al Cinema Rai Due -
-09 - 02 - 2002 00.30 Rai Educational - Mediamente Rai Tre -
-09 - 02 - 2002 00.35 Profiler Rai Due -
-09 - 02 - 2002 00.35 Stampa Oggi - Che Tempo Fa Rai Uno -
-09 - 02 - 2002 00.45 Rai Educational - Babele: Euro Rai Uno -
-09 - 02 - 2002 00.45 Bollettino Della Neve Rete 4 News
-09 - 02 - 2002 00.50 Studio Aperto - La Giornata Italia 1 News
-09 - 02 - 2002 00.50 Bocca A Bocca - 2 Tempo Rete 4 Film
-09 - 02 - 2002 01.00 Appuntamento Al Cinema Rai Tre -
-09 - 02 - 2002 01.00 Music Non Stop Tmc 2 -
-09 - 02 - 2002 01.00 Studio Sport Italia 1 Sport
-09 - 02 - 2002 01.00 Tg 5 - Notte Canale 5 News
-09 - 02 - 2002 01.05 Fuori Orario. Cose (Mai) Viste Rai Tre -
-09 - 02 - 2002 01.15 Rainotte Rai Due -
-09 - 02 - 2002 01.15 Sottovoce Rai Uno -
-09 - 02 - 2002 01.15 Giochi Olimpici Invernali - Cerimonia Di Apertura Rai Tre -
-09 - 02 - 2002 01.17 Italia Interroga Rai Due -
diff --git a/testsuite/flipcase.inp b/testsuite/flipcase.inp
deleted file mode 100644
index f91ec11..0000000
--- a/testsuite/flipcase.inp
+++ /dev/null
@@ -1,25 +0,0 @@
-09 - 02 - 2002 00.00 Tg La7 La7 -
-09 - 02 - 2002 00.00 Brand New Tmc 2 -
-09 - 02 - 2002 00.10 Tg1 Notte Rai Uno -
-09 - 02 - 2002 00.15 Tg Parlamento Rai Due -
-09 - 02 - 2002 00.15 Kung Fu - La Leggenda Continua La7 -
-09 - 02 - 2002 00.20 Berserk - La CoNFESSIONE Di Gatz Italia 1 Cartoon
-09 - 02 - 2002 00.20 Tg3 - Tg3 Meteo Rai TrE -
-09 - 02 - 2002 00.25 Meteo 2 Rai Due -
-09 - 02 - 2002 00.30 Appuntamento Al CinEMA RaI Due -
-09 - 02 - 2002 00.30 Rai Educational - Mediamente Rai Tre -
-09 - 02 - 2002 00.35 Profiler Rai Due -
-09 - 02 - 2002 00.35 Stampa OggI - Che Tempo Fa Rai Uno -
-09 - 02 - 2002 00.45 Rai Educational - Babele: Euro Rai Uno -
-09 - 02 - 2002 00.45 BollettINO Della NEVE RETE 4 News
-09 - 02 - 2002 00.50 STUDIO Aperto - La Giornata Italia 1 News
-09 - 02 - 2002 00.50 BOCCA A Bocca - 2 Tempo Rete 4 Film
-09 - 02 - 2002 01.00 AppuntAMENTO Al Cinema Rai Tre -
-09 - 02 - 2002 01.00 Music NoN Stop Tmc 2 -
-09 - 02 - 2002 01.00 Studio SpORT Italia 1 SporT
-09 - 02 - 2002 01.00 Tg 5 - Notte Canale 5 News
-09 - 02 - 2002 01.05 Fuori Orario. CosE (Mai) Viste Rai Tre -
-09 - 02 - 2002 01.15 RAINOTTE Rai Due -
-09 - 02 - 2002 01.15 Sottovoce Rai Uno -
-09 - 02 - 2002 01.15 GiOCHI Olimpici InVERNALI - CERIMONIA Di Apertura Rai Tre -
-09 - 02 - 2002 01.17 Italia Interroga Rai Due -
diff --git a/testsuite/flipcase.sed b/testsuite/flipcase.sed
deleted file mode 100644
index 7e8edc6..0000000
--- a/testsuite/flipcase.sed
+++ /dev/null
@@ -1 +0,0 @@
-s,\([^A-Za-z]*\)\([A-Za-z]*\),\1\L\u\2,g
diff --git a/testsuite/follow-symlinks-stdin.sh b/testsuite/follow-symlinks-stdin.sh
index 000be6c..12ba236 100755
--- a/testsuite/follow-symlinks-stdin.sh
+++ b/testsuite/follow-symlinks-stdin.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Verify that --follow-symlinks does not break reading from stdin.
-# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+# Copyright (C) 2015-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/follow-symlinks.sh b/testsuite/follow-symlinks.sh
index 5586eef..3ccc48c 100644
--- a/testsuite/follow-symlinks.sh
+++ b/testsuite/follow-symlinks.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test --follow-symlinks option
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/get-mb-cur-max.c b/testsuite/get-mb-cur-max.c
index 6be5137..e2abe94 100644
--- a/testsuite/get-mb-cur-max.c
+++ b/testsuite/get-mb-cur-max.c
@@ -1,5 +1,5 @@
/* Auxiliary program to detect support for a locale.
- Copyright 2010-2017 Free Software Foundation, Inc.
+ Copyright 2010-2018 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/testsuite/head.good b/testsuite/head.good
deleted file mode 100644
index 6392831..0000000
--- a/testsuite/head.good
+++ /dev/null
@@ -1,3 +0,0 @@
- "...by imposing a tiny bit of order in a communication you are
- translating, you are carving out a little bit of order in the
- universe. You will never succeed. Everything will fail and come
diff --git a/testsuite/head.inp b/testsuite/head.inp
deleted file mode 100644
index 5c4b4a4..0000000
--- a/testsuite/head.inp
+++ /dev/null
@@ -1,9 +0,0 @@
- "...by imposing a tiny bit of order in a communication you are
- translating, you are carving out a little bit of order in the
- universe. You will never succeed. Everything will fail and come
- to an end finally. But you have a chance to carve a little bit
- of order and maybe even beauty out of the raw materials that
- surround you everywhere, and I think there is no greater meaning
- in life."
-
- Donald L. Philippi, Oct 1930 - Jan 1993
diff --git a/testsuite/head.sed b/testsuite/head.sed
deleted file mode 100644
index d8ea37d..0000000
--- a/testsuite/head.sed
+++ /dev/null
@@ -1 +0,0 @@
-3q
diff --git a/testsuite/help-version.sh b/testsuite/help-version.sh
index a0896ef..d053cf1 100755
--- a/testsuite/help-version.sh
+++ b/testsuite/help-version.sh
@@ -2,7 +2,7 @@
# Make sure all of these programs work properly
# when invoked with --help or --version.
-# Copyright (C) 2000-2017 Free Software Foundation, Inc.
+# Copyright (C) 2000-2018 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
@@ -15,7 +15,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Ensure that $SHELL is set to *some* value and exported.
# This is required for dircolors, which would fail e.g., when
diff --git a/testsuite/help.sh b/testsuite/help.sh
new file mode 100644
index 0000000..68cf2a7
--- /dev/null
+++ b/testsuite/help.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+# Test --help screen
+
+# Copyright (C) 2017-2018 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 <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+
+# Help screen should include the contact email address
+sed --help | grep E-mail > /dev/null 2>&1 || fail=1
+
+
+# With explicit --help - show usage then email at the bottom.
+# With missing parameters - show the usage without the email.
+# Ensure these are identical (except for the email).
+sed --help \
+ | sed '1s/ [^ ]* / sed /; /^E-mail/,$d' > help-out1
+
+sed 2>&1 \
+ | sed '1s/ [^ ]* / sed /' > help-out2
+
+compare help-out1 help-out2 || fail=1
+
+
+Exit $fail
diff --git a/testsuite/in-place-hyphen.sh b/testsuite/in-place-hyphen.sh
index c4dd8f9..09ef966 100755
--- a/testsuite/in-place-hyphen.sh
+++ b/testsuite/in-place-hyphen.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Verify that "-" is treated as a file name with --in-place.
-# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+# Copyright (C) 2015-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/in-place-suffix-backup.sh b/testsuite/in-place-suffix-backup.sh
index 1d239b4..bc7defc 100644
--- a/testsuite/in-place-suffix-backup.sh
+++ b/testsuite/in-place-suffix-backup.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test -i/--inplace with backup suffixes
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/inclib.good b/testsuite/inclib.good
deleted file mode 100644
index cb04b39..0000000
--- a/testsuite/inclib.good
+++ /dev/null
@@ -1,34 +0,0 @@
- /usr/X11R6/include
- /usr/X11R5/include
- /usr/X11R4/include
-
- /usr/include/X11R6
- /usr/include/X11R5
- /usr/include/X11R4
-
- /usr/local/X11R6/include
- /usr/local/X11R5/include
- /usr/local/X11R4/include
-
- /usr/local/include/X11R6
- /usr/local/include/X11R5
- /usr/local/include/X11R4
-
- /usr/X11/include
- /usr/include/X11
- /usr/local/X11/include
- /usr/local/include/X11
-
- /usr/X386/include
- /usr/x386/include
- /usr/XFree86/include/X11
-
- /usr/include
- /usr/local/include
- /usr/unsupported/include
- /usr/athena/include
- /usr/local/x11r5/include
- /usr/lpp/Xamples/include
-
- /usr/openwin/include
- /usr/openwin/share/include
diff --git a/testsuite/inclib.inp b/testsuite/inclib.inp
deleted file mode 100644
index 1f71277..0000000
--- a/testsuite/inclib.inp
+++ /dev/null
@@ -1,34 +0,0 @@
- /usr/X11R6/lib
- /usr/X11R5/lib
- /usr/X11R4/lib
-
- /usr/lib/X11R6
- /usr/lib/X11R5
- /usr/lib/X11R4
-
- /usr/local/X11R6/lib
- /usr/local/X11R5/lib
- /usr/local/X11R4/lib
-
- /usr/local/lib/X11R6
- /usr/local/lib/X11R5
- /usr/local/lib/X11R4
-
- /usr/X11/lib
- /usr/lib/X11
- /usr/local/X11/lib
- /usr/local/lib/X11
-
- /usr/X386/lib
- /usr/x386/lib
- /usr/XFree86/lib/X11
-
- /usr/lib
- /usr/local/lib
- /usr/unsupported/lib
- /usr/athena/lib
- /usr/local/x11r5/lib
- /usr/lpp/Xamples/lib
-
- /usr/openwin/lib
- /usr/openwin/share/lib
diff --git a/testsuite/inclib.sed b/testsuite/inclib.sed
deleted file mode 100644
index 528f158..0000000
--- a/testsuite/inclib.sed
+++ /dev/null
@@ -1,2 +0,0 @@
-# inspired by an autoconf generated configure script.
-s;lib;include;
diff --git a/testsuite/init.sh b/testsuite/init.sh
index 584194f..93d14f5 100644
--- a/testsuite/init.sh
+++ b/testsuite/init.sh
@@ -1,6 +1,6 @@
# source this file; set up for tests
-# Copyright (C) 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2009-2018 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
@@ -13,7 +13,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Using this file in a test
# =========================
@@ -62,6 +62,19 @@
ME_=`expr "./$0" : '.*/\(.*\)$'`
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+ # contains only /bin. Note that ksh looks also at the FPATH variable,
+ # so we have to set that as well for the test.
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+ || PATH_SEPARATOR=';'
+ }
+fi
+
# We use a trap below for cleanup. This requires us to go through
# hoops to get the right exit status transported through the handler.
# So use 'Exit STATUS' instead of 'exit STATUS' inside of the tests.
@@ -250,7 +263,7 @@ test -n "$BASH_VERSION" && unalias -a
# That is part of the shell-selection test above. Why use aliases rather
# than functions? Because support for hyphen-containing aliases is more
# widespread than that for hyphen-containing function names.
-test -n "$EXEEXT" && shopt -s expand_aliases
+test -n "$EXEEXT" && test -n "$BASH_VERSION" && shopt -s expand_aliases
# Enable glibc's malloc-perturbing option.
# This is useful for exposing code that depends on the fact that
@@ -429,13 +442,13 @@ path_prepend_ ()
path_dir_=$1
case $path_dir_ in
'') fail_ "invalid path dir: '$1'";;
- /*) abs_path_dir_=$path_dir_;;
+ /* | ?:*) abs_path_dir_=$path_dir_;;
*) abs_path_dir_=$initial_cwd_/$path_dir_;;
esac
case $abs_path_dir_ in
- *:*) fail_ "invalid path dir: '$abs_path_dir_'";;
+ *$PATH_SEPARATOR*) fail_ "invalid path dir: '$abs_path_dir_'";;
esac
- PATH="$abs_path_dir_:$PATH"
+ PATH="$abs_path_dir_$PATH_SEPARATOR$PATH"
# Create an alias, FOO, for each FOO.exe in this directory.
create_exe_shims_ "$abs_path_dir_" \
@@ -514,7 +527,7 @@ rand_bytes_ ()
fi
n_plus_50_=`expr $n_ + 50`
- cmds_='date; date +%N; free; who -a; w; ps auxww; ps ef; netstat -n'
+ cmds_='date; date +%N; free; who -a; w; ps auxww; ps -ef'
data_=` (eval "$cmds_") 2>&1 | gzip `
# Ensure that $data_ has length at least 50+$n_
diff --git a/testsuite/inplace-hold.sh b/testsuite/inplace-hold.sh
new file mode 100644
index 0000000..8ca9cac
--- /dev/null
+++ b/testsuite/inplace-hold.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+# Test runner for old 'inplace-hold' test
+
+# Copyright (C) 2017-2018 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 <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+echo > inplace-hold-exp || framework_failure_
+
+echo x > inplace-hold-out1 || framework_failure_
+echo y > inplace-hold-out2 || framework_failure_
+
+sed -i x inplace-hold-out1 inplace-hold-out2 || fail=1
+
+compare inplace-hold-exp inplace-hold-out1 || fail=1
+compare inplace-hold-exp inplace-hold-out2 || fail=1
+
+Exit $fail
diff --git a/testsuite/inplace-selinux.sh b/testsuite/inplace-selinux.sh
new file mode 100755
index 0000000..47383a9
--- /dev/null
+++ b/testsuite/inplace-selinux.sh
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+# Copyright (C) 2017-2018 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 <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+require_selinux_
+
+fail=0
+
+touch a || framework_failure_
+chcon -u system_u a || skip_ "chcon doesn't work"
+chcon -u user_u a || skip_ "chcon doesn't work"
+
+# Create the first file and symlink pointing at it.
+echo "Hello World" > inplace-selinux-file || framework_failure_
+ln -s ./inplace-selinux-file inplace-selinux-link || framework_failure_
+
+chcon -h -u system_u inplace-selinux-file || framework_failure_
+chcon -h -u user_u inplace-selinux-link || framework_failure_
+
+
+# Create the second file and symlink pointing at it.
+# These will be used with the --follow-symlink option.
+echo "Hello World" > inplace-selinux-file2 || framework_failure_
+ln -s ./inplace-selinux-file2 inplace-selinux-link2 || framework_failure_
+
+chcon -h -u system_u inplace-selinux-file2 || framework_failure_
+chcon -h -u user_u inplace-selinux-link2 || framework_failure_
+
+# Modify prepared files inplace via the symlinks
+sed -i -e "s~Hello~Hi~" inplace-selinux-link || fail=1
+sed -i --follow-symlinks -e "s~Hello~Hi~" inplace-selinux-link2 || fail=1
+
+# Check selinux context - the first file should be created with the context
+# of the symlink...
+ls -Z inplace-selinux-link | grep user_u: || fail=1
+# ...the second file should use the context of the file itself.
+ls -Z inplace-selinux-file2 | grep system_u: || fail=1
+
+Exit $fail
diff --git a/testsuite/insens.good b/testsuite/insens.good
deleted file mode 100644
index 6fd1bc1..0000000
--- a/testsuite/insens.good
+++ /dev/null
@@ -1,2 +0,0 @@
-1.2.3
-1.2.3
diff --git a/testsuite/insens.inp b/testsuite/insens.inp
deleted file mode 100644
index baefc12..0000000
--- a/testsuite/insens.inp
+++ /dev/null
@@ -1 +0,0 @@
-Version: 1.2.3
diff --git a/testsuite/insens.sed b/testsuite/insens.sed
deleted file mode 100644
index afab9fa..0000000
--- a/testsuite/insens.sed
+++ /dev/null
@@ -1,4 +0,0 @@
-h
-s/Version: *//p
-g
-s/version: *//Ip
diff --git a/testsuite/insert.good b/testsuite/insert.good
deleted file mode 100644
index 5b6d250..0000000
--- a/testsuite/insert.good
+++ /dev/null
@@ -1,3 +0,0 @@
-bar
-
-foo
diff --git a/testsuite/insert.inp b/testsuite/insert.inp
deleted file mode 100644
index 1289765..0000000
--- a/testsuite/insert.inp
+++ /dev/null
@@ -1,2 +0,0 @@
-bar
-foo
diff --git a/testsuite/insert.sed b/testsuite/insert.sed
deleted file mode 100644
index 5f7e611..0000000
--- a/testsuite/insert.sed
+++ /dev/null
@@ -1 +0,0 @@
-/foo/i\
diff --git a/testsuite/invalid-mb-seq-UMR.sh b/testsuite/invalid-mb-seq-UMR.sh
index 1602023..196db65 100755
--- a/testsuite/invalid-mb-seq-UMR.sh
+++ b/testsuite/invalid-mb-seq-UMR.sh
@@ -2,7 +2,7 @@
# Inserting an invalid multibyte sequence could lead to
# reading uninitialized memory.
-# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+# Copyright (C) 2015-2018 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
@@ -15,7 +15,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/khadafy.good b/testsuite/khadafy.good
deleted file mode 100644
index 57e21a1..0000000
--- a/testsuite/khadafy.good
+++ /dev/null
@@ -1,32 +0,0 @@
-1) Muammar Qaddafi
-2) Mo'ammar Gadhafi
-3) Muammar Kaddafi
-4) Muammar Qadhafi
-5) Moammar El Kadhafi
-6) Muammar Gadafi
-7) Mu'ammar al-Qadafi
-8) Moamer El Kazzafi
-9) Moamar al-Gaddafi
-10) Mu'ammar Al Qathafi
-11) Muammar Al Qathafi
-12) Mo'ammar el-Gadhafi
-13) Moamar El Kadhafi
-14) Muammar al-Qadhafi
-15) Mu'ammar al-Qadhdhafi
-16) Mu'ammar Qadafi
-17) Moamar Gaddafi
-18) Mu'ammar Qadhdhafi
-19) Muammar Khaddafi
-20) Muammar al-Khaddafi
-21) Mu'amar al-Kadafi
-22) Muammar Ghaddafy
-23) Muammar Ghadafi
-24) Muammar Ghaddafi
-25) Muamar Kaddafi
-26) Muammar Quathafi
-27) Muammar Gheddafi
-28) Muamar Al-Kaddafi
-29) Moammar Khadafy
-30) Moammar Qudhafi
-31) Mu'ammar al-Qaddafi
-32) Mulazim Awwal Mu'ammar Muhammad Abu Minyar al-Qadhafi
diff --git a/testsuite/khadafy.inp b/testsuite/khadafy.inp
deleted file mode 100644
index 57e21a1..0000000
--- a/testsuite/khadafy.inp
+++ /dev/null
@@ -1,32 +0,0 @@
-1) Muammar Qaddafi
-2) Mo'ammar Gadhafi
-3) Muammar Kaddafi
-4) Muammar Qadhafi
-5) Moammar El Kadhafi
-6) Muammar Gadafi
-7) Mu'ammar al-Qadafi
-8) Moamer El Kazzafi
-9) Moamar al-Gaddafi
-10) Mu'ammar Al Qathafi
-11) Muammar Al Qathafi
-12) Mo'ammar el-Gadhafi
-13) Moamar El Kadhafi
-14) Muammar al-Qadhafi
-15) Mu'ammar al-Qadhdhafi
-16) Mu'ammar Qadafi
-17) Moamar Gaddafi
-18) Mu'ammar Qadhdhafi
-19) Muammar Khaddafi
-20) Muammar al-Khaddafi
-21) Mu'amar al-Kadafi
-22) Muammar Ghaddafy
-23) Muammar Ghadafi
-24) Muammar Ghaddafi
-25) Muamar Kaddafi
-26) Muammar Quathafi
-27) Muammar Gheddafi
-28) Muamar Al-Kaddafi
-29) Moammar Khadafy
-30) Moammar Qudhafi
-31) Mu'ammar al-Qaddafi
-32) Mulazim Awwal Mu'ammar Muhammad Abu Minyar al-Qadhafi
diff --git a/testsuite/khadafy.sed b/testsuite/khadafy.sed
deleted file mode 100644
index 8ac81c0..0000000
--- a/testsuite/khadafy.sed
+++ /dev/null
@@ -1,2 +0,0 @@
-# The Khadafy test is brought to you by Scott Anderson . . .
-/M[ou]'\{0,1\}am\{1,2\}[ae]r .*\([AEae]l[- ]\)\{0,1\}[GKQ]h\{0,1\}[aeu]\{1,\}\([dtz][dhz]\{0,1\}\)\{1,\}af[iy]/!d
diff --git a/testsuite/linecnt.good b/testsuite/linecnt.good
deleted file mode 100644
index 0488b62..0000000
--- a/testsuite/linecnt.good
+++ /dev/null
@@ -1,110 +0,0 @@
-1
-A dialogue on poverty
-2
-
-3
- On the night when the rain beats,
-4
- Driven by the wind,
-5
- On the night when the snowflakes mingle
-6
- With a sleety rain,
-7
- I feel so helplessly cold.
-8
- I nibble at a lump of salt,
-9
- Sip the hot, oft-diluted dregs of _sake_;
-10
- And coughing, snuffling,
-11
- And stroking my scanty beard,
-12
- I say in my pride,
-13
- "There's none worthy, save I!"
-14
- But I shiver still with cold.
-15
- I pull up my hempen bedclothes,
-16
- Wear what few sleeveless clothes I have,
-17
- But cold and bitter is the night!
-18
- As for those poorer than myself,
-19
- Their parents must be cold and hungry,
-20
- Their wives and children beg and cry.
-21
- Then, how do you struggle through life?
-22
-
-23
- Wide as they call the heaven and earth,
-24
- For me they have shrunk quite small;
-25
- Bright though they call the sun and moon,
-26
- They never shine for me.
-27
- Is it the same with all men,
-28
- Or for me alone?
-29
- By rare chance I was born a man
-30
- And no meaner than my fellows,
-31
- But, wearing unwadded sleeveless clothes
-32
- In tatters, like weeds waving in the sea,
-33
- Hanging from my shoulders,
-34
- And under the sunken roof,
-35
- Within the leaning walls,
-36
- Here I lie on straw
-37
- Spread on bare earth,
-38
- With my parents at my pillow,
-39
- And my wife and children at my feet,
-40
- All huddled in grief and tears.
-41
- No fire sends up smoke
-42
- At the cooking-place,
-43
- And in the cauldron
-44
- A spider spins its web.
-45
- With not a grain to cook,
-46
- We moan like the night thrush.
-47
- Then, "to cut," as the saying is,
-48
- "The ends of what is already too short,"
-49
- The village headman comes,
-50
- With rod in hand, to our sleeping place,
-51
- Growling for his dues.
-52
- Must it be so hopeless --
-53
- The way of this world?
-54
-
-55
- -- Yamanoue Okura
diff --git a/testsuite/linecnt.inp b/testsuite/linecnt.inp
deleted file mode 100644
index a34df29..0000000
--- a/testsuite/linecnt.inp
+++ /dev/null
@@ -1,55 +0,0 @@
-A dialogue on poverty
-
- On the night when the rain beats,
- Driven by the wind,
- On the night when the snowflakes mingle
- With a sleety rain,
- I feel so helplessly cold.
- I nibble at a lump of salt,
- Sip the hot, oft-diluted dregs of _sake_;
- And coughing, snuffling,
- And stroking my scanty beard,
- I say in my pride,
- "There's none worthy, save I!"
- But I shiver still with cold.
- I pull up my hempen bedclothes,
- Wear what few sleeveless clothes I have,
- But cold and bitter is the night!
- As for those poorer than myself,
- Their parents must be cold and hungry,
- Their wives and children beg and cry.
- Then, how do you struggle through life?
-
- Wide as they call the heaven and earth,
- For me they have shrunk quite small;
- Bright though they call the sun and moon,
- They never shine for me.
- Is it the same with all men,
- Or for me alone?
- By rare chance I was born a man
- And no meaner than my fellows,
- But, wearing unwadded sleeveless clothes
- In tatters, like weeds waving in the sea,
- Hanging from my shoulders,
- And under the sunken roof,
- Within the leaning walls,
- Here I lie on straw
- Spread on bare earth,
- With my parents at my pillow,
- And my wife and children at my feet,
- All huddled in grief and tears.
- No fire sends up smoke
- At the cooking-place,
- And in the cauldron
- A spider spins its web.
- With not a grain to cook,
- We moan like the night thrush.
- Then, "to cut," as the saying is,
- "The ends of what is already too short,"
- The village headman comes,
- With rod in hand, to our sleeping place,
- Growling for his dues.
- Must it be so hopeless --
- The way of this world?
-
- -- Yamanoue Okura
diff --git a/testsuite/linecnt.sed b/testsuite/linecnt.sed
deleted file mode 100644
index 3134d36..0000000
--- a/testsuite/linecnt.sed
+++ /dev/null
@@ -1 +0,0 @@
-=
diff --git a/testsuite/local.mk b/testsuite/local.mk
index 2c8c718..b4a4f5a 100644
--- a/testsuite/local.mk
+++ b/testsuite/local.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -11,17 +11,38 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
-CLEANFILES += tmp* core *.core $(EXTRA_PROGRAMS) *.*out *.log eval.in2
+CLEANFILES += tmp* core *.core $(EXTRA_PROGRAMS) *.*out *.log
+
+TEST_EXTENSIONS = .sh .pl
+
+if HAVE_PERL
+TESTSUITE_PERL = $(PERL)
+else
+TESTSUITE_PERL = $(SHELL) $(srcdir)/no-perl
+endif
+
+# Options passed to the perl invocations running the perl test scripts.
+TESTSUITE_PERL_OPTIONS = -w -I$(srcdir)/testsuite -MCuSkip -MCoreutils
+# '$f' is set by the Automake-generated test harness to the path of the
+# current test script stripped of VPATH components, and is used by the
+# CuTmpdir module to determine the name of the temporary files to be
+# used. Note that $f is a shell variable, not a make macro, so the use
+# of '$$f' below is correct, and not a typo.
+TESTSUITE_PERL_OPTIONS += -M"CuTmpdir qw($$f)"
-TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL)
+PL_LOG_COMPILER = $(TESTSUITE_PERL) $(TESTSUITE_PERL_OPTIONS)
+
+# Ensure that anything not covered by the above evokes failure.
+LOG_COMPILER = false
# Put new, init.sh-using tests here, so that each name
# is listed in only one place.
T = \
+ testsuite/misc.pl \
testsuite/cmd-l.sh \
testsuite/cmd-R.sh \
testsuite/colon-with-no-label.sh \
@@ -29,10 +50,12 @@ T = \
testsuite/compile-errors.sh \
testsuite/compile-tests.sh \
testsuite/convert-number.sh \
+ testsuite/command-endings.sh \
testsuite/execute-tests.sh \
testsuite/help-version.sh \
testsuite/in-place-hyphen.sh \
testsuite/in-place-suffix-backup.sh \
+ testsuite/inplace-selinux.sh \
testsuite/invalid-mb-seq-UMR.sh \
testsuite/mb-bad-delim.sh \
testsuite/mb-charclass-non-utf8.sh \
@@ -45,11 +68,13 @@ T = \
testsuite/posix-char-class.sh \
testsuite/posix-mode-addr.sh \
testsuite/posix-mode-bad-ref.sh \
+ testsuite/posix-mode-ERE.sh \
testsuite/posix-mode-s.sh \
testsuite/posix-mode-N.sh \
testsuite/range-overlap.sh \
testsuite/recursive-escape-c.sh \
testsuite/regex-errors.sh \
+ testsuite/regex-max-int.sh \
testsuite/sandbox.sh \
testsuite/stdin-prog.sh \
testsuite/subst-options.sh \
@@ -64,9 +89,26 @@ T += testsuite/follow-symlinks.sh \
testsuite/follow-symlinks-stdin.sh
endif
-
-
-TESTS = $(check_PROGRAMS) $(SEDTESTS) $(T)
+# Old tests converted to newer init.sh style
+T += testsuite/8bit.sh \
+ testsuite/8to7.sh \
+ testsuite/badenc.sh \
+ testsuite/binary.sh \
+ testsuite/bsd-wrapper.sh \
+ testsuite/dc.sh \
+ testsuite/distrib.sh \
+ testsuite/eval.sh \
+ testsuite/help.sh \
+ testsuite/inplace-hold.sh \
+ testsuite/mac-mf.sh \
+ testsuite/madding.sh \
+ testsuite/newjis.sh \
+ testsuite/stdin.sh \
+ testsuite/utf8-ru.sh \
+ testsuite/uniq.sh \
+ testsuite/xemacs.sh
+
+TESTS = $(SEDTESTS) $(T)
SEDTESTS =
@@ -76,42 +118,6 @@ check_PROGRAMS = testsuite/get-mb-cur-max testsuite/test-mbrtowc
testsuite_get_mb_cur_max_LDADD = lib/libsed.a $(INTLLIBS)
testsuite_test_mbrtowc_LDADD = lib/libsed.a $(INTLLIBS)
-if TEST_REGEX
-check_PROGRAMS += testsuite/bug-regex7 \
- testsuite/bug-regex8 testsuite/bug-regex9 testsuite/bug-regex10 \
- testsuite/bug-regex11 testsuite/bug-regex12 testsuite/bug-regex13 \
- testsuite/bug-regex14 testsuite/bug-regex15 testsuite/bug-regex16 \
- testsuite/bug-regex21 testsuite/bug-regex27 testsuite/bug-regex28 \
- testsuite/tst-pcre testsuite/tst-boost testsuite/runtests \
- testsuite/runptests testsuite/tst-rxspencer testsuite/tst-regex2
-
-SEDTESTS += space
-endif
-
-SEDTESTS += testsuite/appquit testsuite/enable testsuite/sep \
- testsuite/inclib testsuite/8bit testsuite/newjis \
- testsuite/xabcx testsuite/dollar testsuite/noeol \
- testsuite/noeolw testsuite/modulo testsuite/numsub \
- testsuite/numsub2 testsuite/numsub3 testsuite/numsub4 \
- testsuite/numsub5 testsuite/0range testsuite/bkslashes \
- testsuite/head testsuite/madding testsuite/mac-mf \
- testsuite/empty testsuite/xbxcx testsuite/xbxcx3 \
- testsuite/recall testsuite/recall2 testsuite/xemacs \
- testsuite/fasts testsuite/uniq testsuite/manis \
- testsuite/khadafy testsuite/linecnt testsuite/eval \
- testsuite/distrib testsuite/8to7 testsuite/y-bracket \
- testsuite/y-newline testsuite/y-zero testsuite/allsub \
- testsuite/cv-vars testsuite/classes testsuite/middle \
- testsuite/bsd testsuite/stdin testsuite/flipcase \
- testsuite/insens testsuite/subwrite testsuite/writeout \
- testsuite/readin testsuite/insert testsuite/utf8-1 \
- testsuite/utf8-2 testsuite/utf8-3 testsuite/utf8-4 \
- testsuite/badenc testsuite/inplace-hold testsuite/brackets \
- testsuite/amp-escape testsuite/help testsuite/file \
- testsuite/quiet testsuite/factor testsuite/binary3 \
- testsuite/binary2 testsuite/binary testsuite/dc \
- testsuite/newline-anchor testsuite/zero-anchor
-
# Note that the first lines are statements. They ensure that environment
# variables that can perturb tests are unset or set to expected values.
# The rest are envvar settings that propagate build-related Makefile
@@ -159,210 +165,38 @@ TESTS_ENVIRONMENT = \
PACKAGE_VERSION=$(PACKAGE_VERSION) \
PERL='$(PERL)' \
SHELL='$(SHELL)' \
- PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH" \
+ PATH='$(abs_top_builddir)/sed$(PATH_SEPARATOR)'"$$PATH" \
$(LOCALCHARSET_TESTS_ENVIRONMENT) \
; 9>&2
-LOG_COMPILER = $(top_srcdir)/testsuite/runtest
-
-
EXTRA_DIST += \
$(T) \
+ testsuite/Coreutils.pm \
+ testsuite/CuSkip.pm \
+ testsuite/CuTmpdir.pm \
testsuite/init.sh init.cfg \
testsuite/envvar-check \
testsuite/PCRE.tests testsuite/BOOST.tests testsuite/SPENCER.tests \
- testsuite/runtest testsuite/Makefile.tests \
- testsuite/0range.good \
- testsuite/0range.inp \
- testsuite/0range.sed \
testsuite/8bit.good \
testsuite/8bit.inp \
- testsuite/8bit.sed \
- testsuite/8to7.good \
- testsuite/8to7.inp \
- testsuite/8to7.sed \
- testsuite/allsub.good \
- testsuite/allsub.inp \
- testsuite/allsub.sed \
- testsuite/amp-escape.good \
- testsuite/amp-escape.inp \
- testsuite/amp-escape.sed \
- testsuite/appquit.good \
- testsuite/appquit.inp \
- testsuite/appquit.sed \
- testsuite/binary.good \
- testsuite/binary.inp \
testsuite/binary.sed \
testsuite/binary2.sed \
testsuite/binary3.sed \
- testsuite/bkslashes.good \
- testsuite/bkslashes.inp \
- testsuite/bkslashes.sed \
- testsuite/brackets.good \
- testsuite/brackets.inp \
- testsuite/brackets.sed \
testsuite/bsd.good \
testsuite/bsd.sh \
- testsuite/cv-vars.good \
- testsuite/cv-vars.inp \
- testsuite/cv-vars.sed \
- testsuite/classes.good \
- testsuite/classes.inp \
- testsuite/classes.sed \
- testsuite/dc.good \
- testsuite/dc.inp \
testsuite/dc.sed \
- testsuite/distrib.good \
testsuite/distrib.inp \
- testsuite/distrib.sed \
- testsuite/distrib.sh \
- testsuite/dollar.good \
- testsuite/dollar.inp \
- testsuite/dollar.sed \
- testsuite/empty.good \
- testsuite/empty.inp \
- testsuite/empty.sed \
- testsuite/enable.good \
- testsuite/enable.inp \
- testsuite/enable.sed \
- testsuite/eval.good \
- testsuite/eval.inp \
- testsuite/eval.sed \
- testsuite/factor.good \
- testsuite/factor.inp \
- testsuite/factor.sed \
- testsuite/fasts.good \
- testsuite/fasts.inp \
- testsuite/fasts.sed \
- testsuite/flipcase.good \
- testsuite/flipcase.inp \
- testsuite/flipcase.sed \
- testsuite/head.good \
- testsuite/head.inp \
- testsuite/head.sed \
- testsuite/inclib.good \
- testsuite/inclib.inp \
- testsuite/inclib.sed \
- testsuite/insens.good \
- testsuite/insens.inp \
- testsuite/insens.sed \
- testsuite/insert.good \
- testsuite/insert.inp \
- testsuite/insert.sed \
- testsuite/khadafy.good \
- testsuite/khadafy.inp \
- testsuite/khadafy.sed \
- testsuite/linecnt.good \
- testsuite/linecnt.inp \
- testsuite/linecnt.sed \
- testsuite/space.good \
- testsuite/space.inp \
- testsuite/space.sed \
testsuite/mac-mf.good \
testsuite/mac-mf.inp \
testsuite/mac-mf.sed \
testsuite/madding.good \
testsuite/madding.inp \
testsuite/madding.sed \
- testsuite/manis.good \
- testsuite/manis.inp \
- testsuite/manis.sed \
- testsuite/middle.good \
- testsuite/middle.sed \
- testsuite/middle.inp \
- testsuite/modulo.good \
- testsuite/modulo.sed \
- testsuite/modulo.inp \
- testsuite/newjis.good \
- testsuite/newjis.inp \
- testsuite/newjis.sed \
- testsuite/newline-anchor.good \
- testsuite/newline-anchor.inp \
- testsuite/newline-anchor.sed \
- testsuite/noeol.good \
- testsuite/noeol.inp \
- testsuite/noeol.sed \
- testsuite/noeolw.good \
- testsuite/noeolw.1good \
- testsuite/noeolw.2good \
- testsuite/noeolw.sed \
- testsuite/numsub.good \
- testsuite/numsub.inp \
- testsuite/numsub.sed \
- testsuite/numsub2.good \
- testsuite/numsub2.inp \
- testsuite/numsub2.sed \
- testsuite/numsub3.good \
- testsuite/numsub3.inp \
- testsuite/numsub3.sed \
- testsuite/numsub4.good \
- testsuite/numsub4.inp \
- testsuite/numsub4.sed \
- testsuite/numsub5.good \
- testsuite/numsub5.inp \
- testsuite/numsub5.sed \
- testsuite/readin.good \
- testsuite/readin.inp \
- testsuite/readin.sed \
- testsuite/recall.good \
- testsuite/recall.inp \
- testsuite/recall.sed \
- testsuite/recall2.good \
- testsuite/recall2.inp \
- testsuite/recall2.sed \
- testsuite/sep.good \
- testsuite/sep.inp \
- testsuite/sep.sed \
- testsuite/subwrite.inp \
- testsuite/subwrite.sed \
- testsuite/subwrt1.good \
- testsuite/subwrt2.good \
testsuite/uniq.good \
testsuite/uniq.inp \
testsuite/uniq.sed \
- testsuite/utf8-1.good \
- testsuite/utf8-1.inp \
- testsuite/utf8-1.sed \
- testsuite/utf8-2.good \
- testsuite/utf8-2.inp \
- testsuite/utf8-2.sed \
- testsuite/utf8-3.good \
- testsuite/utf8-3.inp \
- testsuite/utf8-3.sed \
- testsuite/utf8-4.good \
- testsuite/utf8-4.inp \
- testsuite/utf8-4.sed \
- testsuite/badenc.good \
- testsuite/badenc.inp \
- testsuite/badenc.sed \
- testsuite/writeout.inp \
- testsuite/writeout.sed \
- testsuite/wrtout1.good \
- testsuite/wrtout2.good \
- testsuite/xabcx.good \
- testsuite/xabcx.inp \
- testsuite/xabcx.sed \
- testsuite/xbxcx.good \
- testsuite/xbxcx.inp \
- testsuite/xbxcx.sed \
- testsuite/xbxcx3.good \
- testsuite/xbxcx3.inp \
- testsuite/xbxcx3.sed \
testsuite/xemacs.good \
- testsuite/xemacs.inp \
- testsuite/xemacs.sed \
- testsuite/y-bracket.good \
- testsuite/y-bracket.sed \
- testsuite/y-bracket.inp \
- testsuite/y-zero.good \
- testsuite/y-zero.sed \
- testsuite/y-zero.inp \
- testsuite/y-newline.good \
- testsuite/y-newline.sed \
- testsuite/y-newline.inp \
- testsuite/zero-anchor.good \
- testsuite/zero-anchor.sed \
- testsuite/zero-anchor.inp
+ testsuite/xemacs.inp
# automake makes `check' depend on $(TESTS). Declare
# dummy targets for $(TESTS) so that make does not complain.
diff --git a/testsuite/mac-mf.sh b/testsuite/mac-mf.sh
new file mode 100755
index 0000000..c7094a2
--- /dev/null
+++ b/testsuite/mac-mf.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# Runner for old 'mac-mf' test
+
+# Copyright (C) 2017-2018 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 <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+# location of external test files
+dir="$abs_top_srcdir/testsuite"
+
+sed -f "$dir/"mac-mf.sed "$dir/mac-mf.inp" > mac-mf-out || fail=1
+remove_cr_inplace mac-mf-out
+compare "$dir/mac-mf.good" mac-mf-out || fail=1
+
+
+Exit $fail
diff --git a/testsuite/madding.sh b/testsuite/madding.sh
new file mode 100755
index 0000000..4018510
--- /dev/null
+++ b/testsuite/madding.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# Runner for old 'madding' test (long lines)
+
+# Copyright (C) 2017-2018 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 <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+# location of external test files
+dir="$abs_top_srcdir/testsuite"
+
+sed -f "$dir/"madding.sed "$dir/madding.inp" > madding-out || fail=1
+remove_cr_inplace madding-out
+compare "$dir/madding.good" madding-out || fail=1
+
+
+Exit $fail
diff --git a/testsuite/manis.good b/testsuite/manis.good
deleted file mode 100644
index f349b76..0000000
--- a/testsuite/manis.good
+++ /dev/null
@@ -1,22 +0,0 @@
-s%@CFLAGS@%%g
-s%@CPPFLAGS@%-I/%g
-s%@CXXFLAGS@%-x c++%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%-L/usr/lib%g
-s%@LIBS@%-lgnu -lbfd%g
-s%@exec_prefix@%%g
-s%@prefix@%$prefix%g
-s%@RANLIB@%$RANLIB%g
-s%@CC@%/usr/local/bin/gcc%g
-s%@CPP@%$CPP%g
-s%@XCFLAGS@%$XCFLAGS%g
-s%@XINCLUDES@%$XINCLUDES%g
-s%@XLIBS@%$XLIBS%g
-s%@XPROGS@%$XPROGS%g
-s%@TCLHDIR@%$TCLHDIR%g
-s%@TCLLIB@%$TCLLIB%g
-s%@TKHDIR@%$TKHDIR%g
-s%@TKLIB@%$TKLIB%g
-s%@PTY_TYPE@%$PTY_TYPE%g
-s%@EVENT_TYPE@%$EVENT_TYPE%g
-s%@SETUID@%$SETUID%g
diff --git a/testsuite/manis.inp b/testsuite/manis.inp
deleted file mode 100644
index f349b76..0000000
--- a/testsuite/manis.inp
+++ /dev/null
@@ -1,22 +0,0 @@
-s%@CFLAGS@%%g
-s%@CPPFLAGS@%-I/%g
-s%@CXXFLAGS@%-x c++%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%-L/usr/lib%g
-s%@LIBS@%-lgnu -lbfd%g
-s%@exec_prefix@%%g
-s%@prefix@%$prefix%g
-s%@RANLIB@%$RANLIB%g
-s%@CC@%/usr/local/bin/gcc%g
-s%@CPP@%$CPP%g
-s%@XCFLAGS@%$XCFLAGS%g
-s%@XINCLUDES@%$XINCLUDES%g
-s%@XLIBS@%$XLIBS%g
-s%@XPROGS@%$XPROGS%g
-s%@TCLHDIR@%$TCLHDIR%g
-s%@TCLLIB@%$TCLLIB%g
-s%@TKHDIR@%$TKHDIR%g
-s%@TKLIB@%$TKLIB%g
-s%@PTY_TYPE@%$PTY_TYPE%g
-s%@EVENT_TYPE@%$EVENT_TYPE%g
-s%@SETUID@%$SETUID%g
diff --git a/testsuite/manis.sed b/testsuite/manis.sed
deleted file mode 100644
index 51c9a50..0000000
--- a/testsuite/manis.sed
+++ /dev/null
@@ -1,6 +0,0 @@
-# straight out of an autoconf-generated configure.
-# The input should look just like the input after this is run.
-#
-# Protect against being on the right side of a sed subst in config.status.
-s/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g$/%g/
diff --git a/testsuite/mb-bad-delim.sh b/testsuite/mb-bad-delim.sh
index a577c24..26a9f98 100755
--- a/testsuite/mb-bad-delim.sh
+++ b/testsuite/mb-bad-delim.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test 's' and 'y' non-slash delimiters in multibyte locales
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/mb-charclass-non-utf8.sh b/testsuite/mb-charclass-non-utf8.sh
index 6ef2740..c9f305a 100755
--- a/testsuite/mb-charclass-non-utf8.sh
+++ b/testsuite/mb-charclass-non-utf8.sh
@@ -4,7 +4,7 @@
# a single-byte character, or the second byte of a multibyte
# character.
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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,7 +17,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/mb-match-slash.sh b/testsuite/mb-match-slash.sh
index bfa9998..d719298 100755
--- a/testsuite/mb-match-slash.sh
+++ b/testsuite/mb-match-slash.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test slash following an incomplete multibyte character
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/mb-y-translate.sh b/testsuite/mb-y-translate.sh
index a5188a1..c3ea08f 100755
--- a/testsuite/mb-y-translate.sh
+++ b/testsuite/mb-y-translate.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test multibyte y/// translations
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/middle.good b/testsuite/middle.good
deleted file mode 100644
index 71f33c1..0000000
--- a/testsuite/middle.good
+++ /dev/null
@@ -1,3 +0,0 @@
- universe. You will never succeed. Everything will fail and come
- to an end finally. But you have a chance to carve a little bit
- of order and maybe even beauty out of the raw materials that
diff --git a/testsuite/middle.inp b/testsuite/middle.inp
deleted file mode 100644
index 5c4b4a4..0000000
--- a/testsuite/middle.inp
+++ /dev/null
@@ -1,9 +0,0 @@
- "...by imposing a tiny bit of order in a communication you are
- translating, you are carving out a little bit of order in the
- universe. You will never succeed. Everything will fail and come
- to an end finally. But you have a chance to carve a little bit
- of order and maybe even beauty out of the raw materials that
- surround you everywhere, and I think there is no greater meaning
- in life."
-
- Donald L. Philippi, Oct 1930 - Jan 1993
diff --git a/testsuite/middle.sed b/testsuite/middle.sed
deleted file mode 100644
index 3471789..0000000
--- a/testsuite/middle.sed
+++ /dev/null
@@ -1 +0,0 @@
-3,5p
diff --git a/testsuite/misc.pl b/testsuite/misc.pl
new file mode 100644
index 0000000..3fa5b84
--- /dev/null
+++ b/testsuite/misc.pl
@@ -0,0 +1,1206 @@
+#!/usr/bin/perl
+# Test misc.
+
+# Copyright (C) 2017-2018 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 <https://www.gnu.org/licenses/>.
+
+use strict;
+use File::stat;
+
+(my $program_name = $0) =~ s|.*/||;
+
+# Turn off localization of executable's output.
+@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
+
+my $prog = 'sed';
+
+print "PATH = $ENV{PATH}\n";
+
+my @Tests =
+ (
+ ['empty', qw(-e ''), {IN=>''}, {OUT=>''}],
+ ['empty2', q('s/^ *//'), {IN=>"x\n\n"}, {OUT=>"x\n\n"}],
+
+ ['head', qw(3q), {IN=>"1\n2\n3\n4\n"}, {OUT=>"1\n2\n3\n"}],
+ ['space', q('s/_\S/XX/g;s/\s/_/g'),
+ {IN=> "Hello World\t!\nSecond_line_ of tests\n" },
+ {OUT=> "Hello_World_!\nSecondXXine__of_tests\n" }],
+
+ ['zero-anchor', qw(-z), q('N;N;s/^/X/g;s/^/X/mg;s/$/Y/g;s/$/Y/mg'),
+ {IN=>"a\0b\0c\0" },
+ {OUT=>"XXaY\0XbY\0XcYY\0" }],
+
+ ['case-insensitive', qw(-n), q('h;s/Version: *//p;g;s/version: *//Ip'),
+ {IN=>"Version: 1.2.3\n" },
+ {OUT=>"1.2.3\n1.2.3\n" },
+ ],
+
+ ['preserve-missing-EOL-at-EOF', q('s/$/x/'),
+ {IN=> "a\nb" },
+ {OUT=>"ax\nbx" },
+ ],
+
+ ['y-bracket', q('y/[/ /'),
+ {IN => "Are you sure (y/n)? [y]\n" },
+ {OUT=> "Are you sure (y/n)? y]\n" },
+ ],
+
+ ['y-zero', q('y/b/\x00/'),
+ {IN => "abc\n" },
+ {OUT=> "a\0c\n" },
+ ],
+
+ ['y-newline', q('H
+G
+y/Ss\nYy/yY$sS/'),
+ {IN => "Are you sure (y/n)? [y]\n" },
+ {OUT=> 'Are Sou Yure (S/n)? [S]$$Are Sou Yure (S/n)? [S]'."\n"},
+ ],
+
+ ['allsub', q('s/foo/bar/g'),
+ {IN => "foo foo fo oo f oo foo foo foo foo foo foo foo foo foo\n"},
+ {OUT=> "bar bar fo oo f oo bar bar bar bar bar bar bar bar bar\n"},
+ ],
+
+ ['insert-nl', qw(-f), {IN => "/foo/i\\\n"},
+ {IN => "bar\nfoo\n" },
+ {OUT=> "bar\n\nfoo\n" },
+ ],
+
+ ['recall',
+ # Check that the empty regex recalls the last *executed* regex,
+ # not the last *compiled* regex
+ qw(-f), {IN => "p;s/e/X/p;:x;s//Y/p;/f/bx"},
+ {IN => "eeefff\n" },
+ {OUT=> "eeefff\n"
+ . "Xeefff\n"
+ . "XYefff\n"
+ . "XYeYff\n"
+ . "XYeYYf\n"
+ . "XYeYYY\n"
+ . "XYeYYY\n"
+ },
+ ],
+
+ ['recall2',
+ # Starting from sed 4.1.3, regexes are compiled with REG_NOSUB
+ # if they are used in an address, so that the matcher does not
+ # have to obey leftmost-longest. The tricky part is to recompile
+ # them if they are then used in a substitution.
+ qw(-f), {IN => '/\(ab*\)\+/ s//>\1</g'},
+ {IN => "ababb||abbbabbbb\n" },
+ {OUT=> ">abb<||>abbbb<\n" },
+ ],
+
+ ['0range',
+ # Test address 0 (GNU extension)
+ # FIXME: This test does NOT actually fail if the address is changed to 1.
+ qw(-e '0,/aaa/d'),
+ {IN => "1\n"
+ . "2\n"
+ . "3\n"
+ . "4\n"
+ . "aaa\n"
+ . "yes\n"},
+ {OUT => "yes\n"}
+ ],
+
+ ['amp-escape',
+ # Test ampersand as escape sequence (ASCII 0x26), which should
+ # not have a special meaning (i.e. the 'matched pattern')
+ qw(-e 's/yes/yes\x26/'),
+ {IN => "yes\n"},
+ {OUT => "yes&\n"}
+ ],
+
+ ['appquit',
+ # Test 'a'ppend command before 'q'uit
+ qw(-f),
+ {IN => q(a\
+ok
+q)},
+ {IN => "doh\n"},
+ {OUT => "doh\n"
+ . "ok\n"}
+ ],
+
+
+ ['brackets',
+ qw(-f),
+ {IN => q(s/[[]/a/
+s/[[[]/b/
+s/[[[[]/c/
+s/[[[[[]/d/
+s/[[[[[[]/e/
+s/[[[[[[[]/f/
+s/[[[[[[[[]/g/
+s/[[[[[[[[[]/h/
+)},
+ {IN => "[[[[[[[[[\n"},
+ {OUT => "abcdefgh[\n"}
+ ],
+
+
+ ['bkslashes',
+ # Test backslashes in regex
+ # bug in sed 4.0b
+ qw(-f),
+ {IN => q(s/$/\\\\\
+/
+)},
+ {IN => "a\n"},
+ {OUT => "a\\\n"
+ . "\n"}
+ ],
+
+ ['classes',
+ # inspired by an autoconf generated configure script.
+ qw(-n -f),
+ {IN => 's/^\([/[:lower:]A-Z0-9]*_cv_[[:lower:][:upper:]/[:digit:]]*\)'.
+ '=\(.*\)/: \${\1=\'\2\'}/p'},
+ {IN => "_cv_=emptyvar\n"
+ . "ac_cv_prog/RANLIB=/usr/bin/ranlib\n"
+ . "ac_cv_prog/CC=/usr/unsupported/\\ \\ /lib/_cv_/cc\n"
+ . "a/c_cv_prog/CPP=/usr/bin/cpp\n"
+ . "SHELL=bash\n"
+ . "GNU=GNU!UNIX\n"},
+ {OUT => ": \${_cv_='emptyvar'}\n"
+ . ": \${ac_cv_prog/RANLIB='/usr/bin/ranlib'}\n"
+ . ": \${ac_cv_prog/CC='/usr/unsupported/\\ \\ /lib/_cv_/cc'}\n"
+ . ": \${a/c_cv_prog/CPP='/usr/bin/cpp'}\n"}
+ ],
+
+
+ ['cv-vars',
+ # inspired by an autoconf generated configure script.
+ qw(-n -f),
+ {IN => q|s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p|},
+ {IN => "_cv_=emptyvar\n"
+ . "ac_cv_prog_RANLIB=/usr/bin/ranlib\n"
+ . "ac_cv_prog_CC=/usr/unsupported/\ \ /lib/_cv_/cc\n"
+ . "ac_cv_prog_CPP=/usr/bin/cpp\n"
+ . "SHELL=bash\n"
+ . "GNU=GNU!UNIX\n"},
+ {OUT => ": \${_cv_='emptyvar'}\n"
+ . ": \${ac_cv_prog_RANLIB='/usr/bin/ranlib'}\n"
+ . ": \${ac_cv_prog_CC='/usr/unsupported/\ \ /lib/_cv_/cc'}\n"
+ . ": \${ac_cv_prog_CPP='/usr/bin/cpp'}\n"}
+ ],
+
+ ['quiet',
+ # the old 'quiet' test: --quiet instead of -n
+ qw(--quiet -f),
+ {IN => q|s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p|},
+ {IN => "_cv_=emptyvar\n"
+ . "ac_cv_prog_RANLIB=/usr/bin/ranlib\n"
+ . "ac_cv_prog_CC=/usr/unsupported/\ \ /lib/_cv_/cc\n"
+ . "ac_cv_prog_CPP=/usr/bin/cpp\n"
+ . "SHELL=bash\n"
+ . "GNU=GNU!UNIX\n"},
+ {OUT => ": \${_cv_='emptyvar'}\n"
+ . ": \${ac_cv_prog_RANLIB='/usr/bin/ranlib'}\n"
+ . ": \${ac_cv_prog_CC='/usr/unsupported/\ \ /lib/_cv_/cc'}\n"
+ . ": \${ac_cv_prog_CPP='/usr/bin/cpp'}\n"}
+ ],
+
+ ['file',
+ # the old 'file' test: --file instead of -f
+ qw(-n --file),
+ {IN => q|s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p|},
+ {IN => "_cv_=emptyvar\n"
+ . "ac_cv_prog_RANLIB=/usr/bin/ranlib\n"
+ . "ac_cv_prog_CC=/usr/unsupported/\ \ /lib/_cv_/cc\n"
+ . "ac_cv_prog_CPP=/usr/bin/cpp\n"
+ . "SHELL=bash\n"
+ . "GNU=GNU!UNIX\n"},
+ {OUT => ": \${_cv_='emptyvar'}\n"
+ . ": \${ac_cv_prog_RANLIB='/usr/bin/ranlib'}\n"
+ . ": \${ac_cv_prog_CC='/usr/unsupported/\ \ /lib/_cv_/cc'}\n"
+ . ": \${ac_cv_prog_CPP='/usr/bin/cpp'}\n"}
+ ],
+
+
+ ['dollar',
+ # Test replacement on the last line (address '$')
+ qw(-e '$s/^/space /'),
+ {IN => "I can't quite remember where I heard it,\n"
+ . "but I can't seem to get out of my head\n"
+ . "the phrase\n"
+ . "the final frontier\n"},
+ {OUT => "I can't quite remember where I heard it,\n"
+ . "but I can't seem to get out of my head\n"
+ . "the phrase\n"
+ . "space the final frontier\n"}
+ ],
+
+ ['enable',
+ # inspired by an autoconf generated configure script.
+ qw(-e 's/-*enable-//;s/=.*//'),
+ {IN => "--enable-targets=sparc-sun-sunos4.1.3,srec\n"
+ . "--enable-x11-testing=on\n"
+ . "--enable-wollybears-in-minnesota=yes-id-like-that\n"},
+ {OUT => "targets\n"
+ . "x11-testing\n"
+ . "wollybears-in-minnesota\n"}
+ ],
+
+ ['fasts',
+ # test `fast' substitutions
+ qw(-f),
+ {IN => q(
+h
+s/a//
+p
+g
+s/a//g
+p
+g
+s/^a//p
+g
+s/^a//g
+p
+g
+s/not present//g
+p
+g
+s/^[a-z]//g
+p
+g
+s/a$//
+p
+g
+
+y/a/b/
+h
+s/b//
+p
+g
+s/b//g
+p
+g
+s/^b//p
+g
+s/^b//g
+p
+g
+s/^[a-z]//g
+p
+g
+s/b$//
+p
+g
+)},
+ {IN => "aaaaaaabbbbbbaaaaaaa\n"},
+ {OUT => "aaaaaabbbbbbaaaaaaa\n"
+ . "bbbbbb\n"
+ . "aaaaaabbbbbbaaaaaaa\n"
+ . "aaaaaabbbbbbaaaaaaa\n"
+ . "aaaaaaabbbbbbaaaaaaa\n"
+ . "aaaaaabbbbbbaaaaaaa\n"
+ . "aaaaaaabbbbbbaaaaaa\n"
+ . "bbbbbbbbbbbbbbbbbbb\n"
+ . "\n"
+ . "bbbbbbbbbbbbbbbbbbb\n"
+ . "bbbbbbbbbbbbbbbbbbb\n"
+ . "bbbbbbbbbbbbbbbbbbb\n"
+ . "bbbbbbbbbbbbbbbbbbb\n"
+ . "bbbbbbbbbbbbbbbbbbbb\n"}
+ ],
+
+
+
+ ['factor',
+ # Compute a few common factors for speed. Clear the subst flag
+ # These are placed here to make the flow harder to understand :-)
+ # The quotient of dividing by 11 is a limit to the remaining prime factors
+ # Pattern space looks like CANDIDATE\nNUMBER. When a candidate is valid,
+ # the number is divided and the candidate is tried again
+ # We have a prime factor in CANDIDATE! Print it
+ # If NUMBER = 1, we don't have any more factors
+ qw(-n -f),
+ {IN => q~
+s/.*/&;9aaaaaaaaa8aaaaaaaa7aaaaaaa6aaaaaa5aaaaa4aaaa3aaa2aa1a0/
+:encode
+s/\(a*\)\([0-9]\)\([0-9]*;.*\2\(a*\)\)/\1\1\1\1\1\1\1\1\1\1\4\3/
+tencode
+s/;.*//
+
+t7a
+
+:2
+a\
+2
+b2a
+:3
+a\
+3
+b3a
+:5
+a\
+5
+b5a
+:7
+a\
+7
+
+:7a
+s/^\(aa*\)\1\{6\}$/\1/
+t7
+:5a
+s/^\(aa*\)\1\{4\}$/\1/
+t5
+:3a
+s/^\(aa*\)\1\1$/\1/
+t3
+:2a
+s/^\(aa*\)\1$/\1/
+t2
+
+/^a$/b
+
+s/^\(aa*\)\1\{10\}/\1=&/
+
+:factor
+/^\(a\{7,\}\)=\1\1*$/! {
+ # Decrement CANDIDATE, and search again if it is still >1
+ s/^a//
+ /^aa/b factor
+
+ # Print the last remaining factor: since it is stored in the NUMBER
+ # rather than in the CANDIDATE, swap 'em: now NUMBER=1
+ s/\(.*\)=\(.*\)/\2=\1/
+}
+
+h
+s/=.*/;;0a1aa2aaa3aaaa4aaaaa5aaaaaa6aaaaaaa7aaaaaaaa8aaaaaaaaa9/
+
+:decode
+s/^\(a*\)\1\{9\}\(a\{0,9\}\)\([0-9]*;.*[^a]\2\([0-9]\)\)/\1\4\3/
+/^a/tdecode
+s/;.*//p
+
+g
+:divide
+s/^\(a*\)\(=b*\)\1/\1\2b/
+tdivide
+y/b/a/
+
+/aa$/bfactor
+~},
+
+ {IN => "2\n"
+ . "3\n"
+ . "4\n"
+ . "5\n"
+ . "8\n"
+ . "11\n"
+ . "16\n"
+ . "143\n"},
+ {OUT => "2\n"
+ . "3\n"
+ . "2\n"
+ . "2\n"
+ . "5\n"
+ . "2\n"
+ . "2\n"
+ . "2\n"
+ . "11\n"
+ . "2\n"
+ . "2\n"
+ . "2\n"
+ . "2\n"
+ . "13\n"
+ . "11\n"}
+ ],
+
+
+ ['flipcase',
+ qw(-f),
+ {IN => q|s,\([^A-Za-z]*\)\([A-Za-z]*\),\1\L\u\2,g|},
+ {IN => "09 - 02 - 2002 00.00 Tg La7 La7 -\n"
+ . "09 - 02 - 2002 00.00 Brand New Tmc 2 -\n"
+ . "09 - 02 - 2002 00.10 Tg1 Notte Rai Uno -\n"
+ . "09 - 02 - 2002 00.15 Tg Parlamento Rai Due -\n"
+ . "09 - 02 - 2002 00.15 Kung Fu - La Leggenda Continua La7 -\n"
+ . "09 - 02 - 2002 00.20 Berserk - La CoNFESSIONE Di Gatz"
+ . " Italia 1 Cartoon\n"
+ . "09 - 02 - 2002 00.20 Tg3 - Tg3 Meteo Rai TrE -\n"
+ . "09 - 02 - 2002 00.25 Meteo 2 Rai Due -\n"
+ . "09 - 02 - 2002 00.30 Appuntamento Al CinEMA RaI Due -\n"
+ . "09 - 02 - 2002 00.30 Rai Educational - Mediamente Rai Tre -\n"
+ . "09 - 02 - 2002 00.35 Profiler Rai Due -\n"
+ . "09 - 02 - 2002 00.35 Stampa OggI - Che Tempo Fa Rai Uno -\n"
+ . "09 - 02 - 2002 00.45 Rai Educational - Babele: Euro Rai Uno -\n"
+ . "09 - 02 - 2002 00.45 BollettINO Della NEVE RETE 4 News\n"
+ . "09 - 02 - 2002 00.50 STUDIO Aperto - La Giornata Italia 1 News\n"
+ . "09 - 02 - 2002 00.50 BOCCA A Bocca - 2 Tempo Rete 4 Film\n"
+ . "09 - 02 - 2002 01.00 AppuntAMENTO Al Cinema Rai Tre -\n"
+ . "09 - 02 - 2002 01.00 Music NoN Stop Tmc 2 -\n"
+ . "09 - 02 - 2002 01.00 Studio SpORT Italia 1 SporT\n"
+ . "09 - 02 - 2002 01.00 Tg 5 - Notte Canale 5 News\n"
+ . "09 - 02 - 2002 01.05 Fuori Orario. CosE (Mai) Viste Rai Tre -\n"
+ . "09 - 02 - 2002 01.15 RAINOTTE Rai Due -\n"
+ . "09 - 02 - 2002 01.15 Sottovoce Rai Uno -\n"
+ . "09 - 02 - 2002 01.15 GiOCHI Olimpici InVERNALI - CERIMONIA"
+ . " Di Apertura Rai Tre -\n"
+ . "09 - 02 - 2002 01.17 Italia Interroga Rai Due -\n"},
+ {OUT => "09 - 02 - 2002 00.00 Tg La7 La7 -\n"
+ . "09 - 02 - 2002 00.00 Brand New Tmc 2 -\n"
+ . "09 - 02 - 2002 00.10 Tg1 Notte Rai Uno -\n"
+ . "09 - 02 - 2002 00.15 Tg Parlamento Rai Due -\n"
+ . "09 - 02 - 2002 00.15 Kung Fu - La Leggenda Continua La7 -\n"
+ . "09 - 02 - 2002 00.20 Berserk - La Confessione Di Gatz"
+ . " Italia 1 Cartoon\n"
+ . "09 - 02 - 2002 00.20 Tg3 - Tg3 Meteo Rai Tre -\n"
+ . "09 - 02 - 2002 00.25 Meteo 2 Rai Due -\n"
+ . "09 - 02 - 2002 00.30 Appuntamento Al Cinema Rai Due -\n"
+ . "09 - 02 - 2002 00.30 Rai Educational - Mediamente Rai Tre -\n"
+ . "09 - 02 - 2002 00.35 Profiler Rai Due -\n"
+ . "09 - 02 - 2002 00.35 Stampa Oggi - Che Tempo Fa Rai Uno -\n"
+ . "09 - 02 - 2002 00.45 Rai Educational - Babele: Euro Rai Uno -\n"
+ . "09 - 02 - 2002 00.45 Bollettino Della Neve Rete 4 News\n"
+ . "09 - 02 - 2002 00.50 Studio Aperto - La Giornata Italia 1 News\n"
+ . "09 - 02 - 2002 00.50 Bocca A Bocca - 2 Tempo Rete 4 Film\n"
+ . "09 - 02 - 2002 01.00 Appuntamento Al Cinema Rai Tre -\n"
+ . "09 - 02 - 2002 01.00 Music Non Stop Tmc 2 -\n"
+ . "09 - 02 - 2002 01.00 Studio Sport Italia 1 Sport\n"
+ . "09 - 02 - 2002 01.00 Tg 5 - Notte Canale 5 News\n"
+ . "09 - 02 - 2002 01.05 Fuori Orario. Cose (Mai) Viste Rai Tre -\n"
+ . "09 - 02 - 2002 01.15 Rainotte Rai Due -\n"
+ . "09 - 02 - 2002 01.15 Sottovoce Rai Uno -\n"
+ . "09 - 02 - 2002 01.15 Giochi Olimpici Invernali - Cerimonia"
+ . " Di Apertura Rai Tre -\n"
+ . "09 - 02 - 2002 01.17 Italia Interroga Rai Due -\n"}
+ ],
+
+
+ ['inclib',
+ # inspired by an autoconf generated configure script.
+ qw(-e 's;lib;include;'),
+ {IN => " /usr/X11R6/lib\n"
+ . " /usr/X11R5/lib\n"
+ . " /usr/X11R4/lib\n"
+ . "\n"
+ . " /usr/lib/X11R6\n"
+ . " /usr/lib/X11R5\n"
+ . " /usr/lib/X11R4\n"
+ . "\n"
+ . " /usr/local/X11R6/lib\n"
+ . " /usr/local/X11R5/lib\n"
+ . " /usr/local/X11R4/lib\n"
+ . "\n"
+ . " /usr/local/lib/X11R6\n"
+ . " /usr/local/lib/X11R5\n"
+ . " /usr/local/lib/X11R4\n"
+ . "\n"
+ . " /usr/X11/lib\n"
+ . " /usr/lib/X11\n"
+ . " /usr/local/X11/lib\n"
+ . " /usr/local/lib/X11\n"
+ . "\n"
+ . " /usr/X386/lib\n"
+ . " /usr/x386/lib\n"
+ . " /usr/XFree86/lib/X11\n"
+ . "\n"
+ . " /usr/lib\n"
+ . " /usr/local/lib\n"
+ . " /usr/unsupported/lib\n"
+ . " /usr/athena/lib\n"
+ . " /usr/local/x11r5/lib\n"
+ . " /usr/lpp/Xamples/lib\n"
+ . "\n"
+ . " /usr/openwin/lib\n"
+ . " /usr/openwin/share/lib\n"},
+ {OUT => " /usr/X11R6/include\n"
+ . " /usr/X11R5/include\n"
+ . " /usr/X11R4/include\n"
+ . "\n"
+ . " /usr/include/X11R6\n"
+ . " /usr/include/X11R5\n"
+ . " /usr/include/X11R4\n"
+ . "\n"
+ . " /usr/local/X11R6/include\n"
+ . " /usr/local/X11R5/include\n"
+ . " /usr/local/X11R4/include\n"
+ . "\n"
+ . " /usr/local/include/X11R6\n"
+ . " /usr/local/include/X11R5\n"
+ . " /usr/local/include/X11R4\n"
+ . "\n"
+ . " /usr/X11/include\n"
+ . " /usr/include/X11\n"
+ . " /usr/local/X11/include\n"
+ . " /usr/local/include/X11\n"
+ . "\n"
+ . " /usr/X386/include\n"
+ . " /usr/x386/include\n"
+ . " /usr/XFree86/include/X11\n"
+ . "\n"
+ . " /usr/include\n"
+ . " /usr/local/include\n"
+ . " /usr/unsupported/include\n"
+ . " /usr/athena/include\n"
+ . " /usr/local/x11r5/include\n"
+ . " /usr/lpp/Xamples/include\n"
+ . "\n"
+ . " /usr/openwin/include\n"
+ . " /usr/openwin/share/include\n"}
+ ],
+
+ ['khadafy',
+ # The Khadafy test is brought to you by Scott Anderson . . .
+ qw(-f),
+ {IN => '/M[ou]\'\{0,1\}am\{1,2\}[ae]r' .
+ ' .*' .
+ '\([AEae]l[- ]\)\{0,1\}' .
+ '[GKQ]h\{0,1\}[aeu]\{1,\}\([dtz][dhz]\{0,1\}\)\{1,\}af[iy]/!d'},
+ {IN => "1) Muammar Qaddafi\n"
+ . "2) Mo'ammar Gadhafi\n"
+ . "3) Muammar Kaddafi\n"
+ . "4) Muammar Qadhafi\n"
+ . "5) Moammar El Kadhafi\n"
+ . "6) Muammar Gadafi\n"
+ . "7) Mu'ammar al-Qadafi\n"
+ . "8) Moamer El Kazzafi\n"
+ . "9) Moamar al-Gaddafi\n"
+ . "10) Mu'ammar Al Qathafi\n"
+ . "11) Muammar Al Qathafi\n"
+ . "12) Mo'ammar el-Gadhafi\n"
+ . "13) Moamar El Kadhafi\n"
+ . "14) Muammar al-Qadhafi\n"
+ . "15) Mu'ammar al-Qadhdhafi\n"
+ . "16) Mu'ammar Qadafi\n"
+ . "17) Moamar Gaddafi\n"
+ . "18) Mu'ammar Qadhdhafi\n"
+ . "19) Muammar Khaddafi\n"
+ . "20) Muammar al-Khaddafi\n"
+ . "21) Mu'amar al-Kadafi\n"
+ . "22) Muammar Ghaddafy\n"
+ . "23) Muammar Ghadafi\n"
+ . "24) Muammar Ghaddafi\n"
+ . "25) Muamar Kaddafi\n"
+ . "26) Muammar Quathafi\n"
+ . "27) Muammar Gheddafi\n"
+ . "28) Muamar Al-Kaddafi\n"
+ . "29) Moammar Khadafy\n"
+ . "30) Moammar Qudhafi\n"
+ . "31) Mu'ammar al-Qaddafi\n"
+ . "32) Mulazim Awwal Mu'ammar Muhammad Abu Minyar al-Qadhafi\n"},
+ {OUT => "1) Muammar Qaddafi\n"
+ . "2) Mo'ammar Gadhafi\n"
+ . "3) Muammar Kaddafi\n"
+ . "4) Muammar Qadhafi\n"
+ . "5) Moammar El Kadhafi\n"
+ . "6) Muammar Gadafi\n"
+ . "7) Mu'ammar al-Qadafi\n"
+ . "8) Moamer El Kazzafi\n"
+ . "9) Moamar al-Gaddafi\n"
+ . "10) Mu'ammar Al Qathafi\n"
+ . "11) Muammar Al Qathafi\n"
+ . "12) Mo'ammar el-Gadhafi\n"
+ . "13) Moamar El Kadhafi\n"
+ . "14) Muammar al-Qadhafi\n"
+ . "15) Mu'ammar al-Qadhdhafi\n"
+ . "16) Mu'ammar Qadafi\n"
+ . "17) Moamar Gaddafi\n"
+ . "18) Mu'ammar Qadhdhafi\n"
+ . "19) Muammar Khaddafi\n"
+ . "20) Muammar al-Khaddafi\n"
+ . "21) Mu'amar al-Kadafi\n"
+ . "22) Muammar Ghaddafy\n"
+ . "23) Muammar Ghadafi\n"
+ . "24) Muammar Ghaddafi\n"
+ . "25) Muamar Kaddafi\n"
+ . "26) Muammar Quathafi\n"
+ . "27) Muammar Gheddafi\n"
+ . "28) Muamar Al-Kaddafi\n"
+ . "29) Moammar Khadafy\n"
+ . "30) Moammar Qudhafi\n"
+ . "31) Mu'ammar al-Qaddafi\n"
+ . "32) Mulazim Awwal Mu'ammar Muhammad Abu Minyar al-Qadhafi\n"}
+ ],
+
+ ['linecnt',
+ qw(-e '='),
+ {IN => "A dialogue on poverty\n"
+ . "\n"
+ . " On the night when the rain beats,\n"
+ . " Driven by the wind,\n"
+ . " On the night when the snowflakes mingle\n"
+ . " With a sleety rain,\n"
+ . " I feel so helplessly cold.\n"
+ . " I nibble at a lump of salt,\n"
+ . " Sip the hot, oft-diluted dregs of _sake_;\n"
+ . " And coughing, snuffling,\n"
+ . " And stroking my scanty beard,\n"
+ . " I say in my pride,\n"
+ . " \"There's none worthy, save I!\"\n"
+ . " But I shiver still with cold.\n"
+ . " I pull up my hempen bedclothes,\n"
+ . " Wear what few sleeveless clothes I have,\n"
+ . " But cold and bitter is the night!\n"
+ . " As for those poorer than myself,\n"
+ . " Their parents must be cold and hungry,\n"
+ . " Their wives and children beg and cry.\n"
+ . " Then, how do you struggle through life?\n"
+ . "\n"
+ . " Wide as they call the heaven and earth,\n"
+ . " For me they have shrunk quite small;\n"
+ . " Bright though they call the sun and moon,\n"
+ . " They never shine for me.\n"
+ . " Is it the same with all men,\n"
+ . " Or for me alone?\n"
+ . " By rare chance I was born a man\n"
+ . " And no meaner than my fellows,\n"
+ . " But, wearing unwadded sleeveless clothes\n"
+ . " In tatters, like weeds waving in the sea,\n"
+ . " Hanging from my shoulders,\n"
+ . " And under the sunken roof,\n"
+ . " Within the leaning walls,\n"
+ . " Here I lie on straw\n"
+ . " Spread on bare earth,\n"
+ . " With my parents at my pillow,\n"
+ . " And my wife and children at my feet,\n"
+ . " All huddled in grief and tears.\n"
+ . " No fire sends up smoke\n"
+ . " At the cooking-place,\n"
+ . " And in the cauldron\n"
+ . " A spider spins its web.\n"
+ . " With not a grain to cook,\n"
+ . " We moan like the night thrush.\n"
+ . " Then, \"to cut,\" as the saying is,\n"
+ . " \"The ends of what is already too short,\"\n"
+ . " The village headman comes,\n"
+ . " With rod in hand, to our sleeping place,\n"
+ . " Growling for his dues.\n"
+ . " Must it be so hopeless --\n"
+ . " The way of this world?\n"
+ . "\n"
+ . " -- Yamanoue Okura\n"},
+ {OUT => "1\n"
+ . "A dialogue on poverty\n"
+ . "2\n"
+ . "\n"
+ . "3\n"
+ . " On the night when the rain beats,\n"
+ . "4\n"
+ . " Driven by the wind,\n"
+ . "5\n"
+ . " On the night when the snowflakes mingle\n"
+ . "6\n"
+ . " With a sleety rain,\n"
+ . "7\n"
+ . " I feel so helplessly cold.\n"
+ . "8\n"
+ . " I nibble at a lump of salt,\n"
+ . "9\n"
+ . " Sip the hot, oft-diluted dregs of _sake_;\n"
+ . "10\n"
+ . " And coughing, snuffling,\n"
+ . "11\n"
+ . " And stroking my scanty beard,\n"
+ . "12\n"
+ . " I say in my pride,\n"
+ . "13\n"
+ . " \"There's none worthy, save I!\"\n"
+ . "14\n"
+ . " But I shiver still with cold.\n"
+ . "15\n"
+ . " I pull up my hempen bedclothes,\n"
+ . "16\n"
+ . " Wear what few sleeveless clothes I have,\n"
+ . "17\n"
+ . " But cold and bitter is the night!\n"
+ . "18\n"
+ . " As for those poorer than myself,\n"
+ . "19\n"
+ . " Their parents must be cold and hungry,\n"
+ . "20\n"
+ . " Their wives and children beg and cry.\n"
+ . "21\n"
+ . " Then, how do you struggle through life?\n"
+ . "22\n"
+ . "\n"
+ . "23\n"
+ . " Wide as they call the heaven and earth,\n"
+ . "24\n"
+ . " For me they have shrunk quite small;\n"
+ . "25\n"
+ . " Bright though they call the sun and moon,\n"
+ . "26\n"
+ . " They never shine for me.\n"
+ . "27\n"
+ . " Is it the same with all men,\n"
+ . "28\n"
+ . " Or for me alone?\n"
+ . "29\n"
+ . " By rare chance I was born a man\n"
+ . "30\n"
+ . " And no meaner than my fellows,\n"
+ . "31\n"
+ . " But, wearing unwadded sleeveless clothes\n"
+ . "32\n"
+ . " In tatters, like weeds waving in the sea,\n"
+ . "33\n"
+ . " Hanging from my shoulders,\n"
+ . "34\n"
+ . " And under the sunken roof,\n"
+ . "35\n"
+ . " Within the leaning walls,\n"
+ . "36\n"
+ . " Here I lie on straw\n"
+ . "37\n"
+ . " Spread on bare earth,\n"
+ . "38\n"
+ . " With my parents at my pillow,\n"
+ . "39\n"
+ . " And my wife and children at my feet,\n"
+ . "40\n"
+ . " All huddled in grief and tears.\n"
+ . "41\n"
+ . " No fire sends up smoke\n"
+ . "42\n"
+ . " At the cooking-place,\n"
+ . "43\n"
+ . " And in the cauldron\n"
+ . "44\n"
+ . " A spider spins its web.\n"
+ . "45\n"
+ . " With not a grain to cook,\n"
+ . "46\n"
+ . " We moan like the night thrush.\n"
+ . "47\n"
+ . " Then, \"to cut,\" as the saying is,\n"
+ . "48\n"
+ . " \"The ends of what is already too short,\"\n"
+ . "49\n"
+ . " The village headman comes,\n"
+ . "50\n"
+ . " With rod in hand, to our sleeping place,\n"
+ . "51\n"
+ . " Growling for his dues.\n"
+ . "52\n"
+ . " Must it be so hopeless --\n"
+ . "53\n"
+ . " The way of this world?\n"
+ . "54\n"
+ . "\n"
+ . "55\n"
+ . " -- Yamanoue Okura\n"}
+ ],
+
+ ['manis',
+ # straight out of an autoconf-generated configure.
+ # The input should look just like the input after this is run.
+ #
+ # Protect against being on the right side of a sed subst in config.status.
+ qw(-f),
+ {IN => q(s/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
+s/@@/%@/; s/@@/@%/; s/@g$/%g/
+)},
+ {IN => "s\%\@CFLAGS\@\%\%g\n"
+ . "s\%\@CPPFLAGS\@\%-I/\%g\n"
+ . "s\%\@CXXFLAGS\@\%-x c++\%g\n"
+ . "s\%\@DEFS\@\%\$DEFS\%g\n"
+ . "s\%\@LDFLAGS\@\%-L/usr/lib\%g\n"
+ . "s\%\@LIBS\@\%-lgnu -lbfd\%g\n"
+ . "s\%\@exec_prefix\@\%\%g\n"
+ . "s\%\@prefix\@\%\$prefix\%g\n"
+ . "s\%\@RANLIB\@\%\$RANLIB\%g\n"
+ . "s\%\@CC\@\%/usr/local/bin/gcc\%g\n"
+ . "s\%\@CPP\@\%\$CPP\%g\n"
+ . "s\%\@XCFLAGS\@\%\$XCFLAGS\%g\n"
+ . "s\%\@XINCLUDES\@\%\$XINCLUDES\%g\n"
+ . "s\%\@XLIBS\@\%\$XLIBS\%g\n"
+ . "s\%\@XPROGS\@\%\$XPROGS\%g\n"
+ . "s\%\@TCLHDIR\@\%\$TCLHDIR\%g\n"
+ . "s\%\@TCLLIB\@\%\$TCLLIB\%g\n"
+ . "s\%\@TKHDIR\@\%\$TKHDIR\%g\n"
+ . "s\%\@TKLIB\@\%\$TKLIB\%g\n"
+ . "s\%\@PTY_TYPE\@\%\$PTY_TYPE\%g\n"
+ . "s\%\@EVENT_TYPE\@\%\$EVENT_TYPE\%g\n"
+ . "s\%\@SETUID\@\%\$SETUID\%g\n"},
+ {OUT => "s\%\@CFLAGS\@\%\%g\n"
+ . "s\%\@CPPFLAGS\@\%-I/\%g\n"
+ . "s\%\@CXXFLAGS\@\%-x c++\%g\n"
+ . "s\%\@DEFS\@\%\$DEFS\%g\n"
+ . "s\%\@LDFLAGS\@\%-L/usr/lib\%g\n"
+ . "s\%\@LIBS\@\%-lgnu -lbfd\%g\n"
+ . "s\%\@exec_prefix\@\%\%g\n"
+ . "s\%\@prefix\@\%\$prefix\%g\n"
+ . "s\%\@RANLIB\@\%\$RANLIB\%g\n"
+ . "s\%\@CC\@\%/usr/local/bin/gcc\%g\n"
+ . "s\%\@CPP\@\%\$CPP\%g\n"
+ . "s\%\@XCFLAGS\@\%\$XCFLAGS\%g\n"
+ . "s\%\@XINCLUDES\@\%\$XINCLUDES\%g\n"
+ . "s\%\@XLIBS\@\%\$XLIBS\%g\n"
+ . "s\%\@XPROGS\@\%\$XPROGS\%g\n"
+ . "s\%\@TCLHDIR\@\%\$TCLHDIR\%g\n"
+ . "s\%\@TCLLIB\@\%\$TCLLIB\%g\n"
+ . "s\%\@TKHDIR\@\%\$TKHDIR\%g\n"
+ . "s\%\@TKLIB\@\%\$TKLIB\%g\n"
+ . "s\%\@PTY_TYPE\@\%\$PTY_TYPE\%g\n"
+ . "s\%\@EVENT_TYPE\@\%\$EVENT_TYPE\%g\n"
+ . "s\%\@SETUID\@\%\$SETUID\%g\n"}
+ ],
+
+ ['modulo',
+ qw(-e '0~2d;='),
+ {IN => "s\%\@CFLAGS\@\%\%g\n"
+ . "s\%\@CPPFLAGS\@\%-I/\%g\n"
+ . "s\%\@CXXFLAGS\@\%-x c++\%g\n"
+ . "s\%\@DEFS\@\%\$DEFS\%g\n"
+ . "s\%\@LDFLAGS\@\%-L/usr/lib\%g\n"
+ . "s\%\@LIBS\@\%-lgnu -lbfd\%g\n"
+ . "s\%\@exec_prefix\@\%\%g\n"
+ . "s\%\@prefix\@\%\$prefix\%g\n"
+ . "s\%\@RANLIB\@\%\$RANLIB\%g\n"
+ . "s\%\@CC\@\%/usr/local/bin/gcc\%g\n"
+ . "s\%\@CPP\@\%\$CPP\%g\n"
+ . "s\%\@XCFLAGS\@\%\$XCFLAGS\%g\n"
+ . "s\%\@XINCLUDES\@\%\$XINCLUDES\%g\n"
+ . "s\%\@XLIBS\@\%\$XLIBS\%g\n"
+ . "s\%\@XPROGS\@\%\$XPROGS\%g\n"
+ . "s\%\@TCLHDIR\@\%\$TCLHDIR\%g\n"
+ . "s\%\@TCLLIB\@\%\$TCLLIB\%g\n"
+ . "s\%\@TKHDIR\@\%\$TKHDIR\%g\n"
+ . "s\%\@TKLIB\@\%\$TKLIB\%g\n"
+ . "s\%\@PTY_TYPE\@\%\$PTY_TYPE\%g\n"
+ . "s\%\@EVENT_TYPE\@\%\$EVENT_TYPE\%g\n"
+ . "s\%\@SETUID\@\%\$SETUID\%g\n"},
+ {OUT => "1\n"
+ . "s\%\@CFLAGS\@\%\%g\n"
+ . "3\n"
+ . "s\%\@CXXFLAGS\@\%-x c++\%g\n"
+ . "5\n"
+ . "s\%\@LDFLAGS\@\%-L/usr/lib\%g\n"
+ . "7\n"
+ . "s\%\@exec_prefix\@\%\%g\n"
+ . "9\n"
+ . "s\%\@RANLIB\@\%\$RANLIB\%g\n"
+ . "11\n"
+ . "s\%\@CPP\@\%\$CPP\%g\n"
+ . "13\n"
+ . "s\%\@XINCLUDES\@\%\$XINCLUDES\%g\n"
+ . "15\n"
+ . "s\%\@XPROGS\@\%\$XPROGS\%g\n"
+ . "17\n"
+ . "s\%\@TCLLIB\@\%\$TCLLIB\%g\n"
+ . "19\n"
+ . "s\%\@TKLIB\@\%\$TKLIB\%g\n"
+ . "21\n"
+ . "s\%\@EVENT_TYPE\@\%\$EVENT_TYPE\%g\n"}
+ ],
+
+ ['middle',
+ qw(-n -e '3,5p'),
+ {IN => q( "...by imposing a tiny bit of order in a communication you are
+ translating, you are carving out a little bit of order in the
+ universe. You will never succeed. Everything will fail and come
+ to an end finally. But you have a chance to carve a little bit
+ of order and maybe even beauty out of the raw materials that
+ surround you everywhere, and I think there is no greater meaning
+ in life."
+
+ Donald L. Philippi, Oct 1930 - Jan 1993
+)},
+ {OUT =>
+q( universe. You will never succeed. Everything will fail and come
+ to an end finally. But you have a chance to carve a little bit
+ of order and maybe even beauty out of the raw materials that
+)}
+ ],
+
+ ['newline-anchor',
+ qw(-f),
+ {IN => q(N
+N
+s/^/X/g
+s/^/X/mg
+s/$/Y/g
+s/$/Y/mg
+)},
+ {IN => "a\n"
+ . "b\n"
+ . "c\n"},
+ {OUT => "XXaY\n"
+ . "XbY\n"
+ . "XcYY\n"}
+ ],
+
+ ['noeolw',
+ qw(-n -f),
+ # The sed program:
+ # generates two output files (in addition to STDOUT)
+ {IN => q(w noeolw.1out
+$ {
+ x
+ w noeolw.1out
+ x
+}
+h
+1,3w noeolw.2out
+p
+p
+)},
+ # The input file (was: noeolw.inp).
+ # NOTE: in the old test, the input file was given twice.
+ # here we specify two (identical) input files.
+ {IN => "This file is unique\n" .
+ "in that it does\n" .
+ "end in a newline."},
+ {IN => "This file is unique\n" .
+ "in that it does\n" .
+ "end in a newline."},
+
+ # The expected STDOUT (was: noeolw.good)
+ {OUT => "This file is unique\n" .
+ "This file is unique\n" .
+ "in that it does\n" .
+ "in that it does\n" .
+ "end in a newline.\n" .
+ "end in a newline.\n" .
+ "This file is unique\n" .
+ "This file is unique\n" .
+ "in that it does\n" .
+ "in that it does\n" .
+ "end in a newline.\n" .
+ "end in a newline."},
+
+ # The expected content of 'noeolw.1out' (was: noeolw.1good)
+ {CMP => [ "This file is unique\n" .
+ "in that it does\n" .
+ "end in a newline.\n" .
+ "This file is unique\n" .
+ "in that it does\n" .
+ "end in a newline.\n" .
+ "in that it does\n",
+ { 'noeolw.1out' => undef }]},
+
+ # The expected content of 'noeolw.2out' (was: noeolw.2good)
+ {CMP => [ "This file is unique\n" .
+ "in that it does\n" .
+ "end in a newline.",
+ { 'noeolw.2out' => undef }]},
+ ],
+
+ ['numsub',
+ qw(-f),
+ {IN => q(
+# the first one matches, the second doesn't
+1s/foo/bar/10
+2s/foo/bar/20
+
+# The second line should be deleted. ssed 3.55-3.58 do not.
+t
+d
+)},
+ {IN =>
+q(foo foo fo oo f oo foo foo foo foo foo foo foo foo foo foo foo foo foo
+foo foo fo oo f oo foo foo foo foo foo foo foo foo foo foo foo foo foo
+)},
+ {OUT => "foo foo fo oo f oo foo foo foo foo "
+ . "foo foo foo bar foo foo foo foo foo\n"}
+ ],
+
+
+ ['numsub2',
+ qw(-n -e 's/a*/b/2'),
+ {IN => "\n"},
+ {OUT => ""}
+ ],
+
+
+ ['numsub3',
+ qw(-n -e 's/^a*/b/2'),
+ {IN => "\n"},
+ {OUT => ""}
+ ],
+
+
+ ['numsub4',
+ qw(-n -e 's/^a*/b/2p'),
+ {IN => "z\n"},
+ {OUT => ""}
+ ],
+
+
+ ['numsub5',
+ qw(-n -e 's/a*/b/3p'),
+ {IN => "z\n"},
+ {OUT => ""}
+ ],
+
+ ['readin',
+ qw(-f),
+ {IN => q(/\.$/r readin.in2
+/too\.$/q
+)},
+ {AUX => { 'readin.in2' => "MOO\n" }},
+ {IN => "``Democracy will not come today, this year,\n"
+ . " nor ever through compromise and fear.\n"
+ . " I have as much right as the other fellow has\n"
+ . " to stand on my two feet and own the land.\n"
+ . " I tire so of hearing people say\n"
+ . " let things take their course,\n"
+ . " tomorrow is another day.\n"
+ . " I do not need my freedom when I'm dead.\n"
+ . " I cannot live on tomorrow's bread.\n"
+ . " Freedom is a strong seed\n"
+ . " planted in a great need.\n"
+ . " I live here, too.\n"
+ . " I want freedom just as you.''\n"
+ . " ``The Weary Blues'', Langston Hughes\n"},
+ {OUT => "``Democracy will not come today, this year,\n"
+ . " nor ever through compromise and fear.\n"
+ . "MOO\n"
+ . " I have as much right as the other fellow has\n"
+ . " to stand on my two feet and own the land.\n"
+ . "MOO\n"
+ . " I tire so of hearing people say\n"
+ . " let things take their course,\n"
+ . " tomorrow is another day.\n"
+ . "MOO\n"
+ . " I do not need my freedom when I'm dead.\n"
+ . "MOO\n"
+ . " I cannot live on tomorrow's bread.\n"
+ . "MOO\n"
+ . " Freedom is a strong seed\n"
+ . " planted in a great need.\n"
+ . "MOO\n"
+ . " I live here, too.\n"
+ . "MOO\n"}
+ ],
+
+
+ ['sep',
+ # inspired by an autoconf generated configure script.
+ qw(-f),
+ {IN => q(s%/[^/][^/]*$%%
+s%[\/][^\/][^\/]*$%%
+s,.*[^\/],,
+)},
+ {IN => "miss mary mack mack//mack/ran down/the track track track\n"
+ . "slashes\aren't%used enough/in/casual-conversation///\n"
+ . "possibly sentences would be more attractive if they ended"
+ . "in two slashes//\n"},
+ {OUT => "\n"
+ . "///\n"
+ . "//\n"}
+ ],
+
+ ['subwrite',
+ # test s///w option
+ qw(-e 's/you/YoU/w subwrite.wout'),
+ {IN => "Not some church, and not the state,\n"
+ . "Not some dark capricious fate.\n"
+ . "Who you are, and when you lose,\n"
+ . "Comes only from the things you choose.\n"},
+ # The expected STDOUT
+ {OUT => "Not some church, and not the state,\n"
+ . "Not some dark capricious fate.\n"
+ . "Who YoU are, and when you lose,\n"
+ . "Comes only from the things YoU choose.\n"},
+ # The expected content of 'writeout.wout'
+ {CMP => [ "Who YoU are, and when you lose,\n"
+ . "Comes only from the things YoU choose.\n",
+ { 'subwrite.wout' => undef }]}
+ ],
+
+ ['writeout',
+ # Test 'w' command
+ qw(-e '/^Facts ar/w writeout.wout'),
+ {IN => "Facts are simple and facts are straight\n"
+ . "Facts are lazy and facts are late\n"
+ . "Facts all come with points of view\n"
+ . "Facts don't do what I want them to\n"},
+ # The expected STDOUT
+ {OUT => "Facts are simple and facts are straight\n"
+ . "Facts are lazy and facts are late\n"
+ . "Facts all come with points of view\n"
+ . "Facts don't do what I want them to\n"},
+ # The expected content of 'writeout.wout'
+ {CMP => [ "Facts are simple and facts are straight\n"
+ . "Facts are lazy and facts are late\n",
+ { 'writeout.wout' => undef }]}
+ ],
+
+ ['xabcx',
+ # from the ChangeLog (Fri May 21 1993)
+ # Regex address with custom character (\xREGEXx)
+ qw(-e '\xfeetxs/blue/too/'),
+ {IN => "roses are red\n"
+ . "violets are blue\n"
+ . "my feet are cold\n"
+ . "your feet are blue\n"},
+ {OUT => "roses are red\n"
+ . "violets are blue\n"
+ . "my feet are cold\n"
+ . "your feet are too\n"}
+ ],
+
+
+ ['xbxcx',
+ # from the ChangeLog (Wed Sep 5 2001)
+ qw(-e 's/a*/x/g'),
+ {IN => "\n"
+ . "b\n"
+ . "bc\n"
+ . "bac\n"
+ . "baac\n"
+ . "baaac\n"
+ . "baaaac\n"},
+ {OUT => "x\n"
+ . "xbx\n"
+ . "xbxcx\n"
+ . "xbxcx\n"
+ . "xbxcx\n"
+ . "xbxcx\n"
+ . "xbxcx\n"}
+ ],
+
+ ['xbxcx3',
+ # Test s///N replacements (GNU extension)
+ qw(-e 's/a*/x/3'),
+ {IN => "\n"
+ . "b\n"
+ . "bc\n"
+ . "bac\n"
+ . "baac\n"
+ . "baaac\n"
+ . "baaaac\n"},
+ {OUT => "\n"
+ . "b\n"
+ . "bcx\n"
+ . "bacx\n"
+ . "baacx\n"
+ . "baaacx\n"
+ . "baaaacx\n"}
+ ],
+
+
+ # Four backslashes (2 pairs of "\\") to pass through two interpolations:
+ # once in Perl, then the shell command line argument.
+ # sed will see one backslash character in the s/// command.
+ ['bug30794_1', "s/z/\\\\x5cA/", {IN=>'z'}, {OUT => "\\A"}],
+ ['bug30794_2', "s/z/\\\\x5c/", {IN=>'z'}, {OUT => "\\"}],
+ ['bug30794_3', "s/z/\\\\x5c1/", {IN=>'z'}, {OUT => "\\1"}],
+ );
+
+my $save_temps = $ENV{SAVE_TEMPS};
+my $verbose = $ENV{VERBOSE};
+
+my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose);
+exit $fail;
diff --git a/testsuite/modulo.good b/testsuite/modulo.good
deleted file mode 100644
index b42f1ab..0000000
--- a/testsuite/modulo.good
+++ /dev/null
@@ -1,22 +0,0 @@
-1
-s%@CFLAGS@%%g
-3
-s%@CXXFLAGS@%-x c++%g
-5
-s%@LDFLAGS@%-L/usr/lib%g
-7
-s%@exec_prefix@%%g
-9
-s%@RANLIB@%$RANLIB%g
-11
-s%@CPP@%$CPP%g
-13
-s%@XINCLUDES@%$XINCLUDES%g
-15
-s%@XPROGS@%$XPROGS%g
-17
-s%@TCLLIB@%$TCLLIB%g
-19
-s%@TKLIB@%$TKLIB%g
-21
-s%@EVENT_TYPE@%$EVENT_TYPE%g
diff --git a/testsuite/modulo.inp b/testsuite/modulo.inp
deleted file mode 100644
index f349b76..0000000
--- a/testsuite/modulo.inp
+++ /dev/null
@@ -1,22 +0,0 @@
-s%@CFLAGS@%%g
-s%@CPPFLAGS@%-I/%g
-s%@CXXFLAGS@%-x c++%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%-L/usr/lib%g
-s%@LIBS@%-lgnu -lbfd%g
-s%@exec_prefix@%%g
-s%@prefix@%$prefix%g
-s%@RANLIB@%$RANLIB%g
-s%@CC@%/usr/local/bin/gcc%g
-s%@CPP@%$CPP%g
-s%@XCFLAGS@%$XCFLAGS%g
-s%@XINCLUDES@%$XINCLUDES%g
-s%@XLIBS@%$XLIBS%g
-s%@XPROGS@%$XPROGS%g
-s%@TCLHDIR@%$TCLHDIR%g
-s%@TCLLIB@%$TCLLIB%g
-s%@TKHDIR@%$TKHDIR%g
-s%@TKLIB@%$TKLIB%g
-s%@PTY_TYPE@%$PTY_TYPE%g
-s%@EVENT_TYPE@%$EVENT_TYPE%g
-s%@SETUID@%$SETUID%g
diff --git a/testsuite/modulo.sed b/testsuite/modulo.sed
deleted file mode 100644
index 68b4930..0000000
--- a/testsuite/modulo.sed
+++ /dev/null
@@ -1 +0,0 @@
-0~2d;=
diff --git a/testsuite/newjis.good b/testsuite/newjis.good
deleted file mode 100644
index 4de16b0..0000000
--- a/testsuite/newjis.good
+++ /dev/null
@@ -1,4 +0,0 @@
-$B$H$J$j$NM9JX6I$K(B
-$B$?$F$+$1$?$N$O(B
-$B$?$F$+$1$?$+$C$?$+$i(B
-$B$?$F$+$1$?!#(B
diff --git a/testsuite/newjis.inp b/testsuite/newjis.inp
deleted file mode 100644
index fc710f6..0000000
--- a/testsuite/newjis.inp
+++ /dev/null
@@ -1,4 +0,0 @@
-$B$H$J$j$N$?$1$,$-$K(B
-$B$?$F$+$1$?$N$O(B
-$B$?$F$+$1$?$+$C$?$+$i(B
-$B$?$F$+$1$?!#(B
diff --git a/testsuite/newjis.sed b/testsuite/newjis.sed
deleted file mode 100644
index 1bc941d..0000000
--- a/testsuite/newjis.sed
+++ /dev/null
@@ -1 +0,0 @@
-s/$?$1$,$-/M9JX6I/
diff --git a/testsuite/newjis.sh b/testsuite/newjis.sh
new file mode 100755
index 0000000..a1f4ace
--- /dev/null
+++ b/testsuite/newjis.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+# Test runner for newjis
+
+# Copyright (C) 2017-2018 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 <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+# Input file. \033 is ASCII escape (0x1B).
+{
+ printf '\033$B$H$J$j$N$?$1$,$-$K\033(B\n' ;
+ printf '\033$B$?$F$+$1$?$N$O\033(B\n' ;
+ printf '\033$B$?$F$+$1$?$+$C$?$+$i\033(B\n' ;
+ printf '\033$B$?$F$+$1$?!#\033(B\n' ;
+} > newjis-inp || framework_failure_
+
+# The expected output.
+{
+ printf '\033$B$H$J$j$NM9JX6I$K\033(B\n';
+ printf '\033$B$?$F$+$1$?$N$O\033(B\n' ;
+ printf '\033$B$?$F$+$1$?$+$C$?$+$i\033(B\n' ;
+ printf '\033$B$?$F$+$1$?!#\033(B\n' ;
+} > newjis-exp || framework_failure_
+
+# The sed program.
+cat <<\EOF > newjis.sed || framework_failure_
+s/$?$1$,$-/M9JX6I/
+EOF
+
+sed -f newjis.sed < newjis-inp > newjis-out || fail=1
+remove_cr_inplace newjis-out
+compare newjis-exp newjis-out || fail=1
+
+
+Exit $fail
diff --git a/testsuite/newline-anchor.good b/testsuite/newline-anchor.good
deleted file mode 100644
index 5742735..0000000
--- a/testsuite/newline-anchor.good
+++ /dev/null
@@ -1,3 +0,0 @@
-XXaY
-XbY
-XcYY
diff --git a/testsuite/newline-anchor.inp b/testsuite/newline-anchor.inp
deleted file mode 100644
index de98044..0000000
--- a/testsuite/newline-anchor.inp
+++ /dev/null
@@ -1,3 +0,0 @@
-a
-b
-c
diff --git a/testsuite/newline-anchor.sed b/testsuite/newline-anchor.sed
deleted file mode 100644
index b3d2de1..0000000
--- a/testsuite/newline-anchor.sed
+++ /dev/null
@@ -1,6 +0,0 @@
-N
-N
-s/^/X/g
-s/^/X/mg
-s/$/Y/g
-s/$/Y/mg
diff --git a/testsuite/newline-dfa-bug.sh b/testsuite/newline-dfa-bug.sh
index 91f1ed1..af31ce5 100755
--- a/testsuite/newline-dfa-bug.sh
+++ b/testsuite/newline-dfa-bug.sh
@@ -2,7 +2,7 @@
# sed may access to uninitialized memory if transit to 15th dfa state
# with newline. This bug affected sed version 4.3.
-# Copyright (C) 2017 Free Software Foundation, Inc.
+# Copyright (C) 2017-2018 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
@@ -15,7 +15,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/noeol.good b/testsuite/noeol.good
deleted file mode 100644
index fa5fc0e..0000000
--- a/testsuite/noeol.good
+++ /dev/null
@@ -1,3 +0,0 @@
-This file is uniquewakuwaku
-in that it doeswakuwaku
-end in a newline.wakuwaku \ No newline at end of file
diff --git a/testsuite/noeol.inp b/testsuite/noeol.inp
deleted file mode 100644
index c4cf6a1..0000000
--- a/testsuite/noeol.inp
+++ /dev/null
@@ -1,3 +0,0 @@
-This file is unique
-in that it does
-end in a newline. \ No newline at end of file
diff --git a/testsuite/noeol.sed b/testsuite/noeol.sed
deleted file mode 100644
index bea7110..0000000
--- a/testsuite/noeol.sed
+++ /dev/null
@@ -1 +0,0 @@
-s/$/wakuwaku/g
diff --git a/testsuite/noeolw.1good b/testsuite/noeolw.1good
deleted file mode 100644
index f0f44d9..0000000
--- a/testsuite/noeolw.1good
+++ /dev/null
@@ -1,7 +0,0 @@
-This file is unique
-in that it does
-end in a newline.
-This file is unique
-in that it does
-end in a newline.
-in that it does
diff --git a/testsuite/noeolw.2good b/testsuite/noeolw.2good
deleted file mode 100644
index c4cf6a1..0000000
--- a/testsuite/noeolw.2good
+++ /dev/null
@@ -1,3 +0,0 @@
-This file is unique
-in that it does
-end in a newline. \ No newline at end of file
diff --git a/testsuite/noeolw.good b/testsuite/noeolw.good
deleted file mode 100644
index e76509a..0000000
--- a/testsuite/noeolw.good
+++ /dev/null
@@ -1,12 +0,0 @@
-This file is unique
-This file is unique
-in that it does
-in that it does
-end in a newline.
-end in a newline.
-This file is unique
-This file is unique
-in that it does
-in that it does
-end in a newline.
-end in a newline. \ No newline at end of file
diff --git a/testsuite/noeolw.sed b/testsuite/noeolw.sed
deleted file mode 100644
index 0924619..0000000
--- a/testsuite/noeolw.sed
+++ /dev/null
@@ -1,10 +0,0 @@
-w noeolw.1out
-$ {
- x
- w noeolw.1out
- x
-}
-h
-1,3w noeolw.2out
-p
-p
diff --git a/testsuite/normalize-text.sh b/testsuite/normalize-text.sh
index e3c0610..baae97d 100644
--- a/testsuite/normalize-text.sh
+++ b/testsuite/normalize-text.sh
@@ -4,7 +4,7 @@
# \dNNN \xNN \oNNN - tested in 'convert-number.sh'
# character-classes in POSIX mode - tested in 'posix-char-class.sh'
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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,7 +17,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/nulldata.sh b/testsuite/nulldata.sh
index e2be647..a8a0114 100755
--- a/testsuite/nulldata.sh
+++ b/testsuite/nulldata.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test -z/--null-data option
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/numsub.good b/testsuite/numsub.good
deleted file mode 100644
index 9bdaaef..0000000
--- a/testsuite/numsub.good
+++ /dev/null
@@ -1 +0,0 @@
-foo foo fo oo f oo foo foo foo foo foo foo foo bar foo foo foo foo foo
diff --git a/testsuite/numsub.inp b/testsuite/numsub.inp
deleted file mode 100644
index 6924c98..0000000
--- a/testsuite/numsub.inp
+++ /dev/null
@@ -1,2 +0,0 @@
-foo foo fo oo f oo foo foo foo foo foo foo foo foo foo foo foo foo foo
-foo foo fo oo f oo foo foo foo foo foo foo foo foo foo foo foo foo foo
diff --git a/testsuite/numsub.sed b/testsuite/numsub.sed
deleted file mode 100644
index 4a96cad..0000000
--- a/testsuite/numsub.sed
+++ /dev/null
@@ -1,7 +0,0 @@
-# the first one matches, the second doesn't
-1s/foo/bar/10
-2s/foo/bar/20
-
-# The second line should be deleted. ssed 3.55-3.58 do not.
-t
-d
diff --git a/testsuite/numsub2.good b/testsuite/numsub2.good
deleted file mode 100644
index e69de29..0000000
--- a/testsuite/numsub2.good
+++ /dev/null
diff --git a/testsuite/numsub2.inp b/testsuite/numsub2.inp
deleted file mode 100644
index 8b13789..0000000
--- a/testsuite/numsub2.inp
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/testsuite/numsub2.sed b/testsuite/numsub2.sed
deleted file mode 100644
index dddead9..0000000
--- a/testsuite/numsub2.sed
+++ /dev/null
@@ -1 +0,0 @@
-s/a*/b/2
diff --git a/testsuite/numsub3.good b/testsuite/numsub3.good
deleted file mode 100644
index e69de29..0000000
--- a/testsuite/numsub3.good
+++ /dev/null
diff --git a/testsuite/numsub3.inp b/testsuite/numsub3.inp
deleted file mode 100644
index 8b13789..0000000
--- a/testsuite/numsub3.inp
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/testsuite/numsub3.sed b/testsuite/numsub3.sed
deleted file mode 100644
index 0ea96a4..0000000
--- a/testsuite/numsub3.sed
+++ /dev/null
@@ -1 +0,0 @@
-s/^a*/b/2
diff --git a/testsuite/numsub4.good b/testsuite/numsub4.good
deleted file mode 100644
index e69de29..0000000
--- a/testsuite/numsub4.good
+++ /dev/null
diff --git a/testsuite/numsub4.inp b/testsuite/numsub4.inp
deleted file mode 100644
index b680253..0000000
--- a/testsuite/numsub4.inp
+++ /dev/null
@@ -1 +0,0 @@
-z
diff --git a/testsuite/numsub4.sed b/testsuite/numsub4.sed
deleted file mode 100644
index e76c5bf..0000000
--- a/testsuite/numsub4.sed
+++ /dev/null
@@ -1 +0,0 @@
-s/^a*/b/2p
diff --git a/testsuite/numsub5.good b/testsuite/numsub5.good
deleted file mode 100644
index e69de29..0000000
--- a/testsuite/numsub5.good
+++ /dev/null
diff --git a/testsuite/numsub5.inp b/testsuite/numsub5.inp
deleted file mode 100644
index b680253..0000000
--- a/testsuite/numsub5.inp
+++ /dev/null
@@ -1 +0,0 @@
-z
diff --git a/testsuite/numsub5.sed b/testsuite/numsub5.sed
deleted file mode 100644
index d8ecda2..0000000
--- a/testsuite/numsub5.sed
+++ /dev/null
@@ -1 +0,0 @@
-s/a*/b/3p
diff --git a/testsuite/panic-tests.sh b/testsuite/panic-tests.sh
index 0cacd17..76146f9 100644
--- a/testsuite/panic-tests.sh
+++ b/testsuite/panic-tests.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Exercise some panic stops
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
@@ -87,7 +87,7 @@ EOF
ttydev=no-such-file
type tty >/dev/null 2>&1 && ttydev=$(tty 2>/dev/null)
-if test -w "$ttydev" ; then
+if test -w "$ttydev" && test -r "$ttydev" ; then
returns_ 4 sed -i = "$ttydev" 2>err-tty || fail=1
# remove the actual terminal device name (using sed itself...)
diff --git a/testsuite/posix-char-class.sh b/testsuite/posix-char-class.sh
index d0a41f1..1d2f6f3 100644
--- a/testsuite/posix-char-class.sh
+++ b/testsuite/posix-char-class.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test character-class definitions in POSIX mode.
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# NOTE:
# In GNU Extension mode, all text is normalized (e.g. backslash-X combinations).
diff --git a/testsuite/posix-mode-ERE.sh b/testsuite/posix-mode-ERE.sh
new file mode 100644
index 0000000..8c2afb2
--- /dev/null
+++ b/testsuite/posix-mode-ERE.sh
@@ -0,0 +1,54 @@
+#!/bin/sh
+# Ensure extended regular expressions work in posix mode
+
+# Copyright (C) 2017-2018 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 <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+printf "hi+\n" > in1 || framework_failure_
+
+printf "{hi+}\n" > exp-special || framework_failure_
+printf "h{i+}\n" > exp-literal || framework_failure_
+
+# '+' is special in ERE
+sed -E 's/(.+)/{\1}/' in1 > out0 || fail=1
+compare_ exp-special out0 || fail=1
+
+# '+' is special in ERE, even if --posix is used.
+# sed-4.4 and earlier did not treat it as special (bug#26409).
+sed --posix -E 's/(.+)/{\1}/' in1 > out1 || fail=1
+compare_ exp-special out1 || fail=1
+
+# Escape the '+' it to remove special meaning in ERE
+sed --posix -E 's/(.\+)/{\1}/' in1 > out2 || fail=1
+compare_ exp-literal out2 || fail=1
+
+# with BRE and --posix, '+' should have no special meaning
+sed --posix 's/\(.+\)/{\1}/' in1 > out3 || fail=1
+compare_ exp-literal out3 || fail=1
+
+# with BRE without --posix, '+' should have no special meaning
+sed 's/\(.+\)/{\1}/' in1 > out4 || fail=1
+compare_ exp-literal out4 || fail=1
+
+# with BRE without --posix, '\+' is special (GNU extension)
+sed 's/\(.\+\)/{\1}/' in1 > out5 || fail=1
+compare_ exp-special out5 || fail=1
+
+
+Exit $fail
diff --git a/testsuite/posix-mode-N.sh b/testsuite/posix-mode-N.sh
index 36306bf..c2fe840 100755
--- a/testsuite/posix-mode-N.sh
+++ b/testsuite/posix-mode-N.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test 'N' command with/without posix conformity
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/posix-mode-addr.sh b/testsuite/posix-mode-addr.sh
index dd79a3a..d335b17 100644
--- a/testsuite/posix-mode-addr.sh
+++ b/testsuite/posix-mode-addr.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure GNU address extensions are rejected in posix mode
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/posix-mode-bad-ref.sh b/testsuite/posix-mode-bad-ref.sh
index f225cd2..412e2c3 100755
--- a/testsuite/posix-mode-bad-ref.sh
+++ b/testsuite/posix-mode-bad-ref.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test non-posix-conforming gnu extensions when using --posix.
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
@@ -28,7 +28,7 @@ EOF
returns_ 1 sed 's/abc/\1/g' 2>err < /dev/null || fail=1
compare_ exp-err err || fail=1
-# Invalid referencs are silently ignored in posix mode
+# Invalid references are silently ignored in posix mode
sed --posix 's/abc/\1/g' < /dev/null || fail=1
Exit $fail
diff --git a/testsuite/posix-mode-s.sh b/testsuite/posix-mode-s.sh
index d76636a..cf0a708 100644
--- a/testsuite/posix-mode-s.sh
+++ b/testsuite/posix-mode-s.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure GNU extensions are rejected in posix mode
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/range-overlap.sh b/testsuite/range-overlap.sh
index 9d80bf8..9a21285 100755
--- a/testsuite/range-overlap.sh
+++ b/testsuite/range-overlap.sh
@@ -2,7 +2,7 @@
# Verify that even with overlapping ranges of line numbers,
# only the selected lines are affected.
-# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+# Copyright (C) 2015-2018 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
@@ -15,7 +15,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/readin.good b/testsuite/readin.good
deleted file mode 100644
index 479a444..0000000
--- a/testsuite/readin.good
+++ /dev/null
@@ -1,19 +0,0 @@
-``Democracy will not come today, this year,
- nor ever through compromise and fear.
-MOO
- I have as much right as the other fellow has
- to stand on my two feet and own the land.
-MOO
- I tire so of hearing people say
- let things take their course,
- tomorrow is another day.
-MOO
- I do not need my freedom when I'm dead.
-MOO
- I cannot live on tomorrow's bread.
-MOO
- Freedom is a strong seed
- planted in a great need.
-MOO
- I live here, too.
-MOO
diff --git a/testsuite/readin.inp b/testsuite/readin.inp
deleted file mode 100644
index 95fb969..0000000
--- a/testsuite/readin.inp
+++ /dev/null
@@ -1,14 +0,0 @@
-``Democracy will not come today, this year,
- nor ever through compromise and fear.
- I have as much right as the other fellow has
- to stand on my two feet and own the land.
- I tire so of hearing people say
- let things take their course,
- tomorrow is another day.
- I do not need my freedom when I'm dead.
- I cannot live on tomorrow's bread.
- Freedom is a strong seed
- planted in a great need.
- I live here, too.
- I want freedom just as you.''
- ``The Weary Blues'', Langston Hughes
diff --git a/testsuite/readin.sed b/testsuite/readin.sed
deleted file mode 100644
index fac07a4..0000000
--- a/testsuite/readin.sed
+++ /dev/null
@@ -1,2 +0,0 @@
-/\.$/r readin.in2
-/too\.$/q
diff --git a/testsuite/recall.good b/testsuite/recall.good
deleted file mode 100644
index 230cc08..0000000
--- a/testsuite/recall.good
+++ /dev/null
@@ -1,7 +0,0 @@
-eeefff
-Xeefff
-XYefff
-XYeYff
-XYeYYf
-XYeYYY
-XYeYYY
diff --git a/testsuite/recall.inp b/testsuite/recall.inp
deleted file mode 100644
index ef34b7e..0000000
--- a/testsuite/recall.inp
+++ /dev/null
@@ -1 +0,0 @@
-eeefff
diff --git a/testsuite/recall.sed b/testsuite/recall.sed
deleted file mode 100644
index c1d7f9c..0000000
--- a/testsuite/recall.sed
+++ /dev/null
@@ -1,7 +0,0 @@
-# Check that the empty regex recalls the last *executed* regex,
-# not the last *compiled* regex
-p
-s/e/X/p
-:x
-s//Y/p
-/f/bx
diff --git a/testsuite/recall2.good b/testsuite/recall2.good
deleted file mode 100644
index 74c01ea..0000000
--- a/testsuite/recall2.good
+++ /dev/null
@@ -1 +0,0 @@
->abb<||>abbbb<
diff --git a/testsuite/recall2.inp b/testsuite/recall2.inp
deleted file mode 100644
index 9046d59..0000000
--- a/testsuite/recall2.inp
+++ /dev/null
@@ -1 +0,0 @@
-ababb||abbbabbbb
diff --git a/testsuite/recall2.sed b/testsuite/recall2.sed
deleted file mode 100644
index f668773..0000000
--- a/testsuite/recall2.sed
+++ /dev/null
@@ -1,5 +0,0 @@
-# Starting from sed 4.1.3, regexes are compiled with REG_NOSUB
-# if they are used in an address, so that the matcher does not
-# have to obey leftmost-longest. The tricky part is to recompile
-# them if they are then used in a substitution.
-/\(ab*\)\+/ s//>\1</g
diff --git a/testsuite/recursive-escape-c.sh b/testsuite/recursive-escape-c.sh
index 3d26532..cc29741 100644
--- a/testsuite/recursive-escape-c.sh
+++ b/testsuite/recursive-escape-c.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# test \c escaping
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/regex-errors.sh b/testsuite/regex-errors.sh
index 6c41206..454f7c0 100644
--- a/testsuite/regex-errors.sh
+++ b/testsuite/regex-errors.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Exercise regex_compile errors
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/regex-max-int.sh b/testsuite/regex-max-int.sh
new file mode 100755
index 0000000..218a48d
--- /dev/null
+++ b/testsuite/regex-max-int.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+# Test regex on input buffers larger than 2GB
+
+# Copyright (C) 2018 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 <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+very_expensive_
+print_ver_ sed
+
+fail=0
+
+
+# Create a file larger than 2GB and containing a single line
+# (resulting in a regex match against the entire file)
+#
+# This is a "very expensive" test, we can assume it is only run by
+# developers or advanced users, and we can assume truncate(1) exists.
+#
+# On most modern file-systems, the file will be sparse and would not
+# consume 2GB of physical storage.
+
+truncate -s 1G input || framework_failure_
+printf aaaa >> input || framework_failure_
+truncate -s +1G input || framework_failure_
+printf 'a\n' >> input || framework_failure_
+
+# The expected error message
+cat <<\EOF > exp-err1 || framework_failure_
+sed: regex input buffer length larger than INT_MAX
+EOF
+
+
+# Before sed-4.5, this was silently a no-op: would not perform the subsitution
+# but would not indicate any error either (https://bugs.gnu.org/30520).
+# Exit code 4 is "panic".
+returns_ 4 sed 's/a/b/g' input >/dev/null 2>err1 || fail=1
+compare_ exp-err1 err1 || fail=1
+
+Exit $fail
diff --git a/testsuite/runptests.c b/testsuite/runptests.c
deleted file mode 100644
index 0510b31..0000000
--- a/testsuite/runptests.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/* POSIX regex testsuite from IEEE 2003.2.
- Copyright (C) 1998-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA. */
-
-#include <config.h>
-
-#include <sys/types.h>
-#include <regex.h>
-#include <stdio.h>
-#include <string.h>
-
-/* Data structure to describe the tests. */
-struct test
-{
- int start;
- int end;
- const char *reg;
- const char *str;
- int options;
-} tests[] =
-{
-#include "ptestcases.h"
-};
-
-
-int
-main (int argc, char *argv[])
-{
- size_t cnt;
- int errors = 0;
-
- for (cnt = 0; cnt < sizeof (tests) / sizeof (tests[0]); ++cnt)
- if (tests[cnt].str == NULL)
- {
- printf ("\n%s\n%.*s\n", tests[cnt].reg,
- (int) strlen (tests[cnt].reg),
- "-----------------------------------------------------");
- }
- else if (tests[cnt].reg == NULL)
- printf ("!!! %s\n", tests[cnt].str);
- else
- {
- regex_t re;
- regmatch_t match[20];
- int err;
-
- printf ("regexp: \"%s\", string: \"%s\" -> ", tests[cnt].reg,
- tests[cnt].str);
-
- /* Compile the expression. */
- err = regcomp (&re, tests[cnt].reg, tests[cnt].options);
- if (err != 0)
- {
- if (tests[cnt].start == -2)
- puts ("compiling failed, OK");
- else
- {
- char buf[100];
- regerror (err, &re, buf, sizeof (buf));
- printf ("FAIL: %s\n", buf);
- ++errors;
- }
-
- continue;
- }
- else if (tests[cnt].start == -2)
- {
- puts ("compiling suceeds, FAIL");
- errors++;
- continue;
- }
-
- /* Run the actual test. */
- err = regexec (&re, tests[cnt].str, 20, match, 0);
-
- if (err != 0)
- {
- if (tests[cnt].start == -1)
- puts ("no match, OK");
- else
- {
- puts ("no match, FAIL");
- ++errors;
- }
- }
- else
- {
- if (match[0].rm_so == 0 && tests[cnt].start == 0
- && match[0].rm_eo == 0 && tests[cnt].end == 0)
- puts ("match, OK");
- else if (match[0].rm_so + 1 == tests[cnt].start
- && match[0].rm_eo == tests[cnt].end)
- puts ("match, OK");
- else
- {
- printf ("wrong match (%d to %d): FAIL\n",
- match[0].rm_so, match[0].rm_eo);
- ++errors;
- }
- }
-
- /* Free all resources. */
- regfree (&re);
- }
-
- printf ("\n%u tests, %d errors\n", (int) cnt, errors);
-
- return errors != 0;
-}
diff --git a/testsuite/runtest b/testsuite/runtest
deleted file mode 100755
index 60f53ef..0000000
--- a/testsuite/runtest
+++ /dev/null
@@ -1,25 +0,0 @@
-#! /bin/sh
-
-# The test harness, used invoked through LOG_COMPILER
-# in testsuite/local.mk .
-# Current directory is '$top_builddir'.
-
-: ${MAKE=make}
-: ${srcdir=.}
-: ${SED="./sed/sed"}
-
-makefile="${abs_top_srcdir}/testsuite/Makefile.tests"
-
-# Strip the directory './testsuite/' from the test name.
-test=`echo "$@"| sed 's,.*/,,'`
-
-# Skip the utility programs, they are not standalone tests
-test "$test" = get-mb-cur-max \
- || test "$test" = test-mbrtowc \
- && exit 77
-
-exitcode=0
-$MAKE SED="$SED" srcdir="$srcdir/testsuite" -f "$makefile" $test || exitcode=$?
-test -f $test.skip && exitcode=77
-rm -f $test.skip
-exit $exitcode
diff --git a/testsuite/runtests.c b/testsuite/runtests.c
deleted file mode 100644
index 3db7a77..0000000
--- a/testsuite/runtests.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/***********************************************************
-
-Copyright 1995 by Tom Lord
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of the copyright holder not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-Tom Lord DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-EVENT SHALL TOM LORD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
-USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
-OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-
-******************************************************************/
-
-#include <config.h>
-
-#include <sys/types.h>
-#include <regex.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-struct a_test
-{
- int expected;
- const char * pattern;
- const unsigned char * data;
-};
-
-static const struct a_test the_tests[] =
-{
-#include "testcases.h"
- {-1, 0, 0}
-};
-
-
-
-
-static int
-run_a_test (int id, const struct a_test * t)
-{
- static const char * last_pattern = 0;
- static regex_t r;
- int err;
- char errmsg[100];
- int x;
- regmatch_t regs[10];
-
- if (!last_pattern || strcmp (last_pattern, t->pattern))
- {
- if (last_pattern)
- regfree (&r);
- last_pattern = t->pattern;
- err = regcomp (&r, t->pattern, REG_EXTENDED);
- if (err)
- {
- if (t->expected == 2)
- {
- puts (" OK.");
- return 0;
- }
- if (last_pattern)
- regfree (&r);
- last_pattern = NULL;
- regerror (err, &r, errmsg, 100);
- printf (" FAIL: %s.\n", errmsg);
- return 1;
- }
- else if (t->expected == 2)
- {
- printf ("test %d\n", id);
- printf ("pattern \"%s\" successfull compilation not expected\n",
- t->pattern);
- return 1;
- }
- }
-
- for (x = 0; x < 10; ++x)
- regs[x].rm_so = regs[x].rm_eo = -1;
-
- err = regexec (&r, t->data, 10, regs, 0);
-
- if (err != t->expected)
- {
- printf ("test %d\n", id);
- printf ("pattern \"%s\" data \"%s\" wanted %d got %d\n",
- t->pattern, t->data, t->expected, err);
- for (x = 0; x < 10; ++x)
- if (regs[x].rm_so != -1)
- printf ("reg %d == (%d, %d) %.*s\n",
- x,
- regs[x].rm_so,
- regs[x].rm_eo,
- regs[x].rm_eo - regs[x].rm_so,
- t->data + regs[x].rm_so);
- return 1;
- }
- puts (" OK.");
- return 0;
-}
-
-
-
-int
-main (int argc, char * argv[])
-{
- int x;
- int lo;
- int hi;
- int res = 0;
-
- lo = 0;
- hi = (sizeof (the_tests) / sizeof (the_tests[0])) - 1;
-
- if (argc > 1)
- {
- lo = atoi (argv[1]);
- hi = lo + 1;
-
- if (argc > 2)
- hi = atoi (argv[2]);
- }
-
- for (x = lo; x < hi; ++x)
- {
- printf ("#%d:", x);
- res |= run_a_test (x, &the_tests[x]);
- }
- return res != 0;
-}
diff --git a/testsuite/sandbox.sh b/testsuite/sandbox.sh
index 3a2f551..8a296ee 100755
--- a/testsuite/sandbox.sh
+++ b/testsuite/sandbox.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test --sandbox mode
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/sep.good b/testsuite/sep.good
deleted file mode 100644
index 7db0e1e..0000000
--- a/testsuite/sep.good
+++ /dev/null
@@ -1,3 +0,0 @@
-
-///
-//
diff --git a/testsuite/sep.inp b/testsuite/sep.inp
deleted file mode 100644
index 5795f4b..0000000
--- a/testsuite/sep.inp
+++ /dev/null
@@ -1,3 +0,0 @@
-miss mary mack mack//mack/ran down/the track track track
-slashes\aren't%used enough/in/casual-conversation///
-possibly sentences would be more attractive if they ended in two slashes//
diff --git a/testsuite/sep.sed b/testsuite/sep.sed
deleted file mode 100644
index 4864b81..0000000
--- a/testsuite/sep.sed
+++ /dev/null
@@ -1,4 +0,0 @@
-# inspired by an autoconf generated configure script.
-s%/[^/][^/]*$%%
-s%[\/][^\/][^\/]*$%%
-s,.*[^\/],,
diff --git a/testsuite/space.good b/testsuite/space.good
deleted file mode 100644
index 9b267aa..0000000
--- a/testsuite/space.good
+++ /dev/null
@@ -1,2 +0,0 @@
-Hello_World_!
-SecondXXine__of_tests
diff --git a/testsuite/space.inp b/testsuite/space.inp
deleted file mode 100644
index 83b0adb..0000000
--- a/testsuite/space.inp
+++ /dev/null
@@ -1,2 +0,0 @@
-Hello World !
-Second_line_ of tests
diff --git a/testsuite/space.sed b/testsuite/space.sed
deleted file mode 100644
index 0bfa522..0000000
--- a/testsuite/space.sed
+++ /dev/null
@@ -1 +0,0 @@
-s/_\S/XX/g;s/\s/_/g
diff --git a/testsuite/stdin-prog.sh b/testsuite/stdin-prog.sh
index 9597503..927b643 100644
--- a/testsuite/stdin-prog.sh
+++ b/testsuite/stdin-prog.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test program file from STDIN
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/stdin.sh b/testsuite/stdin.sh
new file mode 100755
index 0000000..c34e074
--- /dev/null
+++ b/testsuite/stdin.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# Test runner for old 'stdin' test
+
+# Copyright (C) 2017-2018 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 <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+
+cat << \EOF > stdin-in || framework_failure_
+foo foo fo oo f oo foo foo foo foo foo foo foo foo foo foo foo foo foo
+foo foo fo oo f oo foo foo foo foo foo foo foo foo foo foo foo foo foo
+EOF
+
+# This checks for a bug in 3.02 and 3.02.80
+( sed d ; sed G ) < stdin-in > stdin-out1 || fail=1
+cat stdin | ( sed d ; sed G ) > stdin-out2 || fail=1
+
+remove_cr_inplace stdin-out1
+remove_cr_inplace stdin-out2
+
+compare stdin-out1 stdin-out2 || fail=1
+
+Exit $fail
diff --git a/testsuite/subst-mb-incomplete.sh b/testsuite/subst-mb-incomplete.sh
index 849061c..c6a65d2 100755
--- a/testsuite/subst-mb-incomplete.sh
+++ b/testsuite/subst-mb-incomplete.sh
@@ -3,7 +3,7 @@
# performing a substitution with a replacement string containing an
# incomplete multi-byte character.
-# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+# Copyright (C) 2015-2018 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,7 +16,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/subst-options.sh b/testsuite/subst-options.sh
index 5a9e211..c380d43 100644
--- a/testsuite/subst-options.sh
+++ b/testsuite/subst-options.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test Substitute options (for code-coverage purposes as well)
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/subst-replacement.sh b/testsuite/subst-replacement.sh
index cd41388..b423b3c 100644
--- a/testsuite/subst-replacement.sh
+++ b/testsuite/subst-replacement.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test Substitute replacements, e.g. 's/(.)/\U\1/'
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/subwrite.inp b/testsuite/subwrite.inp
deleted file mode 100644
index 3e910cc..0000000
--- a/testsuite/subwrite.inp
+++ /dev/null
@@ -1,4 +0,0 @@
-Not some church, and not the state,
-Not some dark capricious fate.
-Who you are, and when you lose,
-Comes only from the things you choose.
diff --git a/testsuite/subwrite.sed b/testsuite/subwrite.sed
deleted file mode 100644
index 1a4a01d..0000000
--- a/testsuite/subwrite.sed
+++ /dev/null
@@ -1 +0,0 @@
-s/you/YoU/w subwrite.wout
diff --git a/testsuite/subwrt1.good b/testsuite/subwrt1.good
deleted file mode 100644
index 560b698..0000000
--- a/testsuite/subwrt1.good
+++ /dev/null
@@ -1,4 +0,0 @@
-Not some church, and not the state,
-Not some dark capricious fate.
-Who YoU are, and when you lose,
-Comes only from the things YoU choose.
diff --git a/testsuite/subwrt2.good b/testsuite/subwrt2.good
deleted file mode 100644
index c87bb68..0000000
--- a/testsuite/subwrt2.good
+++ /dev/null
@@ -1,2 +0,0 @@
-Who YoU are, and when you lose,
-Comes only from the things YoU choose.
diff --git a/testsuite/temp-file-cleanup.sh b/testsuite/temp-file-cleanup.sh
index 953506a..dc53d57 100755
--- a/testsuite/temp-file-cleanup.sh
+++ b/testsuite/temp-file-cleanup.sh
@@ -2,7 +2,7 @@
# Verify that an erroneous use of sed -i no longer leaves behind
# a temporary file.
-# Copyright (C) 2015-2017 Free Software Foundation, Inc.
+# Copyright (C) 2015-2018 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
@@ -15,7 +15,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/test-mbrtowc.c b/testsuite/test-mbrtowc.c
index b76d3fd..91c5d35 100644
--- a/testsuite/test-mbrtowc.c
+++ b/testsuite/test-mbrtowc.c
@@ -1,5 +1,5 @@
/* Auxiliary program to test mbrtowc(3) behaviour.
- Copyright 2016-2017 Free Software Foundation, Inc.
+ Copyright 2016-2018 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/testsuite/title-case.sh b/testsuite/title-case.sh
index 60c8341..2a318af 100755
--- a/testsuite/title-case.sh
+++ b/testsuite/title-case.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test case insensitive matching for titlecase and similarly odd chars.
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/tst-boost.c b/testsuite/tst-boost.c
deleted file mode 100644
index 8227deb..0000000
--- a/testsuite/tst-boost.c
+++ /dev/null
@@ -1,233 +0,0 @@
-/* Regular expression tests.
- Copyright (C) 2003-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA. */
-
-#include <config.h>
-
-#include <sys/types.h>
-#ifdef HAVE_MCHECK_H
-#include <mcheck.h>
-#endif
-#include <regex.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-void
-frob_escapes (char *src, int pattern)
-{
- char *dst;
-
- for (dst = src; *src != '\0'; dst++, src++)
- {
- if (*src == '\\')
- {
- switch (src[1])
- {
- case 't':
- src++;
- *dst = '\t';
- continue;
- case 'n':
- src++;
- *dst = '\n';
- continue;
- case 'r':
- src++;
- *dst = '\r';
- continue;
- case '\\':
- case '^':
- case '{':
- case '|':
- case '}':
- if (!pattern)
- {
- src++;
- *dst = *src;
- continue;
- }
- break;
- }
- }
- if (src != dst)
- *dst = *src;
- }
- *dst = '\0';
-}
-
-int
-main (int argc, char **argv)
-{
- int ret = 0, n;
- char *line = NULL;
- size_t line_len = 0;
- ssize_t len;
- FILE *f;
- char *pattern, *string;
- int flags = REG_EXTENDED;
- int eflags = 0;
- regex_t re;
- regmatch_t rm[20];
-
-#ifdef HAVE_MCHECK_H
- mtrace ();
-#endif
-
- if (argc < 2)
- {
- fprintf (stderr, "Missing test filename\n");
- return 1;
- }
-
- f = fopen (argv[1], "r");
- if (f == NULL)
- {
- fprintf (stderr, "Couldn't open %s\n", argv[1]);
- return 1;
- }
-
- while ((len = getline (&line, &line_len, f)) > 0)
- {
- char *p, *q;
- int i;
-
- if (line[len - 1] == '\n')
- line[--len] = '\0';
-
- puts (line);
-
- if (line[0] == ';')
- continue;
-
- if (line[0] == '\0')
- continue;
-
- if (line[0] == '-')
- {
- if (strstr (line, "REG_BASIC"))
- flags = 0;
- else
- flags = REG_EXTENDED;
- if (strstr (line, "REG_ICASE"))
- flags |= REG_ICASE;
- if (strstr (line, "REG_NEWLINE"))
- flags |= REG_NEWLINE;
- eflags = 0;
- if (strstr (line, "REG_NOTBOL"))
- eflags |= REG_NOTBOL;
- if (strstr (line, "REG_NOTEOL"))
- eflags |= REG_NOTEOL;
- continue;
- }
-
- pattern = line + strspn (line, " \t");
- if (*pattern == '\0')
- continue;
- p = pattern + strcspn (pattern, " \t");
- if (*p == '\0')
- continue;
- *p++ = '\0';
-
- string = p + strspn (p, " \t");
- if (*string == '\0')
- continue;
- if (*string == '"')
- {
- string++;
- p = strchr (string, '"');
- if (p == NULL)
- continue;
- *p++ = '\0';
- }
- else
- {
- p = string + strcspn (string, " \t");
- if (*string == '!')
- string = NULL;
- else if (*p == '\0')
- continue;
- else
- *p++ = '\0';
- }
-
- frob_escapes (pattern, 1);
- if (string != NULL)
- frob_escapes (string, 0);
-
- n = regcomp (&re, pattern, flags);
- if (n != 0)
- {
- if (string != NULL)
- {
- char buf[500];
- regerror (n, &re, buf, sizeof (buf));
- printf ("FAIL regcomp unexpectedly failed: %s\n",
- buf);
- ret = 1;
- }
- continue;
- }
- else if (string == NULL)
- {
- regfree (&re);
- puts ("FAIL regcomp unpexpectedly succeeded");
- ret = 1;
- continue;
- }
-
- if (regexec (&re, string, 20, rm, eflags))
- {
- for (i = 0; i < 20; ++i)
- {
- rm[i].rm_so = -1;
- rm[i].rm_eo = -1;
- }
- }
-
- regfree (&re);
-
- for (i = 0; i < 20 && *p != '\0'; ++i)
- {
- int rm_so, rm_eo;
-
- rm_so = strtol (p, &q, 10);
- if (p == q)
- break;
- p = q;
-
- rm_eo = strtol (p, &q, 10);
- if (p == q)
- break;
- p = q;
-
- if (rm[i].rm_so != rm_so || rm[i].rm_eo != rm_eo)
- {
- printf ("FAIL rm[%d] %d..%d != expected %d..%d\n",
- i, rm[i].rm_so, rm[i].rm_eo, rm_so, rm_eo);
- ret = 1;
- break;
- }
- }
- }
-
- free (line);
- fclose (f);
- return ret;
-}
diff --git a/testsuite/tst-pcre.c b/testsuite/tst-pcre.c
deleted file mode 100644
index c6c41fc..0000000
--- a/testsuite/tst-pcre.c
+++ /dev/null
@@ -1,247 +0,0 @@
-/* Regular expression tests.
- Copyright (C) 2003-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA. */
-
-#include <config.h>
-
-#include <sys/types.h>
-#ifdef HAVE_MCHECK_H
-#include <mcheck.h>
-#endif
-#include <regex.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-int
-main (int argc, char **argv)
-{
- int ret = 0;
- char *line = NULL;
- size_t line_len = 0;
- ssize_t len;
- FILE *f;
- char *pattern = NULL, *string = NULL;
- regmatch_t rm[20];
- size_t pattern_alloced = 0, string_alloced = 0;
- int ignorecase = 0;
- int pattern_valid = 0, rm_valid = 0;
- size_t linenum;
-
-#ifdef HAVE_MCHECK_H
- mtrace ();
-#endif
-
- if (argc < 2)
- {
- fprintf (stderr, "Missing test filename\n");
- return 1;
- }
-
- f = fopen (argv[1], "r");
- if (f == NULL)
- {
- fprintf (stderr, "Couldn't open %s\n", argv[1]);
- return 1;
- }
-
- if ((len = getline (&line, &line_len, f)) <= 0
- || strncmp (line, "# PCRE", 6) != 0)
- {
- fprintf (stderr, "Not a PCRE test file\n");
- fclose (f);
- free (line);
- return 1;
- }
-
- linenum = 1;
-
- while ((len = getline (&line, &line_len, f)) > 0)
- {
- char *p;
- unsigned long num;
-
- ++linenum;
-
- if (line[len - 1] == '\n')
- line[--len] = '\0';
-
- if (line[0] == '#')
- continue;
-
- if (line[0] == '\0')
- {
- /* End of test. */
- ignorecase = 0;
- pattern_valid = 0;
- rm_valid = 0;
- continue;
- }
-
- if (line[0] == '/')
- {
- /* Pattern. */
- p = strrchr (line + 1, '/');
-
- pattern_valid = 0;
- rm_valid = 0;
- if (p == NULL)
- {
- printf ("%lu: Invalid pattern line: %s\n", linenum, line);
- ret = 1;
- continue;
- }
-
- if (p[1] == 'i' && p[2] == '\0')
- ignorecase = 1;
- else if (p[1] != '\0')
- {
- printf ("%lu: Invalid pattern line: %s\n", linenum, line);
- ret = 1;
- continue;
- }
-
- if (pattern_alloced < (size_t) (p - line))
- {
- pattern = realloc (pattern, p - line);
- if (pattern == NULL)
- {
- printf ("%lu: Cannot record pattern: %m\n", linenum);
- ret = 1;
- break;
- }
- pattern_alloced = p - line;
- }
-
- memcpy (pattern, line + 1, p - line - 1);
- pattern[p - line - 1] = '\0';
- pattern_valid = 1;
- continue;
- }
-
- if (strncmp (line, " ", 4) == 0)
- {
- regex_t re;
- int n;
-
- if (!pattern_valid)
- {
- printf ("%lu: No previous valid pattern %s\n", linenum, line);
- continue;
- }
-
- if (string_alloced < (size_t) (len - 3))
- {
- string = realloc (string, len - 3);
- if (string == NULL)
- {
- printf ("%lu: Cannot record search string: %m\n", linenum);
- ret = 1;
- break;
- }
- string_alloced = len - 3;
- }
-
- memcpy (string, line + 4, len - 3);
-
- n = regcomp (&re, pattern,
- REG_EXTENDED | (ignorecase ? REG_ICASE : 0));
- if (n != 0)
- {
- char buf[500];
- regerror (n, &re, buf, sizeof (buf));
- printf ("%lu: regcomp failed for %s: %s\n",
- linenum, pattern, buf);
- ret = 1;
- continue;
- }
-
- if (regexec (&re, string, 20, rm, 0))
- {
- rm[0].rm_so = -1;
- rm[0].rm_eo = -1;
- }
-
- regfree (&re);
- rm_valid = 1;
- continue;
- }
-
- if (!rm_valid)
- {
- printf ("%lu: No preceeding pattern or search string\n", linenum);
- ret = 1;
- continue;
- }
-
- if (strcmp (line, "No match") == 0)
- {
- if (rm[0].rm_so != -1 || rm[0].rm_eo != -1)
- {
- printf ("%lu: /%s/ on %s unexpectedly matched %d..%d\n",
- linenum, pattern, string, rm[0].rm_so, rm[0].rm_eo);
- ret = 1;
- }
-
- continue;
- }
-
- p = line;
- if (*p == ' ')
- ++p;
-
- num = strtoul (p, &p, 10);
- if (num >= 20 || *p != ':' || p[1] != ' ')
- {
- printf ("%lu: Invalid line %s\n", linenum, line);
- ret = 1;
- continue;
- }
-
- if (rm[num].rm_so == -1 || rm[num].rm_eo == -1)
- {
- if (strcmp (p + 2, "<unset>") != 0)
- {
- printf ("%lu: /%s/ on %s unexpectedly failed to match register %ld %d..%d\n",
- linenum, pattern, string, num,
- rm[num].rm_so, rm[num].rm_eo);
- ret = 1;
- }
- continue;
- }
-
- if (rm[num].rm_eo < rm[num].rm_so
- || rm[num].rm_eo - rm[num].rm_so != len - (p + 2 - line)
- || strncmp (p + 2, string + rm[num].rm_so,
- rm[num].rm_eo - rm[num].rm_so) != 0)
- {
- printf ("%lu: /%s/ on %s unexpectedly failed to match %s for register %ld %d..%d\n",
- linenum, pattern, string, p + 2, num,
- rm[num].rm_so, rm[num].rm_eo);
- ret = 1;
- continue;
- }
- }
-
- free (pattern);
- free (string);
- free (line);
- fclose (f);
- return ret;
-}
diff --git a/testsuite/tst-regex2.c b/testsuite/tst-regex2.c
deleted file mode 100644
index dd65bb3..0000000
--- a/testsuite/tst-regex2.c
+++ /dev/null
@@ -1,207 +0,0 @@
-#include <config.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <regex.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-int
-main (int argc, char *argv[])
-{
- struct stat st;
- static const char *pat[] = {
- ".?.?.?.?.?.?.?argc",
- "(.?)(.?)(.?)(.?)(.?)(.?)(.?)argc",
- "((((((((((.?))))))))))((((((((((.?))))))))))((((((((((.?))))))))))"
- "((((((((((.?))))))))))((((((((((.?))))))))))((((((((((.?))))))))))"
- "((((((((((.?))))))))))argc" };
-
- size_t len;
- int fd;
- int testno, i, j, k, l;
- char *string;
- char *buf;
-
- if (argc < 2)
- abort ();
-
- fd = open (argv[1], O_RDONLY);
- if (fd < 0)
- {
- printf ("Couldn't open %s: %s\n", argv[1], strerror (errno));
- abort ();
- }
-
- if (fstat (fd, &st) < 0)
- {
- printf ("Couldn't fstat %s: %s\n", argv[1], strerror (errno));
- abort ();
- }
-
- buf = malloc (st.st_size + 1);
- if (buf == NULL)
- {
- printf ("Couldn't allocate buffer: %s\n", strerror (errno));
- abort ();
- }
-
- if (read (fd, buf, st.st_size) != (ssize_t) st.st_size)
- {
- printf ("Couldn't read %s", argv[1]);
- abort ();
- }
-
- close (fd);
- buf[st.st_size] = '\0';
-
- string = buf;
- len = st.st_size;
-
- for (testno = 0; testno < 4; ++testno)
- for (i = 0; i < sizeof (pat) / sizeof (pat[0]); ++i)
- {
- regex_t rbuf;
- struct re_pattern_buffer rpbuf;
- int err;
-
- printf ("test %d pattern %d", testno, i);
- if (testno < 2)
- {
- err = regcomp (&rbuf, pat[i],
- REG_EXTENDED | (testno ? REG_NOSUB : 0));
- if (err != 0)
- {
- char errstr[300];
- putchar ('\n');
- regerror (err, &rbuf, errstr, sizeof (errstr));
- puts (errstr);
- return err;
- }
- }
- else
- {
- const char *s;
- re_set_syntax (RE_SYNTAX_POSIX_EGREP
- | (testno == 3 ? RE_NO_SUB : 0));
-
- memset (&rpbuf, 0, sizeof (rpbuf));
- s = re_compile_pattern (pat[i], strlen (pat[i]), &rpbuf);
- if (s != NULL)
- {
- printf ("\n%s\n", s);
- abort ();
- }
-
- /* Just so that this can be tested with earlier glibc as well. */
- if (testno == 3)
- rpbuf.no_sub = 1;
- }
-
- if (testno < 2)
- {
- regmatch_t pmatch[71];
- err = regexec (&rbuf, string, 71, pmatch, 0);
- if (err == REG_NOMATCH)
- {
- puts ("\nregexec failed");
- abort ();
- }
-
- if (testno == 0)
- {
- if (pmatch[0].rm_eo != pmatch[0].rm_so + 11
- || pmatch[0].rm_eo > len
- || string + pmatch[0].rm_so >= strchr (string, 'R')
- || strncmp (string + pmatch[0].rm_so,
- "n (int argc",
- sizeof "n (int argc" - 1)
- != 0)
- {
- puts ("\nregexec without REG_NOSUB did not find the correct match");
- abort ();
- }
-
- if (i > 0)
- for (j = 0, l = 1; j < 7; ++j)
- for (k = 0; k < (i == 1 ? 1 : 10); ++k, ++l)
- if (pmatch[l].rm_so != pmatch[0].rm_so + j
- || pmatch[l].rm_eo != pmatch[l].rm_so + 1)
- {
- printf ("\npmatch[%d] incorrect\n", l);
- abort ();
- }
- }
- }
- else
- {
- struct re_registers regs;
- int match;
-
- memset (&regs, 0, sizeof (regs));
- match = re_search (&rpbuf, string, len, 0, len,
- &regs);
- if (match < 0)
- {
- puts ("\nre_search failed");
- abort ();
- }
-
- if (match + 11 > len
- || string + match >= strchr (string, 'R')
- || strncmp (string + match,
- "n (int argc",
- sizeof "n (int argc" - 1)
- != 0)
- {
- puts ("\nre_search did not find the correct match");
- abort ();
- }
-
- if (testno == 2)
- {
- if (regs.num_regs != 2 + (i == 0 ? 0 : i == 1 ? 7 : 70))
- {
- printf ("\nincorrect num_regs %d\n", regs.num_regs);
- abort ();
- }
-
- if (regs.start[0] != match || regs.end[0] != match + 11)
- {
- printf ("\nincorrect regs.{start,end}[0] = { %d, %d}\n",
- regs.start[0], regs.end[0]);
- abort ();
- }
-
- if (regs.start[regs.num_regs - 1] != -1
- || regs.end[regs.num_regs - 1] != -1)
- {
- puts ("\nincorrect regs.{start,end}[num_regs - 1]");
- abort ();
- }
-
- if (i > 0)
- for (j = 0, l = 1; j < 7; ++j)
- for (k = 0; k < (i == 1 ? 1 : 10); ++k, ++l)
- if (regs.start[l] != match + j
- || regs.end[l] != regs.start[l] + 1)
- {
- printf ("\nregs.{start,end}[%d] incorrect\n", l);
- abort ();
- }
- }
- }
-
- putchar ('\n');
-
- if (testno < 2)
- regfree (&rbuf);
- else
- regfree (&rpbuf);
- }
-
- exit (0);
-}
diff --git a/testsuite/tst-rxspencer.c b/testsuite/tst-rxspencer.c
deleted file mode 100644
index a8785bd..0000000
--- a/testsuite/tst-rxspencer.c
+++ /dev/null
@@ -1,558 +0,0 @@
-/* Regular expression tests.
- Copyright (C) 2003-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA. */
-
-#include <config.h>
-
-#include <sys/types.h>
-#ifdef HAVE_MCHECK_H
-#include <mcheck.h>
-#endif
-#include <regex.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <locale.h>
-#include <getopt.h>
-
-static void
-replace_special_chars (char *str)
-{
- for (; (str = strpbrk (str, "NTSZ")) != NULL; ++str)
- switch (*str)
- {
- case 'N': *str = '\n'; break;
- case 'T': *str = '\t'; break;
- case 'S': *str = ' '; break;
- case 'Z': *str = '\0'; break;
- }
-}
-
-static void
-glibc_re_syntax (char *str)
-{
- char *p, *end = strchr (str, '\0') + 1;
-
- /* Replace [[:<:]] with \< and [[:>:]] with \>. */
- for (p = str; (p = strstr (p, "[[:")) != NULL; )
- if ((p[3] == '<' || p[3] == '>') && strncmp (p + 4, ":]]", 3) == 0)
- {
- p[0] = '\\';
- p[1] = p[3];
- memmove (p + 2, p + 7, end - p - 7);
- end -= 5;
- p += 2;
- }
- else
- p += 3;
-}
-
-static char *
-mb_replace (char *dst, const char c)
-{
- switch (c)
- {
- /* Replace a with \'a and A with \'A. */
- case 'a':
- *dst++ = '\xc3';
- *dst++ = '\xa1';
- break;
- case 'A':
- *dst++ = '\xc3';
- *dst++ = '\x81';
- break;
- /* Replace b with \v{c} and B with \v{C}. */
- case 'b':
- *dst++ = '\xc4';
- *dst++ = '\x8d';
- break;
- case 'B':
- *dst++ = '\xc4';
- *dst++ = '\x8c';
- break;
- /* Replace c with \v{d} and C with \v{D}. */
- case 'c':
- *dst++ = '\xc4';
- *dst++ = '\x8f';
- break;
- case 'C':
- *dst++ = '\xc4';
- *dst++ = '\x8e';
- break;
- /* Replace d with \'e and D with \'E. */
- case 'd':
- *dst++ = '\xc3';
- *dst++ = '\xa9';
- break;
- case 'D':
- *dst++ = '\xc3';
- *dst++ = '\x89';
- break;
- }
- return dst;
-}
-
-static char *
-mb_frob_string (const char *str, const char *letters)
-{
- char *ret, *dst;
- const char *src;
-
- if (str == NULL)
- return NULL;
-
- ret = malloc (2 * strlen (str) + 1);
- if (ret == NULL)
- return NULL;
-
- for (src = str, dst = ret; *src; ++src)
- if (strchr (letters, *src))
- dst = mb_replace (dst, *src);
- else
- *dst++ = *src;
- *dst = '\0';
- return ret;
-}
-
-/* Like mb_frob_string, but don't replace anything between
- [: and :], [. and .] or [= and =]. */
-
-static char *
-mb_frob_pattern (const char *str, const char *letters)
-{
- char *ret, *dst;
- const char *src;
- int in_class = 0;
-
- if (str == NULL)
- return NULL;
-
- ret = malloc (2 * strlen (str) + 1);
- if (ret == NULL)
- return NULL;
-
- for (src = str, dst = ret; *src; ++src)
- if (!in_class && strchr (letters, *src))
- dst = mb_replace (dst, *src);
- else
- {
- if (!in_class && *src == '[' && strchr (":.=", src[1]))
- in_class = 1;
- else if (in_class && *src == ']' && strchr (":.=", src[-1]))
- in_class = 0;
- *dst++ = *src;
- }
- *dst = '\0';
- return ret;
-}
-
-static int
-check_match (regmatch_t *rm, int idx, const char *string,
- const char *match, const char *fail)
-{
- if (match[0] == '-' && match[1] == '\0')
- {
- if (rm[idx].rm_so == -1 && rm[idx].rm_eo == -1)
- return 0;
- printf ("%s rm[%d] unexpectedly matched\n", fail, idx);
- return 1;
- }
-
- if (rm[idx].rm_so == -1 || rm[idx].rm_eo == -1)
- {
- printf ("%s rm[%d] unexpectedly did not match\n", fail, idx);
- return 1;
- }
-
- if (match[0] == '@')
- {
- if (rm[idx].rm_so != rm[idx].rm_eo)
- {
- printf ("%s rm[%d] not empty\n", fail, idx);
- return 1;
- }
-
- if (strncmp (string + rm[idx].rm_so, match + 1, strlen (match + 1)
- ? strlen (match + 1) : 1))
- {
- printf ("%s rm[%d] not matching %s\n", fail, idx, match);
- return 1;
- }
- return 0;
- }
-
- if (rm[idx].rm_eo - rm[idx].rm_so != strlen (match)
- || strncmp (string + rm[idx].rm_so, match,
- rm[idx].rm_eo - rm[idx].rm_so))
- {
- printf ("%s rm[%d] not matching %s\n", fail, idx, match);
- return 1;
- }
-
- return 0;
-}
-
-static int
-test (const char *pattern, int cflags, const char *string, int eflags,
- char *expect, char *matches, const char *fail)
-{
- regex_t re;
- regmatch_t rm[10];
- int n, ret = 0;
-
- n = regcomp (&re, pattern, cflags);
- if (n != 0)
- {
- char buf[500];
- if (eflags == -1)
- {
- static struct { reg_errcode_t code; const char *name; } codes []
-#define C(x) { REG_##x, #x }
- = { C(NOERROR), C(NOMATCH), C(BADPAT), C(ECOLLATE),
- C(ECTYPE), C(EESCAPE), C(ESUBREG), C(EBRACK),
- C(EPAREN), C(EBRACE), C(BADBR), C(ERANGE),
- C(ESPACE), C(BADRPT) };
-
- int i;
- for (i = 0; i < sizeof (codes) / sizeof (codes[0]); ++i)
- if (n == codes[i].code)
- {
- if (strcmp (string, codes[i].name))
- {
- printf ("%s regcomp returned REG_%s (expected REG_%s)\n",
- fail, codes[i].name, string);
- return 1;
- }
- return 0;
- }
-
- printf ("%s regcomp return value REG_%d\n", fail, n);
- return 1;
- }
-
- regerror (n, &re, buf, sizeof (buf));
- printf ("%s regcomp failed: %s\n", fail, buf);
- return 1;
- }
-
- if (eflags == -1)
- {
- regfree (&re);
-
- /* The test case file assumes something only guaranteed by the
- rxspencer regex implementation. Namely that for empty
- expressions regcomp() return REG_EMPTY. This is not the case
- for us and so we ignore this error. */
- if (strcmp (string, "EMPTY") == 0)
- return 0;
-
- printf ("%s regcomp unexpectedly succeeded\n", fail);
- return 1;
- }
-
- if (regexec (&re, string, 10, rm, eflags))
- {
- regfree (&re);
- if (expect == NULL)
- return 0;
- printf ("%s regexec failed\n", fail);
- return 1;
- }
-
- regfree (&re);
-
- if (expect == NULL)
- {
- printf ("%s regexec unexpectedly succeeded\n", fail);
- return 1;
- }
-
- if (cflags & REG_NOSUB)
- return 0;
-
- ret = check_match (rm, 0, string, expect, fail);
- if (matches == NULL)
- return ret;
-
- for (n = 1; ret == 0 && n < 10; ++n)
- {
- char *p = NULL;
-
- if (matches)
- {
- p = strchr (matches, ',');
- if (p != NULL)
- *p = '\0';
- }
- ret = check_match (rm, n, string, matches ? matches : "-", fail);
- if (p)
- {
- *p = ',';
- matches = p + 1;
- }
- else
- matches = NULL;
- }
-
- return ret;
-}
-
-static int
-mb_test (const char *pattern, int cflags, const char *string, int eflags,
- char *expect, const char *matches, const char *letters,
- const char *fail)
-{
- char *pattern_mb = mb_frob_pattern (pattern, letters);
- const char *string_mb
- = eflags == -1 ? string : mb_frob_string (string, letters);
- char *expect_mb = mb_frob_string (expect, letters);
- char *matches_mb = mb_frob_string (matches, letters);
- int ret = 0;
-
- if (!pattern_mb || !string_mb
- || (expect && !expect_mb) || (matches && !matches_mb))
- {
- printf ("%s %m", fail);
- ret = 1;
- }
- else
- ret = test (pattern_mb, cflags, string_mb, eflags, expect_mb,
- matches_mb, fail);
-
- free (matches_mb);
- free (expect_mb);
- if (string_mb != string)
- free (string_mb);
- free (pattern_mb);
- return ret;
-}
-
-static int
-mb_tests (const char *pattern, int cflags, const char *string, int eflags,
- char *expect, const char *matches)
-{
- int ret = 0;
- int i;
- char letters[9], fail[20];
-
- /* The tests aren't supposed to work with xdigit, since a-dA-D are
- hex digits while \'a \'A \v{c}\v{C}\v{d}\v{D}\'e \'E are not. */
- if (strstr (pattern, "[:xdigit:]"))
- return 0;
-
- /* XXX: regex ATM handles only single byte equivalence classes. */
- if (strstr (pattern, "[[=b=]]"))
- return 0;
-
- for (i = 1; i < 16; ++i)
- {
- char *p = letters;
- if (i & 1)
- {
- if (!strchr (pattern, 'a') && !strchr (string, 'a')
- && !strchr (pattern, 'A') && !strchr (string, 'A'))
- continue;
- *p++ = 'a', *p++ = 'A';
- }
- if (i & 2)
- {
- if (!strchr (pattern, 'b') && !strchr (string, 'b')
- && !strchr (pattern, 'B') && !strchr (string, 'B'))
- continue;
- *p++ = 'b', *p++ = 'B';
- }
- if (i & 4)
- {
- if (!strchr (pattern, 'c') && !strchr (string, 'c')
- && !strchr (pattern, 'C') && !strchr (string, 'C'))
- continue;
- *p++ = 'c', *p++ = 'C';
- }
- if (i & 8)
- {
- if (!strchr (pattern, 'd') && !strchr (string, 'd')
- && !strchr (pattern, 'D') && !strchr (string, 'D'))
- continue;
- *p++ = 'd', *p++ = 'D';
- }
- *p++ = '\0';
- sprintf (fail, "UTF-8 %s FAIL", letters);
- ret |= mb_test (pattern, cflags, string, eflags, expect, matches,
- letters, fail);
- }
- return ret;
-}
-
-int
-main (int argc, char **argv)
-{
- int ret = 0;
- char *line = NULL;
- size_t line_len = 0;
- ssize_t len;
- FILE *f;
- static int test_utf8 = 0;
- static const struct option options[] =
- {
- {"utf8", no_argument, &test_utf8, 1},
- {NULL, 0, NULL, 0 }
- };
-
-#ifdef HAVE_MCHECK_H
- mtrace ();
-#endif
-
- while (getopt_long (argc, argv, "", options, NULL) >= 0);
-
- if (optind + 1 != argc)
- {
- fprintf (stderr, "Missing test filename\n");
- return 1;
- }
-
- f = fopen (argv[optind], "r");
- if (f == NULL)
- {
- fprintf (stderr, "Couldn't open %s\n", argv[optind]);
- return 1;
- }
-
- while ((len = getline (&line, &line_len, f)) > 0)
- {
- char *pattern, *flagstr, *string, *expect, *matches, *p;
- int cflags = REG_EXTENDED, eflags = 0, try_bre_ere = 0;
-
- if (line[len - 1] == '\n')
- line[len - 1] = '\0';
-
- /* Skip comments and empty lines. */
- if (*line == '#' || *line == '\0')
- continue;
-
- puts (line);
- fflush (stdout);
-
- pattern = strtok (line, "\t");
- if (pattern == NULL)
- continue;
-
- if (strcmp (pattern, "\"\"") == 0)
- pattern += 2;
-
- flagstr = strtok (NULL, "\t");
- if (flagstr == NULL)
- continue;
-
- string = strtok (NULL, "\t");
- if (string == NULL)
- continue;
-
- if (strcmp (string, "\"\"") == 0)
- string += 2;
-
- for (p = flagstr; *p; ++p)
- switch (*p)
- {
- case '-':
- break;
- case 'b':
- cflags &= ~REG_EXTENDED;
- break;
- case '&':
- try_bre_ere = 1;
- break;
- case 'C':
- eflags = -1;
- break;
- case 'i':
- cflags |= REG_ICASE;
- break;
- case 's':
- cflags |= REG_NOSUB;
- break;
- case 'n':
- cflags |= REG_NEWLINE;
- break;
- case '^':
- eflags |= REG_NOTBOL;
- break;
- case '$':
- eflags |= REG_NOTEOL;
- break;
- case 'm':
- case 'p':
- case '#':
- /* Not supported. */
- flagstr = NULL;
- break;
- }
-
- if (flagstr == NULL)
- continue;
-
- replace_special_chars (pattern);
- glibc_re_syntax (pattern);
- if (eflags != -1)
- replace_special_chars (string);
-
- expect = strtok (NULL, "\t");
- matches = NULL;
- if (expect != NULL)
- {
- replace_special_chars (expect);
- matches = strtok (NULL, "\t");
- if (matches != NULL)
- replace_special_chars (matches);
- }
-
- if (setlocale (LC_ALL, "C") == NULL)
- {
- puts ("setlocale C failed");
- ret = 1;
- }
- if (test (pattern, cflags, string, eflags, expect, matches, "FAIL")
- || (try_bre_ere
- && test (pattern, cflags & ~REG_EXTENDED, string, eflags,
- expect, matches, "FAIL")))
- ret = 1;
- else if (test_utf8)
- {
- if (setlocale (LC_ALL, "cs_CZ.UTF-8") == NULL)
- {
- puts ("setlocale cs_CZ.UTF-8 failed");
- ret = 1;
- }
- else if (test (pattern, cflags, string, eflags, expect, matches,
- "UTF-8 FAIL")
- || (try_bre_ere
- && test (pattern, cflags & ~REG_EXTENDED, string,
- eflags, expect, matches, "UTF-8 FAIL")))
- ret = 1;
- else if (mb_tests (pattern, cflags, string, eflags, expect, matches)
- || (try_bre_ere
- && mb_tests (pattern, cflags & ~REG_EXTENDED, string,
- eflags, expect, matches)))
- ret = 1;
- }
- }
-
- free (line);
- fclose (f);
- return ret;
-}
diff --git a/testsuite/unbuffered.sh b/testsuite/unbuffered.sh
index a0996e7..5cdfc27 100644
--- a/testsuite/unbuffered.sh
+++ b/testsuite/unbuffered.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test -u/--unbuffered option
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
@@ -14,7 +14,7 @@
# 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/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
diff --git a/testsuite/uniq.sh b/testsuite/uniq.sh
new file mode 100644
index 0000000..ff9a811
--- /dev/null
+++ b/testsuite/uniq.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# Test runner for the uniq.sed script
+
+# Copyright (C) 2017-2018 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 <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+# location of the external SED scripts
+dir="$abs_top_srcdir/testsuite"
+
+sed -f "$dir/uniq.sed" < "$dir/uniq.inp" > out || fail=1
+remove_cr_inplace out
+compare "$dir/uniq.good" out || fail=1
+
+
+Exit $fail
diff --git a/testsuite/utf8-1.good b/testsuite/utf8-1.good
deleted file mode 100644
index 4e15f90..0000000
--- a/testsuite/utf8-1.good
+++ /dev/null
@@ -1 +0,0 @@
-Да Д
diff --git a/testsuite/utf8-1.inp b/testsuite/utf8-1.inp
deleted file mode 100644
index a596b7f..0000000
--- a/testsuite/utf8-1.inp
+++ /dev/null
@@ -1 +0,0 @@
-да д
diff --git a/testsuite/utf8-1.sed b/testsuite/utf8-1.sed
deleted file mode 100644
index be00919..0000000
--- a/testsuite/utf8-1.sed
+++ /dev/null
@@ -1 +0,0 @@
-s/д/\U&/g
diff --git a/testsuite/utf8-2.good b/testsuite/utf8-2.good
deleted file mode 100644
index 4e15f90..0000000
--- a/testsuite/utf8-2.good
+++ /dev/null
@@ -1 +0,0 @@
-Да Д
diff --git a/testsuite/utf8-2.inp b/testsuite/utf8-2.inp
deleted file mode 100644
index a596b7f..0000000
--- a/testsuite/utf8-2.inp
+++ /dev/null
@@ -1 +0,0 @@
-да д
diff --git a/testsuite/utf8-2.sed b/testsuite/utf8-2.sed
deleted file mode 100644
index c921a4e..0000000
--- a/testsuite/utf8-2.sed
+++ /dev/null
@@ -1 +0,0 @@
-s/д/\u&/g
diff --git a/testsuite/utf8-3.good b/testsuite/utf8-3.good
deleted file mode 100644
index 3f39372..0000000
--- a/testsuite/utf8-3.good
+++ /dev/null
@@ -1 +0,0 @@
-Да д
diff --git a/testsuite/utf8-3.inp b/testsuite/utf8-3.inp
deleted file mode 100644
index a596b7f..0000000
--- a/testsuite/utf8-3.inp
+++ /dev/null
@@ -1 +0,0 @@
-да д
diff --git a/testsuite/utf8-3.sed b/testsuite/utf8-3.sed
deleted file mode 100644
index ce90319..0000000
--- a/testsuite/utf8-3.sed
+++ /dev/null
@@ -1 +0,0 @@
-s/д.*/\u&/g
diff --git a/testsuite/utf8-4.good b/testsuite/utf8-4.good
deleted file mode 100644
index ddaa4b6..0000000
--- a/testsuite/utf8-4.good
+++ /dev/null
@@ -1 +0,0 @@
-ДА Д
diff --git a/testsuite/utf8-4.inp b/testsuite/utf8-4.inp
deleted file mode 100644
index a596b7f..0000000
--- a/testsuite/utf8-4.inp
+++ /dev/null
@@ -1 +0,0 @@
-да д
diff --git a/testsuite/utf8-4.sed b/testsuite/utf8-4.sed
deleted file mode 100644
index 8b8fdf4..0000000
--- a/testsuite/utf8-4.sed
+++ /dev/null
@@ -1 +0,0 @@
-s/д.*/\U&/g
diff --git a/testsuite/utf8-ru.sh b/testsuite/utf8-ru.sh
new file mode 100644
index 0000000..eafd4b4
--- /dev/null
+++ b/testsuite/utf8-ru.sh
@@ -0,0 +1,126 @@
+#!/bin/sh
+
+# Test GNU extension "\u" and "\U" (uppercase conversion)
+# in "s///" command.
+# This is an adaptation of the old utf8-1/2/3/4 tests.
+
+# Copyright (C) 2017-2018 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 <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+require_ru_utf8_locale_
+
+fail=0
+
+
+# The letter used in these tests are:
+# UTF8:Octal UTF8:HEX CodePoint Name
+# А \320\220 \xD0\x90 U+0410 \N{CYRILLIC CAPITAL LETTER A}
+# Д \320\224 \xD0\x94 U+0414 \N{CYRILLIC CAPITAL LETTER DE}
+# а \320\260 \xD0\xB0 U+0430 \N{CYRILLIC SMALL LETTER A}
+# д \320\264 \xD0\xB4 U+0434 \N{CYRILLIC SMALL LETTER DE}
+
+# Using octal values, as these are the most portable access various printfs.
+
+
+# Input: Same input for all test (all lower case letters)
+# д а д
+printf '\320\264\320\260 \320\264\n' > utf8-inp || framework_failure_
+
+
+# Test 1: Convert "small DE" to upper case (with \U)
+# s/д/\U&/g
+printf 's/\320\264/\\U&/g' > utf8-1.sed || framework_failure_
+
+# Test 1: Expected output - two capital DE letters.
+# Д а Д
+printf '\320\224\320\260 \320\224\n' > utf8-1-exp || framework_failure_
+
+
+# Test 2: Convert "small DE" to upper case (with \u - next character only)
+# s/д/\u&/g
+printf 's/\320\264/\\u&/g\n' > utf8-2.sed || framework_failure_
+
+# The expected output of test 2 is identical to test 1.
+# We create the file to make the test loop (below) simpler.
+cp utf8-1-exp utf8-2-exp || framework_failure_
+
+
+
+# Test 3: Capitalize only the next character (\u)
+# Only the first "DE" should be capitilized.
+# s/д.*/\u&/g
+printf 's/\320\264.*/\\u&/g' > utf8-3.sed || framework_failure_
+
+# Test 3: Expected output - First DE capitilized, second DE not.
+# Д а д
+printf '\320\224\320\260 \320\264\n' > utf8-3-exp || framework_failure_
+
+
+# Test 4: Capitalize all matched characters
+# s/д.*/\U&/g
+printf 's/\320\264.*/\\U&/g' > utf8-4.sed || framework_failure_
+
+
+# Test 4: Expected output - All capital letters:
+# Д А Д
+printf '\320\224\320\220 \320\224\n' > utf8-4-exp || framework_failure_
+
+# Step 1: force Russian UTF8 locale.
+# The case-conversion should either work, or not modify the input.
+for i in 1 2 3 4;
+do
+ LC_ALL=ru_RU.UTF-8 \
+ sed -f utf8-$i.sed < utf8-inp > utf8-$i-ru-out || fail=1
+
+ remove_cr_inplace utf8-$i-ru-out
+
+ # If we have the expected output - continue to next text
+ compare utf8-$i-exp utf8-$i-ru-out && continue
+
+ # Otherwise, ensure the input wasn't modified
+ # (i.e. sed did not modify partial octets resulting in
+ # invalid multibyte sequences)
+ compare utf8-$i-inp utf8-$i-ru-out || fail=1
+done
+
+
+# Step 2: If the current locale supports UTF8, repeat the above tests.
+l=$(locale | grep '^LC_CTYPE=' | sed 's/^.*="// ; s/"$//')
+case "$n" in
+ *UTF-8 | *UTF8 | *utf8 | *utf-8) utf8=yes;;
+ *) utf8=no;;
+esac
+
+if test "$utf8" = yes ; then
+ for i in 1 2 3 4;
+ do
+ sed -f utf8-$i.sed < utf8-inp > utf8-$i-out || fail=1
+
+ remove_cr_inplace utf8-$i-out
+
+ # If we have the expected output - continue to next text
+ compare utf8-$i-exp utf8-$i-out && continue
+
+ # Otherwise, ensure the input wasn't modified
+ # (i.e. sed did not modify partial octets resulting in
+ # invalid multibyte sequences)
+ compare utf8-$i-inp utf8-$i-out || fail=1
+ done
+fi
+
+
+Exit $fail
diff --git a/testsuite/writeout.inp b/testsuite/writeout.inp
deleted file mode 100644
index 1cfceaf..0000000
--- a/testsuite/writeout.inp
+++ /dev/null
@@ -1,4 +0,0 @@
-Facts are simple and facts are straight
-Facts are lazy and facts are late
-Facts all come with points of view
-Facts don't do what I want them to
diff --git a/testsuite/writeout.sed b/testsuite/writeout.sed
deleted file mode 100644
index f925a4d..0000000
--- a/testsuite/writeout.sed
+++ /dev/null
@@ -1 +0,0 @@
-/^Facts ar/w writeout.wout
diff --git a/testsuite/wrtout1.good b/testsuite/wrtout1.good
deleted file mode 100644
index 1cfceaf..0000000
--- a/testsuite/wrtout1.good
+++ /dev/null
@@ -1,4 +0,0 @@
-Facts are simple and facts are straight
-Facts are lazy and facts are late
-Facts all come with points of view
-Facts don't do what I want them to
diff --git a/testsuite/wrtout2.good b/testsuite/wrtout2.good
deleted file mode 100644
index 2ef3f50..0000000
--- a/testsuite/wrtout2.good
+++ /dev/null
@@ -1,2 +0,0 @@
-Facts are simple and facts are straight
-Facts are lazy and facts are late
diff --git a/testsuite/xabcx.good b/testsuite/xabcx.good
deleted file mode 100644
index 3f8bc81..0000000
--- a/testsuite/xabcx.good
+++ /dev/null
@@ -1,4 +0,0 @@
-roses are red
-violets are blue
-my feet are cold
-your feet are too
diff --git a/testsuite/xabcx.inp b/testsuite/xabcx.inp
deleted file mode 100644
index f2e2b38..0000000
--- a/testsuite/xabcx.inp
+++ /dev/null
@@ -1,4 +0,0 @@
-roses are red
-violets are blue
-my feet are cold
-your feet are blue
diff --git a/testsuite/xabcx.sed b/testsuite/xabcx.sed
deleted file mode 100644
index 2a872fb..0000000
--- a/testsuite/xabcx.sed
+++ /dev/null
@@ -1,2 +0,0 @@
-# from the ChangeLog (Fri May 21 1993)
-\xfeetxs/blue/too/
diff --git a/testsuite/xbxcx.good b/testsuite/xbxcx.good
deleted file mode 100644
index 1a2eece..0000000
--- a/testsuite/xbxcx.good
+++ /dev/null
@@ -1,7 +0,0 @@
-x
-xbx
-xbxcx
-xbxcx
-xbxcx
-xbxcx
-xbxcx
diff --git a/testsuite/xbxcx.inp b/testsuite/xbxcx.inp
deleted file mode 100644
index cac4334..0000000
--- a/testsuite/xbxcx.inp
+++ /dev/null
@@ -1,7 +0,0 @@
-
-b
-bc
-bac
-baac
-baaac
-baaaac
diff --git a/testsuite/xbxcx.sed b/testsuite/xbxcx.sed
deleted file mode 100644
index e6a9c3d..0000000
--- a/testsuite/xbxcx.sed
+++ /dev/null
@@ -1,2 +0,0 @@
-# from the ChangeLog (Wed Sep 5 2001)
-s/a*/x/g
diff --git a/testsuite/xbxcx3.good b/testsuite/xbxcx3.good
deleted file mode 100644
index 072a680..0000000
--- a/testsuite/xbxcx3.good
+++ /dev/null
@@ -1,7 +0,0 @@
-
-b
-bcx
-bacx
-baacx
-baaacx
-baaaacx
diff --git a/testsuite/xbxcx3.inp b/testsuite/xbxcx3.inp
deleted file mode 100644
index cac4334..0000000
--- a/testsuite/xbxcx3.inp
+++ /dev/null
@@ -1,7 +0,0 @@
-
-b
-bc
-bac
-baac
-baaac
-baaaac
diff --git a/testsuite/xbxcx3.sed b/testsuite/xbxcx3.sed
deleted file mode 100644
index 759483c..0000000
--- a/testsuite/xbxcx3.sed
+++ /dev/null
@@ -1 +0,0 @@
-s/a*/x/3
diff --git a/testsuite/xemacs.good b/testsuite/xemacs.good
index 3d97caf..abe2903 100644
--- a/testsuite/xemacs.good
+++ b/testsuite/xemacs.good
@@ -1,6 +1,6 @@
#Makefile.in generated automatically by automake 1.5 from Makefile.am.
-#Copyright 1994-2017 Free Software Foundation, Inc.
+#Copyright 1994-2018 Free Software Foundation, Inc.
#This Makefile.in is free software; the Free Software Foundation
#gives unlimited permission to copy and/or distribute it,
#with or without modifications, as long as this notice is preserved.
diff --git a/testsuite/xemacs.inp b/testsuite/xemacs.inp
index 3b8b255..c313b4a 100644
--- a/testsuite/xemacs.inp
+++ b/testsuite/xemacs.inp
@@ -1,6 +1,6 @@
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
-# Copyright 1994-2017 Free Software Foundation, Inc.
+# Copyright 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/testsuite/xemacs.sed b/testsuite/xemacs.sed
deleted file mode 100644
index ee2f744..0000000
--- a/testsuite/xemacs.sed
+++ /dev/null
@@ -1,16 +0,0 @@
-# Inspired by xemacs' config.status script
-# submitted by John Fremlin (john@fremlin.de)
-
-/^# Generated/d
-s%/\*\*/#.*%%
-s/^ *# */#/
-/^##/d
-/^#/ {
- p
- d
-}
-/./ {
- s/\([\"]\)/\\\1/g
- s/^/"/
- s/$/"/
-}
diff --git a/testsuite/xemacs.sh b/testsuite/xemacs.sh
new file mode 100755
index 0000000..48a85e5
--- /dev/null
+++ b/testsuite/xemacs.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+# Test runner for xemacs.sed
+
+# Copyright (C) 2017-2018 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 <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+# location of external test files
+dir="$abs_top_srcdir/testsuite"
+
+# Inspired by xemacs' config.status script
+# submitted by John Fremlin (john@fremlin.de)
+cat << \EOF > xemacs.sed || framework_failure_
+/^# Generated/d
+s%/\*\*/#.*%%
+s/^ *# */#/
+/^##/d
+/^#/ {
+ p
+ d
+}
+/./ {
+ s/\([\"]\)/\\\1/g
+ s/^/"/
+ s/$/"/
+}
+EOF
+
+
+sed -f xemacs.sed < "$dir/xemacs.inp" > out || fail=1
+remove_cr_inplace out
+compare "$dir/xemacs.good" out || fail=1
+
+
+Exit $fail
diff --git a/testsuite/y-bracket.good b/testsuite/y-bracket.good
deleted file mode 100644
index 7e1a0ac..0000000
--- a/testsuite/y-bracket.good
+++ /dev/null
@@ -1 +0,0 @@
-Are you sure (y/n)? y]
diff --git a/testsuite/y-bracket.inp b/testsuite/y-bracket.inp
deleted file mode 100644
index 131c38c..0000000
--- a/testsuite/y-bracket.inp
+++ /dev/null
@@ -1 +0,0 @@
-Are you sure (y/n)? [y]
diff --git a/testsuite/y-bracket.sed b/testsuite/y-bracket.sed
deleted file mode 100644
index 79f3b61..0000000
--- a/testsuite/y-bracket.sed
+++ /dev/null
@@ -1 +0,0 @@
-y/[/ /
diff --git a/testsuite/y-newline.good b/testsuite/y-newline.good
deleted file mode 100644
index 371b9cb..0000000
--- a/testsuite/y-newline.good
+++ /dev/null
@@ -1 +0,0 @@
-Are Sou Yure (S/n)? [S]$$Are Sou Yure (S/n)? [S]
diff --git a/testsuite/y-newline.inp b/testsuite/y-newline.inp
deleted file mode 100644
index 131c38c..0000000
--- a/testsuite/y-newline.inp
+++ /dev/null
@@ -1 +0,0 @@
-Are you sure (y/n)? [y]
diff --git a/testsuite/y-newline.sed b/testsuite/y-newline.sed
deleted file mode 100644
index 3e1dbea..0000000
--- a/testsuite/y-newline.sed
+++ /dev/null
@@ -1,3 +0,0 @@
-H
-G
-y/Ss\nYy/yY$sS/
diff --git a/testsuite/y-zero.good b/testsuite/y-zero.good
deleted file mode 100644
index 659b724..0000000
--- a/testsuite/y-zero.good
+++ /dev/null
Binary files differ
diff --git a/testsuite/y-zero.inp b/testsuite/y-zero.inp
deleted file mode 100644
index 8baef1b..0000000
--- a/testsuite/y-zero.inp
+++ /dev/null
@@ -1 +0,0 @@
-abc
diff --git a/testsuite/y-zero.sed b/testsuite/y-zero.sed
deleted file mode 100644
index 6b0af7b..0000000
--- a/testsuite/y-zero.sed
+++ /dev/null
@@ -1 +0,0 @@
-y/b/\x00/
diff --git a/testsuite/zero-anchor.good b/testsuite/zero-anchor.good
deleted file mode 100644
index a62d3b4..0000000
--- a/testsuite/zero-anchor.good
+++ /dev/null
Binary files differ
diff --git a/testsuite/zero-anchor.inp b/testsuite/zero-anchor.inp
deleted file mode 100644
index 7207ec4..0000000
--- a/testsuite/zero-anchor.inp
+++ /dev/null
Binary files differ
diff --git a/testsuite/zero-anchor.sed b/testsuite/zero-anchor.sed
deleted file mode 100644
index b3d2de1..0000000
--- a/testsuite/zero-anchor.sed
+++ /dev/null
@@ -1,6 +0,0 @@
-N
-N
-s/^/X/g
-s/^/X/mg
-s/$/Y/g
-s/$/Y/mg